Old 12-04-2018, 09:53 AM   #1
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 70
Default New script: Adjust distance between items via mouse wheel

Just made this simple script to let you adjust items' distance with your mouse wheel



EDIT: Instrction of the script
  • 1. Load it from actionlist
  • 2. Assign a shortcut with mouse wheel, such as Ctrl+ mouse wheel, or Shift+ mouse wheel, or any modifier keys that you like
Attached Files
File Type: lua DSY_adjust distance of items via mouse wheel.lua (1.2 KB, 32 views)

Last edited by dsyrock; 12-04-2018 at 06:30 PM.
dsyrock is offline   Reply With Quote
Old 12-04-2018, 01:55 PM   #2
Indeo
Human being with feelings
 
Indeo's Avatar
 
Join Date: Sep 2018
Posts: 3
Default

Nice script, dsyrock

Exponential distance would be much appreciated.
Indeo is offline   Reply With Quote
Old 12-04-2018, 02:19 PM   #3
Eliseat
Human being with feelings
 
Join Date: Mar 2018
Location: Cologne
Posts: 638
Default

How does it work? If I try to scroll my view pans vertical as expected. Even if I activate the script it does not overwrite the standard behavior.
Eliseat is offline   Reply With Quote
Old 12-04-2018, 04:45 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,238
Default

Quote:
Originally Posted by Eliseat View Post
How does it work? If I try to scroll my view pans vertical as expected. Even if I activate the script it does not overwrite the standard behavior.
You have to assign the script itself to Mousewheel (or Mousewheel + modifier) via action list, this works for me.
nofish is online now   Reply With Quote
Old 12-04-2018, 05:21 PM   #5
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 70
Default

Quote:
Originally Posted by Eliseat View Post
How does it work? If I try to scroll my view pans vertical as expected. Even if I activate the script it does not overwrite the standard behavior.
I'm sorry that I forgot to write some instruction if it. And just try to do as Nofish said. And thanks, Nofish
dsyrock is offline   Reply With Quote
Old 12-04-2018, 06:36 PM   #6
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 70
Default

Quote:
Originally Posted by Indeo View Post
Nice script, dsyrock
Exponential distance would be much appreciated.
@Indeo

You mean if I nudge one item with 1 unit, then nudge the next one with 2 units, and the next one with 4 units, and then 8, 16, 32 ......2^n?

My original purpose was adjusting and keeping the same distance of items at the same time. Because I'm going to use this to deal with the sound like footstep.
dsyrock is offline   Reply With Quote
Old 12-04-2018, 09:09 PM   #7
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,238
Default

Quote:
Originally Posted by dsyrock View Post
I'm sorry that I forgot to write some instruction if it. And just try to do as Nofish said. And thanks, Nofish
Thank you for the script.
nofish is online now   Reply With Quote
Old 12-05-2018, 02:49 AM   #8
andyp24
Human being with feelings
 
Join Date: Mar 2016
Posts: 554
Default

Quote:
Originally Posted by dsyrock View Post
@Indeo

You mean if I nudge one item with 1 unit, then nudge the next one with 2 units, and the next one with 4 units, and then 8, 16, 32 ......2^n?

My original purpose was adjusting and keeping the same distance of items at the same time. Because I'm going to use this to deal with the sound like footstep.
My assumption was that the OP meant that the first click of the mousewheel moves it a very small distance, and with each subsequent click the distance (for all items) gets bigger....
andyp24 is online now   Reply With Quote
Old 12-05-2018, 03:29 AM   #9
Indeo
Human being with feelings
 
Indeo's Avatar
 
Join Date: Sep 2018
Posts: 3
Default

Exactly. Like a roll slowing down or speeding up.
Indeo is offline   Reply With Quote
Old 12-05-2018, 05:15 AM   #10
J Reverb
Human being with feelings
 
J Reverb's Avatar
 
Join Date: Jul 2009
Posts: 487
Default

Thanks dsyrock good idea

@Indeo
you can get exponential by changing these values

for left-
reaper.ApplyNudge(0, 0, 0, 0, 1+i, 1, 0)

for right
reaper.ApplyNudge(0, 0, 0, 0, 1+i, 0, 0)



0=ms, 1=seconds, 2=grid, 3=256th notes, ..., 15=whole notes, 16=measures.beats (1.15 = 1 measure + 1.5 beats), 17=samples, 18=frames, 19=pixels, 20=item lengths, 21=item selections
__________________
I've been imitated so well I've heard people copy my mistakes. - Jimi Hendrix

Last edited by J Reverb; 12-05-2018 at 05:32 AM.
J Reverb is offline   Reply With Quote
Old 12-05-2018, 07:27 AM   #11
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 70
Default

Quote:
Originally Posted by andyp24 View Post
My assumption was that the OP meant that the first click of the mousewheel moves it a very small distance, and with each subsequent click the distance (for all items) gets bigger....
Hmm, I see. But I'm not sure it is a good idea. First, this is a "one-time-script",there is no FIRST click or SECOND click. Every click is a FIRST click. If you need the script to tell it's a first or second click, it must be written in defer mode, which is bad for your CPU. So I just simply dicided to nudge 1 frame each time.

If you think that 1 frame is not enough for you, feel free to edit the code as J Reverb said
dsyrock is offline   Reply With Quote
Old 12-05-2018, 07:33 AM   #12
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 20,677
Default

cool as fuck!

not sure if I need it but

cool as fuck!

thank you
__________________
Beliefs do not require respect. People do.
Jason Brian Merrill is offline   Reply With Quote
Old 12-05-2018, 03:46 PM   #13
Indeo
Human being with feelings
 
Indeo's Avatar
 
Join Date: Sep 2018
Posts: 3
Default

Quote:
Originally Posted by J Reverb View Post
you can get exponential by changing these values...
That's the way, J Reverb. Thank you very much.
Indeo is offline   Reply With Quote
Old 12-08-2018, 01:51 AM   #14
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 219
Default

Thank you much!
I've thought about one but with gui and other stuff
Ivannn Bennnettt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.