Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 03-14-2014, 12:04 PM   #1
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default EEL script: MIDI vel/cc tool (draw ramps - maintain relative velocities etc.)

Download (the latest version is always here):
https://stash.reaper.fm/20029/MIDI%20velocity%20tool.zip



Breeder made some nice updates - thanks!:

CHANGELOG:

11.9.2014 (by Breeder):
  • support for 14bit lanes, pitch, aftertouch and program lanes (anything that's drawable)
  • when in CC mode, user is still able to edit velocity by clicking it's lane
  • ctrl+click target fader sets it to the middle
  • preserve settings through REAPER or script restarts(mode, compressor weight and target, dialog dimensions)


Last edited by spk77; 09-16-2014 at 04:47 AM. Reason: added Breeder's updates
spk77 is offline   Reply With Quote
Old 03-14-2014, 12:14 PM   #2
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Thanks!
Viente is offline   Reply With Quote
Old 03-14-2014, 01:32 PM   #3
adaragray
Human being with feelings
 
adaragray's Avatar
 
Join Date: Jan 2012
Location: Bananenrepublik Deutschland
Posts: 307
Default

i was waiting for this thank you so much spk77
__________________
www.shallmodule.com
adaragray is offline   Reply With Quote
Old 03-14-2014, 01:50 PM   #4
beingmf
Human being with feelings
 
beingmf's Avatar
 
Join Date: Jul 2007
Location: Jazz City
Posts: 5,065
Default

wow - game changing!!! any chance to get an undo-compatible version soon??
__________________
Windows 10x64 | AMD Ryzen 3700X | ATI FirePro 2100 | Marian Seraph AD2, 4.3.8 | Yamaha Steinberg MR816x
"If I can hear well, then everything I do is right" (Allen Sides)
beingmf is offline   Reply With Quote
Old 03-14-2014, 01:55 PM   #5
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Thanks. I couldn't get the "undo" working correctly - have to do more testing.
spk77 is offline   Reply With Quote
Old 03-14-2014, 02:40 PM   #6
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

YAY! Congrats

There definitely needs to be such a thing for CC as well (probably on last clicked lane?? Wouldn't make too much sense to use all selected in different lanes).


Hopefully this doesn't take away from the devs drive to implement a transform frame thingie for CC, velocity and possibly automation envelope lanes.
gofer is offline   Reply With Quote
Old 03-14-2014, 02:49 PM   #7
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Undo should work now - zip file updated. (had to use Undo_OnStateChange("descchange") to get it working)
spk77 is offline   Reply With Quote
Old 03-15-2014, 11:51 AM   #8
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Thanks gofer (maybe this will give some ideas to the devs. )

Zip file updated (in post#1):
  • ctrl+drag to "apply exponential velocity curve"
spk77 is offline   Reply With Quote
Old 03-15-2014, 07:49 PM   #9
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Man.., this along with your MIDI note selector running at the same time is quite the power combo. I really like the exponential adjustment too. Awesome job!!!

A couple of ideas for the velocity tool:

1)Perhaps a parameter that could be either click-dragged or mousewhell scrolled that would set all the selected velocities to the same value.

2)A button that could transpose/flip the edited velocities from left-right or right-left.

3)Maybe a reset button that would set velocities back to their pre-edited values.

Last edited by Anton9; 03-15-2014 at 08:00 PM.
Anton9 is offline   Reply With Quote
Old 03-16-2014, 03:35 AM   #10
Ozymandias
Human being with feelings
 
Join Date: Apr 2011
Posts: 144
Default

Great work, Spk77!

I really hope this gets incorporated into the MIDI Editor at some point. That would make REAPER's velocity handling on a par with Cubase's.
Ozymandias is offline   Reply With Quote
Old 03-16-2014, 04:25 AM   #11
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Anton9 View Post
Man.., this along with your MIDI note selector running at the same time is quite the power combo. I really like the exponential adjustment too. Awesome job!!!

A couple of ideas for the velocity tool:

1)Perhaps a parameter that could be either click-dragged or mousewhell scrolled that would set all the selected velocities to the same value.

2)A button that could transpose/flip the edited velocities from left-right or right-left.

3)Maybe a reset button that would set velocities back to their pre-edited values.
Thanks Anton ,

1) I've been thinking (how) to make a "smoothness control node" - it would move velocities towards the curve by 0-100 percent. Then another "node" which would adjust "smoothness/compress strength by note position".

2) That's possible to do, but I think it should flip the velocities "per channel" and "per pitch". Then it would work correctly, even when selected notes have different channels/pitches. Possible but not very easy .

3) Original velocities are deleted from memory when lmb is released, but undo should set velocities back to original.

Quote:
Originally Posted by Ozymandias View Post
Great work, Spk77!

I really hope this gets incorporated into the MIDI Editor at some point. That would make REAPER's velocity handling on a par with Cubase's.
Thanks, I'm sure they'll add the same behavior/logic to the MIDI editor at some point. Let's hope.
spk77 is offline   Reply With Quote
Old 03-16-2014, 08:23 AM   #12
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Nice work
IXix is offline   Reply With Quote
Old 03-16-2014, 08:30 AM   #13
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by IXix View Post
Nice work
Thanks IXix
spk77 is offline   Reply With Quote
Old 03-16-2014, 02:41 PM   #14
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Update - "alt+drag" -> set curve and compress

A fast way to add fade-ins/fade-outs:

Last edited by spk77; 03-16-2014 at 02:47 PM.
spk77 is offline   Reply With Quote
Old 03-16-2014, 03:12 PM   #15
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Very cool but uh... how do I install it?

EDIT: Figured out that I need to load it up in the actions list. For some reason the New/Load button does nothing though... even though it works on a fresh install.

EDIT: Figured out the problem too. The "lastscript=" path in reaper.ini was a remnant from my laptop. Since that directory doesn't exist, the load window refused to open.

Last edited by Seventh; 03-16-2014 at 03:29 PM.
Seventh is offline   Reply With Quote
Old 03-16-2014, 03:20 PM   #16
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Seventh View Post
Very cool but uh... how do I install it?
Unzip the file -> open the "Action list" -> load the file (ReaScript New/load...)
Then it should be in the action list (as an action).
spk77 is offline   Reply With Quote
Old 03-16-2014, 03:37 PM   #17
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Ok got it working. Thanks for the script!

By the way, would it be possible to make it do compression/expansion of velocities (without ramp)? :P

Cheers!
Seventh is offline   Reply With Quote
Old 03-17-2014, 03:32 AM   #18
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Seventh View Post
Ok got it working. Thanks for the script!

By the way, would it be possible to make it do compression/expansion of velocities (without ramp)? :P

Cheers!
Glad you got it working . Compress/expand -tool has been on my mind too.
spk77 is offline   Reply With Quote
Old 03-17-2014, 02:01 PM   #19
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default Compress/expand velocities

Compress/expand velocities (compresses towards average velocity)



(zip file updated)
spk77 is offline   Reply With Quote
Old 03-17-2014, 02:12 PM   #20
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by spk77 View Post
Compress/expand velocities (compresses towards average velocity)
That's going to be very useful. Thanks!
IXix is offline   Reply With Quote
Old 03-17-2014, 03:23 PM   #21
adaragray
Human being with feelings
 
adaragray's Avatar
 
Join Date: Jan 2012
Location: Bananenrepublik Deutschland
Posts: 307
Default

indeed very useful. thank you spk77
__________________
www.shallmodule.com
adaragray is offline   Reply With Quote
Old 03-18-2014, 10:00 AM   #22
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Nice updates
Anton9 is offline   Reply With Quote
Old 03-18-2014, 01:27 PM   #23
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Wohoo thanks!

Now, imagine how cool it would be if you could permanently dock this in the MIDI editor screenset... along with other scripted tools with interfaces... maybe something for Reaper v5.

Oh and, can the script listen to keyboard input? I'd really like to be able to close the window with esc key after using. And it would be ideal for it to pass keyboard commands like Ctrl+z through to Reaper.

Cheers

Last edited by Seventh; 03-18-2014 at 01:34 PM.
Seventh is offline   Reply With Quote
Old 03-19-2014, 04:42 AM   #24
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Great! Thank you very much!

I was testing it on a bigger project with a piano track with many many notes and, even if I selected only a few to modify with the script, I could hear a lot of cracking sounds when dragging the control if it is playing the track. Not a big deal. But maybe it can be optimized to run in lower priority or something? Maybe it is just the way EEL scripts work.

How can I have the script window on top of the midi editor window? When I go and select other notes, the window disappears behind the midi editor window. It needs the little pin button
heda is offline   Reply With Quote
Old 03-19-2014, 09:26 AM   #25
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Thank you all,

Quote:
Originally Posted by Seventh View Post
Wohoo thanks!

Now, imagine how cool it would be if you could permanently dock this in the MIDI editor screenset... along with other scripted tools with interfaces... maybe something for Reaper v5.
That would be great.

Quote:
Originally Posted by Seventh View Post
Oh and, can the script listen to keyboard input? I'd really like to be able to close the window with esc key after using. And it would be ideal for it to pass keyboard commands like Ctrl+z through to Reaper.

Cheers
In the next update, ctrl+z will be "undo" and esc-key will be "exit script".

Quote:
Originally Posted by heda View Post
Great! Thank you very much!

I was testing it on a bigger project with a piano track with many many notes and, even if I selected only a few to modify with the script, I could hear a lot of cracking sounds when dragging the control if it is playing the track. Not a big deal. But maybe it can be optimized to run in lower priority or something? Maybe it is just the way EEL scripts work.
Hmm..this script will take "relatively lot" of cpu resources when there are a lot of selected notes, don't know how to optimize it.

Quote:
Originally Posted by heda View Post
How can I have the script window on top of the midi editor window? When I go and select other notes, the window disappears behind the midi editor window. It needs the little pin button
It's not possible, unfortunately. Maybe it will be possible in the future (if/when EEL is updated) .
spk77 is offline   Reply With Quote
Old 03-19-2014, 10:15 AM   #26
LugNut
Human being with feelings
 
Join Date: Jun 2013
Location: So Florida
Posts: 1,427
Default

Quote:
Originally Posted by heda View Post
Great! ....
How can I have the script window on top of the midi editor window? When I go and select other notes, the window disappears behind the midi editor window. It needs the little pin button
Hi,

thank you very much spk77..a really usefull tool! You are very skilled and generous..thanks!
I use a docked midi editor and the scripts gui does stay on top.

Guido
LugNut is offline   Reply With Quote
Old 03-19-2014, 11:20 AM   #27
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Quote:
Originally Posted by spk77 View Post
In the next update, ctrl+z will be "undo" and esc-key will be "exit script".
Awesome ^_^
Seventh is offline   Reply With Quote
Old 03-19-2014, 05:31 PM   #28
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Thanks, spk77. I'm sure it will get much usage.
FnA is offline   Reply With Quote
Old 03-20-2014, 03:51 PM   #29
cyrilfb
Human being with feelings
 
cyrilfb's Avatar
 
Join Date: Apr 2012
Location: Denver, CO
Posts: 249
Default Awesome Tool!

This will improve my workflow tremendously. I am terrible at drawing the changes with a mouse.

Thanks
__________________
Cy Ball
Reaper + inspiration = music.
soundcloud.com/cyball or cyball.bandcamp.com/ or cyrilfb.com
cyrilfb is offline   Reply With Quote
Old 03-21-2014, 10:45 AM   #30
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Thanks again

I'm probably updating it this weekend (checking if there are serious bugs).

Here's another idea - "Pitch bend tool" (diving deep into the horrors of decaying sine um..curves).
(adjusting velocities in this gif)


I'm running out of axis:
1) lmb down+move mouse in y-coord: set wave height
2) lmb down+move mouse in x-coord: set decay
3) lmb down+move mouse in z-coord (towards floor/roof): do something
4) ? keeping lmb firmly down while pushing mouse through time: set wave length (number of sine waves)
spk77 is offline   Reply With Quote
Old 03-21-2014, 11:19 AM   #31
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Excellent stuff, spk77!
Quote:
Originally Posted by spk77 View Post
[...]

Here's another idea - "Pitch bend tool" (diving deep into the horrors of decaying sine um..curves).
(adjusting velocities in this gif)


[...]
While I think some tools to aid pitch bend editing would be awesome, the idea of varying sine curves doesn't interest me much. Instead, I'd suggest to focus on ways to vary the shape of a (single) curve.

Consider that most targets for pitch bend (typically, synths) can already achieve tremolo/vibrato effects simply by using a (synced) LFO modulating oscillator pitch, where one simply has to draw a ramp of modulation values to indicate the depth of the sine waves. For that (typical) case, it is quite a convoluted workflow. Also, while it may be attractive to see the curve shape 'exactly' on screen, for a variety of reasons the result of modulation by an internal LFO typically produces much smoother results. (Of course, on the other hand, this would very useful when this approach is not possible.)

Btw, while pitch bend data is 14 bits, most targets respond only to a lower (e.g. 8 bit) resolution. You may want to account for that by doing some 'magic' during processing, so one may avoid having redundant MIDI data.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 03-21-2014, 11:41 AM   #32
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

spk77,

I would absolutely love to see something like the decaying sine curve for sending OSC messages to FX parameters. Do you know if it would be possible to do something like that and have the sine function plotted in an eel gfx window?
Anton9 is offline   Reply With Quote
Old 03-21-2014, 11:45 AM   #33
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Banned View Post
Excellent stuff, spk77!

While I think some tools to aid pitch bend editing would be awesome, the idea of varying sine curves doesn't interest me much. Instead, I'd suggest to focus on ways to vary the shape of a (single) curve.

Consider that most targets for pitch bend (typically, synths) can already achieve tremolo/vibrato effects simply by using a (synced) LFO modulating oscillator pitch, where one simply has to draw a ramp of modulation values to indicate the depth of the sine waves. For that (typical) case, it is quite a convoluted workflow. Also, while it may be attractive to see the curve shape 'exactly' on screen, for a variety of reasons the result of modulation by an internal LFO typically produces much smoother results. (Of course, on the other hand, this would very useful when this approach is not possible.)

Btw, while pitch bend data is 14 bits, most targets respond only to a lower (e.g. 8 bit) resolution. You may want to account for that by doing some 'magic' during processing, so one may avoid having redundant MIDI data.
Thanks

Yeah, I'm just experimenting what's possible with EEL. (and I'm still using the MS wavetable synth ).
spk77 is offline   Reply With Quote
Old 03-21-2014, 11:52 AM   #34
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Anton9 View Post
spk77,

I would absolutely love to see something like the decaying sine curve for sending OSC messages to FX parameters. Do you know if it would be possible to do something like that and have the sine function plotted in an eel gfx window?
I think it's possible, but I don't know how accurate (time wise) it would be.
spk77 is offline   Reply With Quote
Old 03-22-2014, 05:25 AM   #35
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Hi Spk77!

Above all, thank you very, very, very, much for this great tool!! It was one of the few things I really missed in Reaperīs midi toolbox. In the image of your first post you seem to apply the tool, besides the velocities, to a bunch of CCs, but I must be wrong since it seems to work only for velocities. Have you thought, as another poster asked, to do a CC version of it? I see you are planning a pitch version, so if you could complete the set with a CC version, it would be absolutely killer for all of us midi users! Excuse me if I ended up asking for something besides giving you thanks, but I couldnīt resist the temptation...

What you did is really helpful...
Soli Deo Gloria is offline   Reply With Quote
Old 03-22-2014, 05:59 AM   #36
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Hi Spk77!

Above all, thank you very, very, very, much for this great tool!! It was one of the few things I really missed in Reaperīs midi toolbox. In the image of your first post you seem to apply the tool, besides the velocities, to a bunch of CCs, but I must be wrong since it seems to work only for velocities. Have you thought, as another poster asked, to do a CC version of it? I see you are planning a pitch version, so if you could complete the set with a CC version, it would be absolutely killer for all of us midi users! Excuse me if I ended up asking for something besides giving you thanks, but I couldnīt resist the temptation...

What you did is really helpful...
Hi,
Yes, I'm adjusting velocities in the first post. I'll try to make a CC version also - I think I just convert this "velocity version" to work with selected CC events (for now).
spk77 is offline   Reply With Quote
Old 03-22-2014, 08:38 AM   #37
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by spk77 View Post
Hi,
Yes, I'm adjusting velocities in the first post. I'll try to make a CC version also - I think I just convert this "velocity version" to work with selected CC events (for now).
Awesome! -fantastic! - incredible!...(and the list goes on).

Thanks so much in advance!
Soli Deo Gloria is offline   Reply With Quote
Old 03-22-2014, 01:44 PM   #38
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

zip file (post#1) is updated: "Apply curves to CCs":

NOTE: This doesn't work correctly (yet) when CCs from different lanes are selected. (curve is applied to all selected cc events). Also, not tested much.



Edit: range == 1 to 127 in "Velocity" mode and 0 to 127 in "CC" mode.

Last edited by spk77; 03-23-2014 at 03:23 AM.
spk77 is offline   Reply With Quote
Old 03-22-2014, 03:20 PM   #39
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

spk77, do you think it could be applied to position and length? Accel/decell and staccato/legato?
FnA is offline   Reply With Quote
Old 03-22-2014, 03:39 PM   #40
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by FnA View Post
spk77, do you think it could be applied to position and length? Accel/decell and staccato/legato?
Yes, I think. At least it's possible to change pos/length with MIDI_SetNote().
spk77 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 03:21 AM.


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