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

Reply
 
Thread Tools Display Modes
Old 03-22-2014, 03:46 PM   #41
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

No rush, of course! Just an idea while you're focusing on this. No idea how this EEL compares to python, at which I am only 1 step above noob. 1/2 step maybe.
FnA is offline   Reply With Quote
Old 03-23-2014, 09:24 AM   #42
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
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.
Man, this is great!!! Infinite thanks!!! Iīll be using it this week and Iīll tell you.

Such a fantastic tool!! It should be included in Reaperīs native actions...
Soli Deo Gloria is offline   Reply With Quote
Old 03-23-2014, 09:50 AM   #43
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Man, this is great!!! Infinite thanks!!! Iīll be using it this week and Iīll tell you.

Such a fantastic tool!! It should be included in Reaperīs native actions...
Thanks, but please be careful . Use only for one CC lane at time (I'll have to add some "filters" to make sure that it manipulates only one type of CC at time).

All suggestions are welcome (curve shapes etc.). I think I'll add "target velocity/target cc_value" for the "compress/expand" thing (currently target is average). Also, I think "ctrl+drag" makes too steep curves (it's using the pow() function).
spk77 is offline   Reply With Quote
Old 03-23-2014, 11:38 AM   #44
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Wow, spk77, I looked at the code... Way too deep for me...

I guess for staccato/legato I would imagine the top line setting length of note, and the bottom setting the peak or dip in the curve of contrast.

For accelerando, I dunno... Would only 2 adjustments be required? Moving the curve/sharpening it toward the end on one line (constant vs ???). Determining which end is faster/slower and by what magnitude with the other (difference)? I guess start position would be the base? Maybe you can see a good way to work an acceleration formula in to your device? Me bad at maths.

I may be looking at this all wrong.

I guess I should just mess with the velocity/cc device for a while, hey? Just figured if it is easy for you, you could slap something together. If it's a lot of work, I don't know if anyone else is even interested.

Last edited by FnA; 03-23-2014 at 11:49 AM.
FnA is offline   Reply With Quote
Old 03-23-2014, 01:04 PM   #45
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by FnA View Post
Wow, spk77, I looked at the code... Way too deep for me...
It's just because it's messy and repetitive code .
Quote:
Originally Posted by FnA View Post
I guess for staccato/legato I would imagine the top line setting length of note, and the bottom setting the peak or dip in the curve of contrast.

For accelerando, I dunno... Would only 2 adjustments be required? Moving the curve/sharpening it toward the end on one line (constant vs ???). Determining which end is faster/slower and by what magnitude with the other (difference)? I guess start position would be the base? Maybe you can see a good way to work an acceleration formula in to your device? Me bad at maths.

I may be looking at this all wrong.
Staccato/legato part should be easier to do, but adjusting note positions (accelerando part) might cause the old "selected note index changed - let's adjust a wrong note" behavior.

Quote:
Originally Posted by FnA View Post


I guess I should just mess with the velocity/cc device for a while, hey? Just figured if it is easy for you, you could slap something together. If it's a lot of work, I don't know if anyone else is even interested.
Yeah, I think I'll "finish" the Velocity/CC part first.
spk77 is offline   Reply With Quote
Old 03-23-2014, 01:43 PM   #46
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I started on one a while a go using FNG functions. This is how it ended up. Not finished really and I'm not confident in the math by any means. The script is totally in 'prototype' and arbitrary condition. Not for general consumption. But if you were interested in the sketch i'd PM it to ya.



I guess it's probably a different ball of wax than what's going on in your tool. 1 time calculation, etc. I can't even remember what I was thinking really. LOL.
Attached Images
File Type: png 3-23-14.png (6.5 KB, 1675 views)

Last edited by FnA; 03-23-2014 at 01:56 PM.
FnA is offline   Reply With Quote
Old 03-23-2014, 01:54 PM   #47
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by FnA View Post
I started on one a while a go using FNG functions. This is how it ended up. Not finished really and I'm not confident in the math by any means. The script is totally in 'prototype' and arbitrary condition. Not for general consumption. But if you were interested in the sketch i'd PM it to ya.
Ok, send me a PM
spk77 is offline   Reply With Quote
Old 03-24-2014, 04:04 AM   #48
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default http://forum.cockos.com/showthread.php?t=136232

Quote:
Originally Posted by spk77 View Post
Thanks, but please be careful . Use only for one CC lane at time (I'll have to add some "filters" to make sure that it manipulates only one type of CC at .
You probably know it already, but in case that not, you could use MIDIeditor_GetSetting to find the last clicked CC lane and restrict processing to that lane only. For a (clumsy) example, look at post #6 here: http://forum.cockos.com/showthread.php?t=136232

Last edited by gofer; 03-24-2014 at 05:01 AM.
gofer is offline   Reply With Quote
Old 03-24-2014, 07:53 AM   #49
harmonicaman
Human being with feelings
 
harmonicaman's Avatar
 
Join Date: Oct 2011
Posts: 173
Default

Thank you spk77, it's an awesome script, and I like the miminal "Pong" visual style
harmonicaman is offline   Reply With Quote
Old 03-24-2014, 09:03 AM   #50
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by gofer View Post
You probably know it already, but in case that not, you could use MIDIeditor_GetSetting to find the last clicked CC lane and restrict processing to that lane only. For a (clumsy) example, look at post #6 here: http://forum.cockos.com/showthread.php?t=136232
Thanks, I'll modify the script to use the last clicked CC lane.

Quote:
Originally Posted by harmonicaman View Post
Thank you spk77, it's an awesome script, and I like the miminal "Pong" visual style
Back to the 70's
spk77 is offline   Reply With Quote
Old 03-24-2014, 07:17 PM   #51
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

What about adding some randomization like in your script from here http://forum.cockos.com/showpost.php...6&postcount=12

it could be a control like the expand/compress, which could add or remove some randomness to the current values.
heda is offline   Reply With Quote
Old 03-24-2014, 08:10 PM   #52
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Also i wonder what you mean here exactly?
Quote:
Originally Posted by spk77 View Post
.
All suggestions are welcome (curve shapes etc.)
Like a bezier adjustment of an envelope, but including all the dips and peaks of the selection? Or do you mean the individual curves? Or??? edit-Don't know how I missed the posts about control drag and alt drag. I blame my browser hehe.

The different target you mentioned sounds interesting too.

I keep drifting towards positioning in my daydreams on this thing. Even being able to stretch a segment without some crazy macro sounds cool (well there is the use a note trick). Altering a vibrato type sections pulsation frequency etc. If that could be done on a 'curved' scale, might be...interesting.

Last edited by FnA; 03-28-2014 at 05:41 PM.
FnA is offline   Reply With Quote
Old 03-29-2014, 05:15 AM   #53
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

today I have a small issue with the velocity tool:

I open a track with many items and I make them all editable, select all notes to compress/expand velocities and only the notes on the active item are modified. It should modify all notes since I have made all items editable with the little lock buttons.

note: If I select all notes and press CTRL+F2 and in velocity properties set it to *0.5 for example.. all velocities are compressed as expected... so.. maybe it is something wrong in the script?
heda is offline   Reply With Quote
Old 03-29-2014, 06:44 AM   #54
Colox
Human being with feelings
 
Join Date: Feb 2012
Location: Sweden
Posts: 1,206
Default

Very nice work and approach

It's just .. I can't adjust any other MIDI parameter than velocity. Try #7 volume or #11 expression, nothing happens (for me).

Perhaps this functionality is not tested out thoroughly yet(?)
But you did say it works with MIDI CC 0-127. So I’m curious if I’m doing something wrong, and what that might be.

I'm selecting a portion of MIDI the MIDI CC data I want to affect, or just the MIDI notes, and I move the handles of the line in the "Pong prompt" nothing happens. Project file is the default too.

Last edited by Colox; 03-29-2014 at 06:49 AM.
Colox is offline   Reply With Quote
Old 03-29-2014, 06:53 AM   #55
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by FnA View Post
Also i wonder what you mean here exactly?
Like a bezier adjustment of an envelope, but including all the dips and peaks of the selection? Or do you mean the individual curves? Or??? edit-Don't know how I missed the posts about control drag and alt drag. I blame my browser hehe.

The different target you mentioned sounds interesting too.

I keep drifting towards positioning in my daydreams on this thing. Even being able to stretch a segment without some crazy macro sounds cool (well there is the use a note trick). Altering a vibrato type sections pulsation frequency etc. If that could be done on a 'curved' scale, might be...interesting.
Yes, I meant those ctrl/alt+drag -things. F.ex. I think that "ctrl+drag" makes too steep curves - it's a little difficult to "handle". (I had a busy week at work - didn't have time to do anything for the script.)

Quote:
Originally Posted by heda View Post
today I have a small issue with the velocity tool:

I open a track with many items and I make them all editable, select all notes to compress/expand velocities and only the notes on the active item are modified. It should modify all notes since I have made all items editable with the little lock buttons.

note: If I select all notes and press CTRL+F2 and in velocity properties set it to *0.5 for example.. all velocities are compressed as expected... so.. maybe it is something wrong in the script?
I think it's not possible to "get all editable takes" with current API functions, we have:

Code:
EEL: MediaItem_Take* MIDIEditor_GetTake(void* midieditor)
get the take that is currently being edited in this MIDI editor
spk77 is offline   Reply With Quote
Old 03-29-2014, 07:03 AM   #56
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Colox View Post
Very nice work and approach

It's just .. I can't adjust any other MIDI parameter than velocity. Try #7 volume or #11 expression, nothing happens (for me).

Perhaps this functionality is not tested out thoroughly yet(?)
But you did say it works with MIDI CC 0-127. So I’m curious if I’m doing something wrong, and what that might be.

I'm selecting a portion of MIDI the MIDI CC data I want to affect, or just the MIDI notes, and I move the handles of the line in the "Pong prompt" nothing happens. Project file is the default too.
The "Velocity" text is actually a button (in "CC" mode, it adjusts all selected CCs - I should/will change that behavior):

spk77 is offline   Reply With Quote
Old 03-29-2014, 07:11 AM   #57
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by spk77 View Post

I think it's not possible to "get all editable takes" with current API functions, we have:

Code:
EEL: MediaItem_Take* MIDIEditor_GetTake(void* midieditor)
get the take that is currently being edited in this MIDI editor
Ok. Maybe something devs must look at. It's similar to this bug issue I have here http://forum.cockos.com/showthread.php?t=136261
heda is offline   Reply With Quote
Old 03-29-2014, 08:09 AM   #58
Colox
Human being with feelings
 
Join Date: Feb 2012
Location: Sweden
Posts: 1,206
Default

Quote:
Originally Posted by spk77 View Post
The "Velocity" text is actually a button (in "CC" mode, it adjusts all selected CCs - I should/will change that behavior):
Aha. It works. Nifty.
Might need to do a slight manual for this great tool after all.
Thanks.

On a sidenote: I'm using the mouse in my left hand, meaning the actions of left/right mouse button are reversed. But your tool presumes left mouse button as main click, so my main click is recieved as right click = nothing happens. That's a very small matter though, but just thought I'd mention it
Colox is offline   Reply With Quote
Old 03-29-2014, 08:38 AM   #59
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Colox View Post
Aha. It works. Nifty.
Might need to do a slight manual for this great tool after all.
Thanks.

On a sidenote: I'm using the mouse in my left hand, meaning the actions of left/right mouse button are reversed. But your tool presumes left mouse button as main click, so my main click is recieved as right click = nothing happens. That's a very small matter though, but just thought I'd mention it
Nice . If you want to change left/right mouse button behavior, open the script in text editor and add "1" to every "mouse_cap == somevalue":

f.ex. line 97:
Code:
mouse_cap == 1 || mouse_cap == 5 || mouse_cap == 17 ? (
would be (after "1" is added to values):
Code:
mouse_cap == 2 || mouse_cap == 6 || mouse_cap == 18 ? (
spk77 is offline   Reply With Quote
Old 03-29-2014, 12:56 PM   #60
Colox
Human being with feelings
 
Join Date: Feb 2012
Location: Sweden
Posts: 1,206
Default

Quote:
Originally Posted by spk77 View Post
If you want to change left/right mouse button behavior, open the script in text editor and add "1" to every "mouse_cap == somevalue"
It works. Sweet!
You seem to have answers for everything
Colox is offline   Reply With Quote
Old 03-29-2014, 01:12 PM   #61
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Colox View Post
It works. Sweet!
You seem to have answers for everything
Glad you got it working
spk77 is offline   Reply With Quote
Old 03-29-2014, 11:25 PM   #62
dan_public
Human being with feelings
 
Join Date: Mar 2013
Posts: 50
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.
I'm interested in the MIDI note selector, but I can't find it it the STASH. What is the script name?

Thanks,

Dan.
dan_public is offline   Reply With Quote
Old 03-29-2014, 11:55 PM   #63
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by dan_public View Post
I'm interested in the MIDI note selector, but I can't find it it the STASH. What is the script name?

Thanks,

Dan.
It's here (post #26):
http://forum.cockos.com/showthread.php?t=136232
spk77 is offline   Reply With Quote
Old 03-30-2014, 01:50 AM   #64
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Updated:
  • adjust only "the last clicked CC lane" (thanks gofer )
  • "ctrl+z" to undo and "Esc" to exit (when the window is focused)

spk77 is offline   Reply With Quote
Old 03-30-2014, 07:29 AM   #65
dan_public
Human being with feelings
 
Join Date: Mar 2013
Posts: 50
Default

Quote:
Originally Posted by spk77 View Post
spk77,

Excellent! Thanks,

Dan.
dan_public is offline   Reply With Quote
Old 04-04-2014, 02:42 AM   #66
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by spk77 View Post
Updated:
  • adjust only "the last clicked CC lane" (thanks gofer )
  • "ctrl+z" to undo and "Esc" to exit (when the window is focused)

Great stuff!!
Viente is offline   Reply With Quote
Old 04-06-2014, 03:47 AM   #67
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Update:
  • added "target" and "weight" sliders

It's getting quite complex (for my brain). Also, the "sliders" could be better, but they "do their jobs".

spk77 is offline   Reply With Quote
Old 04-06-2014, 04:19 AM   #68
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

It's getting quite amazing!
I often had to manually adjust all velocities overall value after compression. not anymore
heda is offline   Reply With Quote
Old 04-06-2014, 07:54 AM   #69
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

This if really cool and amazing spk77, thank you for another one of your neat little gifts.

Now all you gotta do is be able to add points to your upper line and you'll have an envelope.
Tod is offline   Reply With Quote
Old 04-06-2014, 08:05 AM   #70
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

a FR for me would be a smooth function... another slider similar to compress/expand but just smoothing the values. We all know how difficult is to draw by hand smooth curves of CCs
heda is offline   Reply With Quote
Old 04-06-2014, 09:18 AM   #71
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Tod View Post
This if really cool and amazing spk77, thank you for another one of your neat little gifts.

Now all you gotta do is be able to add points to your upper line and you'll have an envelope.
Thanks Tod ,
I think I'll add one point at the center. It would do something like this:



Quote:
Originally Posted by heda View Post
a FR for me would be a smooth function... another slider similar to compress/expand but just smoothing the values. We all know how difficult is to draw by hand smooth curves of CCs
That would be great . Actually gofer has made a CC smoothening script (in Python): http://forum.cockos.com/showpost.php...6&postcount=11

There are some formulas in the below link that might be useful:
http://en.wikipedia.org/wiki/Exponential_smoothing.

Last edited by spk77; 04-06-2014 at 12:39 PM.
spk77 is offline   Reply With Quote
Old 04-07-2014, 01:44 PM   #72
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Hi Spk

Iīve been using your script and it is fantastic! I wrote Gofer about his CC smoothing script because I couldnīt make it work until now. Maybe if yours had the option it could be a plus, but anyway is really great as it is now.

One question about Reascript : as the scripts windows donīt have any pin to stay on top, I have to place the Midi editor to the right for the script not to be hidden behind (even though I havenīt put the ME to stay on top). Am I missing something?

Thank you very, very much for this!
Soli Deo Gloria is offline   Reply With Quote
Old 04-11-2014, 08:52 PM   #73
harmonicaman
Human being with feelings
 
harmonicaman's Avatar
 
Join Date: Oct 2011
Posts: 173
Default

With gofer you create super tools.
Could it be possible to add an optional inner/border/outer falloff/blur radius so it blend with the cc surrounding the selection ?
Another idea, your script is so useful it makes me lazy , could it auto add cc on selected notes (or time selection) on empty lane when you manipulate the tool ? To create smooth cc ramps and bells without even drawing it first.
harmonicaman is offline   Reply With Quote
Old 08-15-2014, 08:05 AM   #74
Stroudy
Human being with feelings
 
Stroudy's Avatar
 
Join Date: Jul 2014
Location: London
Posts: 733
Default Velocity tool across multpile editable items

Great tool - thanks!

Is there a way to use it over multiple editable items?

In the piano roll there are 3 states...
Active
Editable
Visible

Right now, the velocity/CC tool only works over media/midi items in the Active state.

Say I'm working on a drum part over a few tracks (kick on one track, hats on another perhaps). To ramp the velocities over a few bars I'd have use the tool on one track then the other. Ideally, as long as both parts were editable in the piano roll, this tool would work on both tracks simultaneously.

I realise that might be asking a lot :P
Stroudy is offline   Reply With Quote
Old 08-15-2014, 09:03 AM   #75
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Quote:
Originally Posted by Stroudy View Post
Great tool - thanks!

Is there a way to use it over multiple editable items?

In the piano roll there are 3 states...
Active
Editable
Visible

Right now, the velocity/CC tool only works over media/midi items in the Active state.
That's a restriction of the current scripting api. There is no way as of yet to find out which items are set "editable" or "visible". At least none I know of.
gofer is offline   Reply With Quote
Old 08-15-2014, 09:05 AM   #76
Stroudy
Human being with feelings
 
Stroudy's Avatar
 
Join Date: Jul 2014
Location: London
Posts: 733
Default

Quote:
Originally Posted by gofer View Post
That's a restriction of the current scripting api. There is no way as of yet to find out which items are set "editable" or "visible".
Ah well. Thanks for responding.

Still a very useful tool none the less. Perhaps when they full integrate that feature it'll work as I'd hoped.

Thanks again
Stroudy is offline   Reply With Quote
Old 08-16-2014, 03:39 PM   #77
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Quote:
Originally Posted by Soli Deo Gloria View Post

One question about Reascript : as the scripts windows donīt have any pin to stay on top, I have to place the Midi editor to the right for the script not to be hidden behind (even though I havenīt put the ME to stay on top). Am I missing something?
Add your voice here if you like.

http://forum.cockos.com/showthread.php?t=143012
nofish is offline   Reply With Quote
Old 08-17-2014, 12:03 AM   #78
Alex Ortega
Human being with feelings
 
Join Date: Oct 2013
Posts: 105
Default

Hi!(MIDI vel/cc tool)- I have one midi "cc pitch" does not work ?
Alex Ortega is online now   Reply With Quote
Old 08-17-2014, 01:54 AM   #79
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Alex Ortega View Post
Hi!(MIDI vel/cc tool)- I have one midi "cc pitch" does not work ?
Hi,
Yes, it works only on velocities and CCs - "pitch" is not supported.
spk77 is offline   Reply With Quote
Old 08-17-2014, 03:04 AM   #80
Alex Ortega
Human being with feelings
 
Join Date: Oct 2013
Posts: 105
Default

Quote:
Originally Posted by spk77 View Post
Hi,
Yes, it works only on velocities and CCs - "pitch" is not supported.
And you can come up with something similar, but with a pitch. Or with the envelope point?
Alex Ortega is online now   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 10:21 AM.


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