Go Back   Cockos Incorporated Forums > REAPER Forums > MIDI Hardware, Control Surfaces, and OSC

Reply
 
Thread Tools Display Modes
Old 02-18-2012, 03:08 PM   #1
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default Remote MIDI controllers and parameter feedback (via OSC/Pd)

With the OSC support for remote controller surfaces included in recent pre-release builds, we can now also hook up remote controllers using MIDI bi-directionally, via OSC and a round of OSC to MIDI / MIDI to OSC conversion. Doing so is useful, since it enables parameter feedback, meaning that regardless of whether one changes a parameter value in REAPER or on the remote controller, the value gets updated in both places. For controllers like the Behringer BCR-2000, this also means that LEDs on the controller reflecting current values are correctly updated.

Attached is a proof-of-concept patch (inspired by a similar patch for Max by Spyrow, kudos!) using Pure data (extended) (free, click for download links).

This simple example links the first 8 parameters of the effect in the 1st slot of track 1 to a MIDI controller, using CC# 1 thru 8, all on MIDI channel 1. I used a Behringer BCR-2000, but any other MIDI controller should do just fine as well.

In REAPER, set up a control surface using OSC, with a config file containing the following line:
Code:
FX_PARAM_VALUE /track/@/fx/@/fxparam/@/value
Both send and receive should be enabled (enable both checkboxes), "Device IP" should be 127.0.0.1 or localhost (assuming we run Pure data on the same computer). The default port numbers (8000 and 9000) are usually just fine.



In Pure data, go to Preferences > MIDI settings to select the MIDI port that your controller connects to, both (!) for input and output.



Set up your MIDI controller so that it has faders or rotary controllers for MIDI CC 1 thru 8, all on MIDI channel 1 (or change the Pd patch accordingly, which should be easy enough to do).

In Pure data, load the patch "OSC-MIDI-conversion.pd" (attached), and click the most top-left button to connect the UDP port (you can verify it worked in Pure data's console window, which should say "udpsend: connecting to port 8000" assuming you are using port 8000).



In REAPER, insert an effect on effect slot 1 of track 1. Any plugin (effect/instrument; VST/AU/JS) should do. To identify which are the first 8 parameters, it can be handy to click the UI button (top right) to show the generic UI; so we can instantly see which 8 parameters come first.

Now test it: change the values of parameters 1 thru 8 in REAPER and on the MIDI controller, while Pure data can be used to verify connections and display current values.
Attached Images
File Type: jpg REAPERv4.16pre18_OSC_config-FX_param_val.jpg (64.0 KB, 10579 views)
File Type: jpg OSC-MIDI-conversion.jpg (67.9 KB, 10608 views)
File Type: png Pd-MIDI-preferences.png (19.7 KB, 9856 views)
Attached Files
File Type: zip OSC-MIDI-conversion.pd.zip (2.0 KB, 1619 views)
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 02-18-2012, 03:21 PM   #2
strinxx
Human being with feelings
 
strinxx's Avatar
 
Join Date: Jun 2009
Posts: 300
Default

Now this sounds interesting!
Does this mean this is going to work for ANY Midi-Controller, like Steinberg Houston, CM-Labs Motormix... and such?
That'd be totally cool and would make a few boys and girls out there pretty happy, I guess...

Where would I find some more Information about OSC, and how this stuff works in general?

Thanks so much for this!
strinxx is offline   Reply With Quote
Old 02-18-2012, 03:42 PM   #3
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by strinxx View Post
Now this sounds interesting!
Does this mean this is going to work for ANY Midi-Controller, like Steinberg Houston, CM-Labs Motormix... and such?
Yes. (In fact, those all sound like 'fancy', expansive ones that also support protocols other than plain old MIDI, while this should already work just fine for the oldest, simplest, cheapest MIDI gear you can find. )
Quote:
That'd be totally cool and would make a few boys and girls out there pretty happy, I guess...

Where would I find some more Information about OSC, and how this stuff works in general
There have been some links and tidbits posted in the OSC FR/bug thread and in the pre-release threads since v4.16pre16, but other than the OSC website, I'd just use Google, Wikipedia etc., there's plenty of great info out there.

For the OSC implementation specific to REAPER, you can study the default OSC config file ("default.ReaperOsc"). It shows plenty of interesting things REAPER can do; my example *only* uses one particular example. By changing the type of messages in the config file and the Pd patch, one can for example make the controllers target the currently focused effect instead.
Quote:
Thanks so much for this!
You're welcome. The real important work here was done by schwa though, adding OSC support for control surfaces in REAPER.

And hopefully we will also get similar support for plain old MIDI one day, so that we do not need silly workarounds such as this one anymore.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ

Last edited by Banned; 02-18-2012 at 04:04 PM. Reason: added info re: default.ReaperOsc
Banned is offline   Reply With Quote
Old 02-18-2012, 05:24 PM   #4
recccp
Human being with feelings
 
recccp's Avatar
 
Join Date: Sep 2009
Posts: 43
Default

Thank you for this!

Works fine with bcr.

However, I modified it to control focused fx.

FOCUSED_FX_PARAM_VALUE /focfx/fxparam/@/value

Now, the feedback part works fine (fx parameter -> pd -> bcr), also by switching between fx's bcr catch up the values fine.
But can't control fx params with bcr.
I don't know if its a bug, or I made something wrong...
by pressing "Listen" reaper shows the incoming messages (/focfx/fxparam/1/value [f] 0.149606)
Could you please check this?!

Thanks again for this patch!
recccp is offline   Reply With Quote
Old 02-18-2012, 05:50 PM   #5
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by recccp View Post
Thank you for this!

Works fine with bcr.

However, I modified it to control focused fx.

FOCUSED_FX_PARAM_VALUE /focfx/fxparam/@/value

Now, the feedback part works fine (fx parameter -> pd -> bcr), also by switching between fx's bcr catch up the values fine.
But can't control fx params with bcr.
I don't know if its a bug, or I made something wrong...
by pressing "Listen" reaper shows the incoming messages (/focfx/fxparam/1/value [f] 0.149606)
Could you please check this?!

Thanks again for this patch!
It is very much intended as an example to modify yourself indeed. So thank you for doing so!

Unfortunately, I get the same disappointing result you did: the listen view shows the messages, and they seem to be formatted correctly, but they do not update (I did like seeing the LEDs update as soon as you switch focus to another plugin, neat eh? ). It may very well be a little bug in the OSC support, which is being developed as we speak (my example is only working since the latest release as well). Exactly the reason why this post is in the pre-release forum, for now at least.

Btw, I'll post a cleaner example patch later. Less instructive perhaps, but hopefully better for modding and expanding (things can quickly get messy in Pd, especially if you don't tidy up).
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 02-18-2012, 06:13 PM   #6
recccp
Human being with feelings
 
recccp's Avatar
 
Join Date: Sep 2009
Posts: 43
Default

Thank you for your feedback!

Cant wait to see this fixed

FR for the upcoming patch
Is it possible in pd to add textbox's that shows the current fx name and param names?
recccp is offline   Reply With Quote
Old 02-18-2012, 06:16 PM   #7
XITE-1/4LIVE
Human being with feelings
 
XITE-1/4LIVE's Avatar
 
Join Date: Nov 2008
Location: Somewhere Between 120 and 150 BPM
Posts: 7,968
Default

This is great news. I am deciding what controller I should get.
Lemur, Ohm, etc.
Do you have any suggestions on which surface would be bes suited for the OSC-MIDI stuff....?

Thanks Again for your discoveries...
__________________
.
XITE-1/4LIVE is offline   Reply With Quote
Old 03-16-2012, 03:27 AM   #8
ivansc
Human being with feelings
 
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 22,754
Default

Quote:
Originally Posted by Banned View Post
With the OSC support for remote controller surfaces included in recent pre-release builds, we can now also hook up remote controllers using MIDI bi-directionally

Oh-KAY!

Now that I can see having all kinds of practical uses.

Why did I sell my BCF2000, etc...????
ivansc is offline   Reply With Quote
Old 03-16-2012, 04:25 AM   #9
Snobe
Human being with feelings
 
Join Date: Mar 2012
Posts: 7
Default

Banned, I haven't seen that video you posted, thanks. Is the PD patch that is used in that video available for download?
I tried PD+OSC yesterday for the first time, I've been doing some basic coding in the past (nothing related to music), but at first glance, I admit don't really know how to build patches like yours..

I would really like to try to create some custom patches on my own, but I don't know how to do it yet, guess I will have to learn all this stuff, until we get some simple tool for this OSC stuff.

I will try other patches you posted today, hopefully I will be able to make some use of the BCR + duende channel strip
Snobe is offline   Reply With Quote
Old 03-16-2012, 08:32 PM   #10
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by ivansc View Post
Oh-KAY!

Now that I can see having all kinds of practical uses.
Awesome!

Quote:
Originally Posted by ivansc View Post
Why did I sell my BCF2000, etc...????
Yeah, too bad you got rid of the BCF - even though the faders are a bit noisy, it can be incredibly useful. I lost a Yamaha ProMix 01 myself a year ago, that I only used for its motorized faders. Bummer. Will definitely keep an eye out for a second hand BCF now.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 04-15-2012, 05:24 PM   #11
rstpierre
Human being with feelings
 
Join Date: Jan 2007
Posts: 41
Default

Hi,

Please help!

I also have a BCR-2000 Controler and I really want to get the MIDI feedback thing going with it. I was really excited when I saw this thread, but all the explanations seem over my head. I keep checking it to see if someone posts a step by step tutorial for this. It seems I have to download another program (PureData) and do something with that. I am not a computer programmer and I don't have to time to invest in learn to do that right now.

Is anybody willing to to walk me (and others)through this?

rod
rstpierre is offline   Reply With Quote
Old 04-15-2012, 11:06 PM   #12
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by rstpierre View Post
[...] I also have a BCR-2000 Controler and I really want to get the MIDI feedback thing going with it. I was really excited when I saw this thread, but all the explanations seem over my head. I keep checking it to see if someone posts a step by step tutorial for this.
I will post some more simple tutorials when I get around to it - I'm just a bit too busy for that lately. But it is not going to get that much simpler, only more modular.

Btw, I did just post a little example here that could also be helpful to get started. Not for MIDI / feedback though.
Quote:
Originally Posted by rstpierre View Post
It seems I have to download another program (PureData) and do something with that. I am not a computer programmer and I don't have to time to invest in learn to do that right now. [...]
Me neither.

Seriously, this is really only as much 'programming' as creating a composition using MIDI or creating a patch for a modular synthesizer is 'programming'. I'm not writing code, not even scripting. I'm basically just patching virtual cables between simple functions such as add and multiply - any electronic musician should understand how that works. It just becomes complex because we want to do complex things. It's not the patching that makes it difficult, it's formulating *exactly* how you want controls to function, and how you want them laid out. That takes much more time and thought than actually patching it.

For example, today I have spent several hours experimenting with different acceleration values for the BCR-2000 rotary encoders in 14 bit mode, until they felt right to me. I ended up with this:
Code:
.resolution 96 12288 12288 18432
That took about an hour per value, half a working day for a short line of 'code', if that's what you want to call it. No programming required at all, just tweaking knobs with many different combinations of values. The actual 'programming' after I was done looking for suitable values: one search/replace action on a SysEx file, took about 15 seconds to open the file, change it, save it and transmit it to the BCR-2000.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 07-13-2012, 05:17 AM   #13
Reaktor:[Dave]
Human being with feelings
 
Reaktor:[Dave]'s Avatar
 
Join Date: Jun 2010
Location: Berlin
Posts: 563
Default

Parameter feedback with any midi device? Also with the novation remote zero sl mk2? Would I be able to have Reaper sent the parameters names and values of any currently focused plugin to the display and knobs assigned to them? Maybe even switch to the next 8 parameters? Without Automap, of course ...
Reaktor:[Dave] is offline   Reply With Quote
Old 05-21-2013, 01:49 AM   #14
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Reaktor:[Dave] View Post
Parameter feedback with any midi device? Also with the novation remote zero sl mk2? Would I be able to have Reaper sent the parameters names and values of any currently focused plugin to the display and knobs assigned to them? Maybe even switch to the next 8 parameters? Without Automap, of course ...
I'd think so, yes. I haven't used that device before, and am not familiar with how it displays parameter names, but typically such things are done via SysEx, using the ascii format for text characters. So I'm pretty sure it can all be done; what you describe all works pretty well here. I only use a second screen standing behind my controller to display things like parameter names and 'normalized' parameter values (e.g. '303.808 Hz') because the MIDI controllers I currently have aren't quite cool enough to have proper (dual) text displays for individual controls/parameters. Switching parameters in banks still annoys me though, because we're not able to easily redefine the order or parameters. That can especially be uncomfortable when the order does not suit your preferences and/or when you use plug-ins with very large numbers of parameters.

Apologies for the late reply, btw.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned 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 09:53 PM.


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