Old 07-14-2018, 03:39 AM   #1
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default Solved: Change the increment speed of relative CC mode

Edit3: Realearn allows me to do this, so there is no need to make my own plugin

I've never made script before, but my programmer friend has agreed to help me out if I run into trouble. So I wanted to hear if you have any suggestion or resources to help me make the following script.

What I want to do is change the turn speed for some of the parameters, when controlling a parameter with a midi controller in relative CC mode, which is often too slow to feel like an actual analogue knob.

1. What I think would be a cool addition is to have a few extra relative modes in the midi learn menu, that doubles or triples the output value from Reaper to the plugin parameter, and thus makes the knob move faster.

Please give me some suggestions on the best way to make the parameters move faster with a midi controller.

Edit: Made a clearer description of what I want to do:
Relative mode is a setting in Reapers midi learn menu and in controller software. Relative mode means that the controller encoder will only send out two different midi values. One for each way you turn the knob. So if you turn it left it'll send out a midi value of 127 and if you turn it right it'll send out a value 1. Then Reaper translate the midi value of 127 to a parameter increment value of -1 and a midi value of 1 to an increment of +1 (127=-1, 1=+1). Relative mode is often present on controllers with endless encoders and prevents the parameters from jumping around, when you adjust the value.
What I want to change is how Reaper translate those two midi values, so instead of (127=-1 and 1=+1), it'll do (127=-2 and 1=+2) instead, thus making the parameter move faster, when turning the knob.
Edit2: Removed some misunderstandings of how Relative mode works.

Last edited by Tiggerdyret; 07-15-2018 at 09:44 AM.
Tiggerdyret is offline   Reply With Quote
Old 07-14-2018, 08:02 AM   #2
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

I don't know what relative takeover mode is, but if you want to alter incoming control change values, then yes, you can do that with jsfx.

Someone here in the forum recently dropped a link to a very beginner friendly jsfx tutorial: https://www.admiralbumblebee.com/mus...m-scratch.html

It explains the necessaries on binary (MIDI messages are encoded in binary), the structure of MIDI messages, and the required jsfx scripting basics for making a MIDI plugin. Give yourself at least a few days to go through it and do some trial and error experimenting with what is there.

On writing a script that will do what you want, you are looking to grab the incoming control change values of MIDI messages (passing everything else untouched), altering the values to your liking, and sending them on. But increasing the values via a simple multiplication won't work, because once you receive a value of 64 or higher, a simple multiplication is going to put the outgoing value outside of 0-127. For example, 67 (incoming) * 2 = 134 (outgoing). So you need to alter the curve of incoming values between minimum 0 and maximum 127. I'll leave that part for you to lookup. But everything you need to know about working with jsfx for scripting such a plugin should be covered in the above tutorial.
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 07-14-2018 at 08:13 AM.
brainwreck is offline   Reply With Quote
Old 07-14-2018, 09:06 AM   #3
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by brainwreck View Post
On writing a script that will do what you want, you are looking to grab the incoming control change values of MIDI messages (passing everything else untouched), altering the values to your liking, and sending them on. But increasing the values via a simple multiplication won't work, because once you receive a value of 64 or higher, a simple multiplication is going to put the outgoing value outside of 0-127. For example, 67 (incoming) * 2 = 134 (outgoing). So you need to alter the curve of incoming values between minimum 0 and maximum 127. I'll leave that part for you to lookup. But everything you need to know about working with jsfx for scripting such a plugin should be covered in the above tutorial.
Thanks, I'll take a look.
But I think I need to clarify what I want to do. Relative mode is a setting in Reapers midi learn menu and in controller software. Relative mode means that the controller encoder will only send out two different midi values. One for each way you turn the knob. So if you turn it left it'll send out a midi value of 127 and if you turn it right it'll send out a value 1. Then Reapers translate the midi value of 127 to a parameter increment value of -1 and a midi value of 1 to and increment of +1 (127=-1, 1=+1). Relative mode is often present on controllers with endless encoders and prevents the parameters from jumping around, when you adjust the value.
What I want to change is how Reaper translate those two midi values, so instead of (127=-1 and 1=+1), it'll do (127=-2 and 1=+2) instead, thus making the parameter move faster, when turning the knob.

Last edited by Tiggerdyret; 07-14-2018 at 09:47 AM.
Tiggerdyret is offline   Reply With Quote
Old 07-14-2018, 11:34 AM   #4
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

If I'm reading that correctly, you should be able to 'learn' any cc controls that you create in a js effect to your hardware controller, with the effect merely altering the outgoing value by +/- 1. So you would need to create a jsfx control per MIDI hardware control.

And since you wouldn't be able to present the jsfx controls as hardware controls to effects/hardware coming later in the chain (unless someone else knows of a method for doing that), your created jsfx would need the ability to convert incoming cc #'s to whatever cc #'s are being expected by effects/hardware.

So yea, I think I see the underlying problem now. Ideally, you would be able to create a jsfx that would present itself to Reaper as a hardware controller so that you could 'learn' any synth parameters to the controls of the jsfx. Is that right?
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 07-14-2018, 12:03 PM   #5
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Thinking about it a little more, a jsfx should still be useful here. I mean, you would still be able to 'learn' a hardware control to a softsynth parameter in relative mode, and inserting a jsfx before the softsynth would still be able to alter the cc values being sent to the softsynth.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 07-14-2018, 12:21 PM   #6
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by brainwreck View Post
If I'm reading that correctly, you should be able to 'learn' any cc controls that you create in a js effect to your hardware controller, with the effect merely altering the outgoing value by +/- 1. So you would need to create a jsfx control per MIDI hardware control.

And since you wouldn't be able to present the jsfx controls as hardware controls to effects/hardware coming later in the chain (unless someone else knows of a method for doing that), your created jsfx would need the ability to convert incoming cc #'s to whatever cc #'s are being expected by effects/hardware.

So yea, I think I see the underlying problem now. Ideally, you would be able to create a jsfx that would present itself to Reaper as a hardware controller so that you could 'learn' any synth parameters to the controls of the jsfx. Is that right?
I don't know much about scripting or how Reaper works under the hood, but I don't think what I want to do is achievable with a JS plugin, because as I understand the Reaper midi chain looks like this:
Midi controller input > Midi controller output > JSFX (My plugin) > VST (EQ, comp, instrument) > midi learn relative mode (this is what I want to edit) > VST parameters.
So if I wanted to do this with a JSFX I'd probably have to code my own midi learn plugin. This would be a much harder task to program than what I am capable of or willing to invest in. It would also be more tedious to use as you'd have to add the fx to each instrument channel and maybe have to set it up multiple times.

On the other hand if I could get access to the Reaper's native midi learn code I think it would be as simple as copy pasting their script, change two numbers in that code and maybe script the menu layout. This is probably best suited as an entry in the Request forum.

Third option would be to make a Reascript, that could be used as a shortcut or a toolbar element and would change all relative mode output values for all midi learned parameters. This is probably the way to go.

I researched the subject a bit and realized I made a few errors on how relative mode works in my very first post. I think my last two posts or more correct, but the chain is based on assumption.

Last edited by Tiggerdyret; 07-14-2018 at 12:43 PM.
Tiggerdyret is offline   Reply With Quote
Old 07-14-2018, 03:11 PM   #7
snooks
Banned
 
Join Date: Sep 2015
Posts: 1,650
Default

You can do this with ReaLearn...

https://www.helgoboss.org/projects/realearn/

It has lots of options, including Step Size for relative control and limiting target parameter range. If you encounter something it doesn't do you can write a JS to put in front of it.
snooks is offline   Reply With Quote
Old 07-15-2018, 04:34 AM   #8
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Quote:
Originally Posted by snooks View Post
You can do this with ReaLearn...

https://www.helgoboss.org/projects/realearn/

It has lots of options, including Step Size for relative control and limiting target parameter range. If you encounter something it doesn't do you can write a JS to put in front of it.
That sounds like the best way to go to just get things done.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 07-15-2018, 04:54 AM   #9
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Quote:
Originally Posted by Tiggerdyret View Post
I don't know much about scripting or how Reaper works under the hood, but I don't think what I want to do is achievable with a JS plugin, because as I understand the Reaper midi chain looks like this:
Midi controller input > Midi controller output > JSFX (My plugin) > VST (EQ, comp, instrument) > midi learn relative mode (this is what I want to edit) > VST parameters.
So if I wanted to do this with a JSFX I'd probably have to code my own midi learn plugin. This would be a much harder task to program than what I am capable of or willing to invest in. It would also be more tedious to use as you'd have to add the fx to each instrument channel and maybe have to set it up multiple times.

On the other hand if I could get access to the Reaper's native midi learn code I think it would be as simple as copy pasting their script, change two numbers in that code and maybe script the menu layout. This is probably best suited as an entry in the Request forum.

Third option would be to make a Reascript, that could be used as a shortcut or a toolbar element and would change all relative mode output values for all midi learned parameters. This is probably the way to go.

I researched the subject a bit and realized I made a few errors on how relative mode works in my very first post. I think my last two posts or more correct, but the chain is based on assumption.
IF you wanted to diy via jsfx, I think it wouldn't be too much of a chore. But then again, I don't know anything about the workings of relative mode. And I have only just started with jsfx myself, so I could be looking at it from a naive perspective. But what I think is that you could use a jsfx to grab each CC# and it's values, +/- 1 each value according to what the previous value was, and compensate for the new +/- 2 value increments to stay within 0-127. And if you want separate increment settings per CC#, you would need to store those.

But if your priority is more about having something that just works, I would definitely just use what snooks mentioned above.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 07-15-2018, 07:54 AM   #10
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by snooks View Post
You can do this with ReaLearn...

https://www.helgoboss.org/projects/realearn/

It has lots of options, including Step Size for relative control and limiting target parameter range. If you encounter something it doesn't do you can write a JS to put in front of it.
Thanks man, didn't know it had this feature. It works like a charm, so won't have to do any scripting myself.
Tiggerdyret is offline   Reply With Quote
Old 07-15-2018, 07:56 AM   #11
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by brainwreck View Post
IF you wanted to diy via jsfx, I think it wouldn't be too much of a chore. But then again, I don't know anything about the workings of relative mode. And I have only just started with jsfx myself, so I could be looking at it from a naive perspective. But what I think is that you could use a jsfx to grab each CC# and it's values, +/- 1 each value according to what the previous value was, and compensate for the new +/- 2 value increments to stay within 0-127. And if you want separate increment settings per CC#, you would need to store those.

But if your priority is more about having something that just works, I would definitely just use what snooks mentioned above.
Realearn is better than anything I could have made and it does the job as best as I could have hoped and then some.

Thanks for the help though

Cheers
Ketil
Tiggerdyret is offline   Reply With Quote
Old 07-15-2018, 08:30 AM   #12
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
What I want to do is change the turn speed for some of the parameters, when controlling a parameter with a midi controller in relative CC mode, which is often too slow to feel like an actual analogue knob.
Have you (or is it possible) to change the behavior of the controller knobs themselves in the controller's deep menu? Seems like this is what I've had to do in the past to get an endless controller to act like a real knob. FWIW, I built a small controller earlier this year and I have no issues with my knobs acting exactly (1:1) like analog knobs in Reaper - which proves it can be done on the controller, if the controller offers adjusting of the relative/absolute modes. Otherwise, all this work is compensating for what is coming from the controller which might be able to be adjusted at the controller as a one-time fix IME.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 07-15-2018, 09:45 AM   #13
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by karbomusic View Post
Have you (or is it possible) to change the behavior of the controller knobs themselves in the controller's deep menu? Seems like this is what I've had to do in the past to get an endless controller to act like a real knob. FWIW, I built a small controller earlier this year and I have no issues with my knobs acting exactly (1:1) like analog knobs in Reaper - which proves it can be done on the controller, if the controller offers adjusting of the relative/absolute modes. Otherwise, all this work is compensating for what is coming from the controller which might be able to be adjusted at the controller as a one-time fix IME.
Realearn allows me to do everything I wanted to
Tiggerdyret is offline   Reply With Quote
Old 07-15-2018, 10:04 AM   #14
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by Tiggerdyret View Post
Realearn allows me to do everything I wanted to
I'm glad it works but in my case, it's just extra processing that doesn't need to happen. My controller already has linear/slow/fast etc. and removes plugins out of the equation altogether.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 07-15-2018, 10:51 AM   #15
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by karbomusic View Post
I'm glad it works but in my case, it's just extra processing that doesn't need to happen. My controller already has linear/slow/fast etc. and removes plugins out of the equation altogether.
Sure, the knobs might feel a bit sluggish (I'll have to test it more thouroughly), but it doesn't bother me. Maybe it would for live use. The plugin is on the input channel and I have just saved the track as a template, so after the initial setup I don't really pay attention to it.
I also run on a high-end I7 desktop PC build for gaming VR and use a RME Babyface interface, so I never really have any issues with lack of processing power. Even on 100+ tracks with loads of heavy plugins and no attention paid to resource management is still don't feel any limitations.

What controller are you using?
Tiggerdyret is offline   Reply With Quote
Old 07-15-2018, 11:08 AM   #16
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

This kind of processing shouldn't cause any sort of cpu performance issues or adding any latency over what is already there. It should be using an inperceptible amount of cpu and be happening within the already existing block size.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 07-15-2018, 12:27 PM   #17
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by brainwreck View Post
This kind of processing shouldn't cause any sort of cpu performance issues or adding any latency over what is already there. It should be using an inperceptible amount of cpu and be happening within the already existing block size.
You are probably right.
Tiggerdyret is offline   Reply With Quote
Old 07-15-2018, 03:02 PM   #18
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by Tiggerdyret View Post
Sure, the knobs might feel a bit sluggish (I'll have to test it more thouroughly), but it doesn't bother me. Maybe it would for live use. The plugin is on the input channel and I have just saved the track as a template, so after the initial setup I don't really pay attention to it.
I also run on a high-end I7 desktop PC build for gaming VR and use a RME Babyface interface, so I never really have any issues with lack of processing power. Even on 100+ tracks with loads of heavy plugins and no attention paid to resource management is still don't feel any limitations.

What controller are you using?
I'm not saying it must be done at the controller, just noting that sometimes such issues are just a matter of fixing it there, removing the extras of dealing with a plugin etc. - It peaked my interest because I forgot that the controllers often have tweaks for such reasons and I've seen few similar threads here and there.

Can't guarantee it will help but I know I did some encoder settings in an old M-Audio Axiom 49 a few years back but the one I just checked today was my Nektar P6. Also, note most of the encoder issues I've had with production controllers is getting Reaper's CC based scroll/zoom actions to work well with them, not as much with just turning a knob to control a plugin IIRC.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 07-16-2018, 11:55 PM   #19
Tiggerdyret
Human being with feelings
 
Join Date: Jan 2016
Posts: 428
Default

Quote:
Originally Posted by karbomusic View Post
I'm not saying it must be done at the controller, just noting that sometimes such issues are just a matter of fixing it there, removing the extras of dealing with a plugin etc. - It peaked my interest because I forgot that the controllers often have tweaks for such reasons and I've seen few similar threads here and there.

Can't guarantee it will help but I know I did some encoder settings in an old M-Audio Axiom 49 a few years back but the one I just checked today was my Nektar P6. Also, note most of the encoder issues I've had with production controllers is getting Reaper's CC based scroll/zoom actions to work well with them, not as much with just turning a knob to control a plugin IIRC.
Yeah, I did take a look at the controllers, but I couldn't find these features in any of them.
Tiggerdyret is offline   Reply With Quote
Old 03-15-2020, 04:07 PM   #20
mks
Human being with feelings
 
Join Date: Dec 2011
Posts: 171
Default

Any chance this has been improved upon or a solution found? Realearn is lovely, but I'd like to make the built-in functionality work. Knobs work, but are VERY slow to input. Not to mention that Realearn seems to have trouble with encoder input.
mks is offline   Reply With Quote
Old 06-28-2020, 01:08 AM   #21
frankx86
Human being with feelings
 
Join Date: Feb 2020
Posts: 1
Default

... in Logic I use the values ​​-0.1 or -0.01 in relative mode for maximum precision

reaper should give the possibility to modify the cc values (like Logic Pro x controller Assigments)

Ciao.
frankx86 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:17 PM.


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