View Single Post
Old 02-17-2012, 03:55 PM   #94
Human being with feelings
Anton9's Avatar
Join Date: Jun 2009
Location: Earth
Posts: 1,334


I'm not sure what device or software you are sending from, but I'll try and help you a little bit using GlovePie as an example.

If your sending to REAPER make sure your hardware or software send port matches REAPER's "Receive on port"

If your sending from another application on the same computer you will set it's Device IP to
If your sending from an external device or another computer then on that device or computer you would set Device IP to the one listed in REAPER's Control Surface Settings dialog in the Host IP field.

If your just going to be controlling REAPER and don't need any feedback on the device doing the controlling then you can leave "Send to port" un-ticked.

Let's start with the default config. that REAPER creates.
In there you'll find this line for FX parameter control.
FX_PARAM_VALUE /fxparam/@/value /fx/@/fxparam/@/value /track/@/fx/@/fxparam/@/value

This first part "FX_PARAM_VALUE" is just a description, you need not concern your self with this when sending to REAPER.

Next you have the pattern "/fxparam/@/value" The '@' is just a wild card that REAPER uses to say hey shouldn't there be a number here? So when you send this command to REAPER it would look like this instead "/fxparam/3/value" which will control parameter #3 of the first FX in the Master Trk.

Next you have "/fx/@/fxparam/@/value" If you send "fx/2/fxparam/3/value"
this will control parameter #3 of the second FX in the chain on the Master Trk.

Next you have "/track/@/fx/@/fxparam/@/value" which is the one you'll probably use most often. If you send "/track/5/fx/2/fxparam/3/value" it will control parameter #3 of the second FX in the chain on Trk. 5.

Here is an example script that I used in GlovePIE to control parameter #3 of the first FX in the chain on track 1.

Osc1.port = 8000

Because it's on the same machine as REAPER I use ""
Some software allows you to substitute "localhost" so the message could look like this instead.

Osc1.port = 8000

After "localhost" is Osc1.port this is just a variable which was set using Osc1.port = 8000 The message could vary well read SendOsc("localhost",8000,"/track/1/fx/1/fxparam/3/value",0.5)

Then comes the message that I'm sending "/track/1/fx/1/fxparam/3/value"
followed by the value that I'm setting it to.

Now for some info on the "value"..., in some software and on some devices that use a slider the range may already be preset. With GlovePIE it is not although I could write some code that would set a range and then assign it to a variable. So instead of /value",0.5 it might read /value",var.x)

For most software/hardware controllers the math is pre-programmed so you shouldn't have to deal with it.

In cases where you specify the value yourself the important thing to remember is that VSTs expect a "normalized" value, that is a value which is between 0 and 1. To find the smallest increment value you divide 1 by the total amount of increments. So for a moment let's take MIDI as an example. If your using a fader on a MIDI device to control a parameter and your just using the course range.., that is 0-127(128 values) you would divide 1 by 128 which gives you the smallest increment of 0.0078125. Now times this by 64 which is the mid point on a course MIDI knob.., and you get 0.5(0.5 is the mid point between 0 and 1 so hopefully you now get an idea of how this works). If you where instead using the "fine" range of a MIDI control you would divide 1 by 256.

Now back to OSC.., because OSC uses 32bit(-2147483648 to 2147483647)you have a much wider range than that of MIDIs 8bits(-128 to 127). You are very unlikely to come across an FX parameter that uses the full range. More than likely they will be 8bit(-128 to 127) - 16bit(−32768 to 32767).

Now back to REAPER's default config. You'll notice the description FX_PARAM_VALUE_STRING followed by these patterns /fxparam/@/paramval /fx/@/fxparam/@/paramval /track/@/fx/@/fxparam/@/paramval
These are string patterns which are related to the values you see in a plugins GUI.., for example "33.3%" or "160.0ms".., etc.

I don't believe VSTs respond to incoming strings so these would be for outgoing purpose only.(devs please correct me if I'm wrong)

To control REAPERS actions you just send for example /action/40001
Or with the new feature found in the "Controller Surface Settings" dialog labeled "Allow binding messages to REAPER actions". If you enable it, this is how it works.., First from your controller assign this pattern "/action/blahblah (blahblah being anything you want). Now open the Actions dialog and under "Shortcuts for selected action" click "Add" then wiggle your controller and you should see "action/blahblah" appear in the Shortcut field.

If you want a nice little free software to experiment with sending OSC to REAPER I would recommend this.
To set it up for use on the same computer as REAPER set IP Address: to set Port to match REAPER's "Receive on port" then in one of the OSC Address fields put one of the patterns and move a slider.
To see if REAPER is receiving the messages open the Listener in the "Controller Surface Settings" dialog and move slider.
Anton9 is offline   Reply With Quote