Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 01-11-2012, 04:04 PM   #1
bang
Human being with feelings
 
bang's Avatar
 
Join Date: Jul 2006
Posts: 626
Default high resolution MIDI automation using pitch bend and parameter linking

[update: it is simpler than this. see addenda in this comment below.]

over on KVR we were discussing the limits of modulating high resolution effects parameters with low resolution MIDI controls. this came up in the context of a user expressing frustration with modulating the Decay time of Sean Costello's extremely cool ValhallaRoom reverb plug-in with a low resolution standard MIDI control. i came up with a way of mapping a standard MIDI control to a limited range of the much higher resolution Pitch bend control to work around this limitation. at Sean's request, here is a tutorial on how to do scaled mapping of a standard midi controller to pitch bend in Reaper for high resolution control of Decay and other large range effects parameters:

the basic technique is fairly simple: use Reaper's parameter modulation facility in the ReaControlMIDI to scale pitch bend based on another midi controller.

here is an example image i will refer to in the instructions below:



- insert a new track. in the example this track is named "hires mod".

- right click on the track Record button and under Input: MIDI enable the MIDI device for this track which will send the desired standard MIDI control (e.g. CC 1). turn track Record Monitoring ON, and arm the track for recording. we can Record: disable the track if we don't want to actually record its MIDI input.

- add ValhallaRoom and ReaControlMIDI to this track's effects. the order is not significant.

- in ReaControlMIDI, check Enable in the Control Change area. ensure that Pitch Wheel is selected for one of the controls, and select your desired source control in another dropdown. in the example i use CC 1 (Mod Wheel) in the last control.

- now move the Pitch Wheel slider, and then click Param at the top of the vst window and select "Parameter Modulation". this brings up a Parameter Modulation dialog for the Pitch Wheel control.

- check "Enable parameter modulation" and "Link from parameter"

- click the dropdown button below Link from parameter, select "(self): ReaControlMIDI", and in the submenu select your source control - e.g. "CC 1 (Mod Wheel)". now the Pitch Wheel control is linked to your source control, based on the baseline value, Offset and Scale sliders.

- in the example, baseline and offset are 0 and scale is 2%. so the full 127 value range of the standard CC 1 Mod Wheel control drives the high resolution Pitch control through the lowest 2% of it's range. if we drag the CC 1 slider, or send CC 1 from a MIDI controller, the Pitch Wheel slider should change between it's minimum of -8192 and -7865. when Pitch is used to control the VRoom Decay parameter there will be 127 steps to cover 2% of the 100 second range, or about 0.016 seconds per step.

so far so good. but there is a difficulty in the way Reaper handles MIDI automation. the normal method is to move the effect parameter we wish to automate via MIDI, click the Param button and select Learn in the dropdown. then moving the desired MIDI controller registers in the Learn dialog. however, MIDI input to Reaper's automation system is completely separate from MIDI data in tracks. automation MIDI comes directly from MIDI devices which have checked "Enable input for control messages" in the Reaper MIDI Devices preferences. "normal" track MIDI, including the output from the ReaControlMIDI plug-in, will not usually register in the Param > Learn dialog.

one solution is to use Parameter modulation with "Link from parameter" again, this time to modulate the effect parameter which requires high resolution control. in our example this is the Decay parameter of ValhallaRoom:

- in ValhallaRoom, move the Decay slider. then click Param at the top of the window and select "Parameter Modulation". this brings up a Parameter Modulation dialog for the Decay parameter.

- check "Enable parameter modulation" and "Link from parameter"

- click the dropdown button below Link from parameter, this time select "ReaControlMIDI", and in the submenu select the "Pitch Wheel" control. the default values for baseline (0: far left), Offset (0%) and Scale (+100%) are appropriate: the full range of the high resolution Pitch Wheel control will be mapped to the full range of the Decay parameter.

- it is also likely a good idea back in the ReaControlMIDI dialog to click the MIDI button at top, select "MIDI output", and "Disable" in the submenu. this prevents the scaled Pitch Wheel output from being added to the normal track MIDI.

now the ValhallaRoom Decay parameter is controlled by the Pitch Wheel value in ReaControlMIDI, which is in turn controlled by the scaled value of the ReaControlMIDI CC 1 (Mod Wheel) control. moving the CC 1 slider through its full range drives the Pitch Wheel control through the first 2% of its range, which changes the ValhallaRoom Decay parameter from 0.10 to 2.09 seconds in ~0.016 second steps as desired.

hope all this helps. i'm happy to answer questions.

enjoy! /dan

ps- while writing this tutorial, i was aware that ReaControlMIDI is only one possibility for preprocessing MIDI automation in Reaper. one of my favorite things about Reaper is Jesusonic, which makes amazing kinds of custom MIDI & audio processing possible. thinking about other ways to deal with low resolution MIDI controllers inspired me to code a JS plug-in to do MIDI CC mapping with a smooth glide option. this lets you use a standard MIDI controller to drive a high-resolution controller without the 128 step quantization. the trade off, as with glide/lag systems generally, is the lag: there is a delay from changing the parameter to when it takes full effect. also, a particular lag time may work in one situation but not another. still, this seems potentially useful. this plug-in can send high resolution input to ReaControlMIDI, which can then smoothly automate effects parameters using a variation on the technique described in this tutorial. it is very fresh code and needs some testing before i post a download link. but if anyone would like to check it out you can PM me.


Last edited by bang; 01-12-2012 at 02:45 AM. Reason: updated with link to simpler technique
bang is offline   Reply With Quote
Old 01-11-2012, 06:23 PM   #2
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Nice tip.

Perhaps an easier way or rather alternative way would be:
If you want to modulate FX parameters with high resolution you could also use Padre's LFO Generator and set the "Target" parameter to Selected Track Envelope. Set "Frequency" to <sync off> and use the Hz field. Set "Hz" to 0.100

Last edited by Anton9; 01-11-2012 at 06:49 PM.
Anton9 is offline   Reply With Quote
Old 01-11-2012, 06:55 PM   #3
bang
Human being with feelings
 
bang's Avatar
 
Join Date: Jul 2006
Posts: 626
Default credits

i was remiss in not crediting several others for ideas and discussion that contributed to this technique. Jeffos MIDItoReaControlPath is a Windows alternative to using Parameter linking for controlling the effect parameters from track MIDI. gofer pointed to a custom JS script by reddiesel41264 which works like ReaControlMIDI for Parameter linking which gave me the idea. and gofer credits Whatsup with coming up with the original idea to use Parameter linking this way.
bang is offline   Reply With Quote
Old 01-11-2012, 07:02 PM   #4
bang
Human being with feelings
 
bang's Avatar
 
Join Date: Jul 2006
Posts: 626
Default

Quote:
Originally Posted by Anton9 View Post
Perhaps an easier way or rather alternative way would be:
If you want to modulate FX parameters with high resolution you could also use Padre's LFO Generator and set the "Target" parameter to Selected Track Envelope. Set "Frequency" to <sync off> and use the Hz field. Set "Hz" to 0.100
i know envelope automation is high resolution generally. the technique i describe is to map a low resolution MIDI input in real time for high resolution control of a small range of the target effect parameter. i don't have the SWS extensions installed here. can Padre's LFO Generator do this sort of live mapping?
bang is offline   Reply With Quote
Old 01-11-2012, 10:14 PM   #5
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

No it just generates an envelope, it can also generate a MIDI CC envelope.

What I can't wait for is OSC support, then some really cool "live" style modulations using NI's Reaktor or using a Wiimote controller in conjunction with the software GlovePie will be possible at a very high resolution.
Anton9 is offline   Reply With Quote
Old 01-12-2012, 02:36 AM   #6
bang
Human being with feelings
 
bang's Avatar
 
Join Date: Jul 2006
Posts: 626
Default simpler than i thought...

foo. i just realized that for the specific purpose of controlling a limited range of some effect parameter from a standard MIDI control we don't need to use pitch bend at all. simply using Parameter modulation to Link from the standard MIDI control in ReaControlMIDI with a small Scale amount will do the trick. so my tutorial example becomes:

- move the ValhallaRoom Decay slider

- click Param at the top of the window and select "Parameter Modulation" to brings up the Parameter Modulation dialog for the Decay parameter.

- check "Enable parameter modulation" and "Link from parameter"

- click the dropdown button below Link from parameter, select "ReaControlMIDI", and in the submenu just select the standard MIDI controller.

- now set the baseline, Offset and Scale values as we did for the Pitch Wheel above: baseline and Offset are zero and Scale is 2%.

this has the desired effect: moving the standard MIDI controller through its full range changes the Decay parameter through a limited range in small steps. here is an example image:



the original method still has value for automating Decay with high resolution where the full range of Decay is needed. for example, the smooth CC mapper JS plugin i wrote can use the finer resolution of pitch bend to glide between the coarser steps of it's standard MIDI input control. and any algorithmic MIDI processing which uses high resolution control over the full range of effect parameters will benefit.

simpler is better. but simpler the first time would have been better than that. oh well.

enjoy! /dan
bang is offline   Reply With Quote
Old 05-23-2013, 05:47 AM   #7
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by bang View Post
i was remiss in not crediting several others for ideas and discussion that contributed to this technique. Jeffos MIDItoReaControlPath is a Windows alternative to using Parameter linking for controlling the effect parameters from track MIDI. gofer pointed to a custom JS script by reddiesel41264 which works like ReaControlMIDI for Parameter linking which gave me the idea. and gofer credits Whatsup with coming up with the original idea to use Parameter linking this way.
Chain of dependencies.
TonE is offline   Reply With Quote
Old 05-23-2013, 05:54 AM   #8
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by bang View Post
foo. i just realized that for the specific purpose of controlling a limited range of some effect parameter from a standard MIDI control we don't need to use pitch bend at all. simply using Parameter modulation to Link from the standard MIDI control in ReaControlMIDI with a small Scale amount will do the trick.
Seems to be Reapers hidden min-max feature for external cc control? You can not have it directly, but as a two step process:

1. Add ReaControlMIDI
2. Do parameter linking

So what is necessary is you need this 1440 times?
TonE is offline   Reply With Quote
Old 10-03-2020, 11:09 PM   #9
PdxLuke
Human being with feelings
 
Join Date: Feb 2019
Posts: 27
Default

This is exactly what I needed! Thank you! I wanted to control the delay time of ReaDelay with a fader on my MIDI keyboard but it's pretty hard to control a range of 0 to 10 seconds of delay time with a low resolution CC, heh. Now I can limit it to 500 ms and dial in the smaller delay times I'm interested in. It does seem a shame they can't just integrate this concept into the parameter learn dialog box. Just literally give us one additional textbox where we can specify a ratio or limit. I'm sure it's not quite that easy or they'd have done it by now... but it would be so very helpful. Until then, this workaround is great. Thanks again!
PdxLuke is offline   Reply With Quote
Old 10-04-2020, 05:03 AM   #10
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

Quote:
Originally Posted by PdxLuke View Post
...specify a ratio or limit...
see ReaPack -> "Midi Convert to CC" or "Midi Mapper X". But both not high resolution yet .

-Michael
mschnell 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:48 AM.


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