Old 10-09-2014, 06:38 AM   #1
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 92
Default FX parameter control via OSC

Hi,

This is a continuation of a thread started in another topic: http://forum.cockos.com/showpost.php...&postcount=118.

What I want to do is use a BCR2000 to control the parameters of multiple FX for the currently selected track in Reaper.
The idea is to use an oscii-bot script to map statically assigned Midi CC's on the BCR to OSC strings in a tailored .ReaperOSC file. In this way the encoders/buttons on the BCR will always have the same function for every track, allowing for static labels on the BCR (e.g. top row is always EQ).

What I want to achieve is that when I select a different track in Reaper, all parameters of all the FX on the track are sent via OSC to oscii-bot. The oscii-bot script will then take care of a FX name/parameter to Midi CC mapping. So it does not matter in which FX slot a VST sits, e.g. ReaComp will always map to the same encoders on the BCR, whether it sits in slot 1 on track 5 or slot 6 on track 1.

I have been experimenting a lot with various .ReaperOSC files, but keep running into stuff that does not work.

The greatest challenge seems to be to get Reaper to send all parameters for all FX when a different track is selected.

I think it has to do with my limited understanding of how Reaper handles track and FX banks.

My thinking was:

I only need to work on the current track, so my track bank size is 1.
I want to handle all FX and FX parameters, so these banks are infinite. For practical reasons, 16 FX and 32 parameters would be big enough for the time being.

So, I defined:

Code:
DEVICE_TRACK_COUNT 1
DEVICE_FX_COUNT 16
DEVICE_FX_PARAM_COUNT 32
DEVICE_FX_INST_PARAM_COUNT 32

DEVICE_TRACK_BANK_FOLLOWS MIXER
DEVICE_TRACK_FOLLOWS LAST_TOUCHED

TRACK_NAME s/track/@/name
TRACK_NUMBER s/track/@/number/str

FX_NAME s/fx/@/name

FX_PARAM_NAME  s/fx/@/fxparam/@/name
FX_PARAM_VALUE s/fx/@/fxparam/@/value/str
FX_PARAM_VALUE n/fx/@/fxparam/@/value
I expected Reaper to send the names and values of all the FX and FX parameters upon track change: the new track is always outside the current bank of the device (track bank size is 1) and the FX bank has space for data from multiple FX and FX parameters.
But it doesn't work, Reaper does not send any FX parameters at all.

User Banned answered the following in the other topic before I split it off:
Quote:
Originally Posted by Banned View Post
Haven't replicated your setup (not in studio atm), but it seems that you have to include the track number in your message patterns - even though you only use a single track per bank - if you want the current effect selection to update when switching *tracks* (as opposed to switching *effects*).
Any thoughts on how to get this working are most welcome!

Thanks,
Dixo
dixo is offline   Reply With Quote
Old 10-09-2014, 07:10 AM   #2
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

I think the main issue with your current setup is that you're not *selecting* any effect, thus REAPER isn't sending any effect parameters.

To see how this works, perhaps try using this in your .ReaperOSC file:
Code:
DEVICE_FX_FOLLOWS FOCUSED
Then open a few effects, and change focus between their UI windows to see if REAPER now does send their parameter names and values?
Quote:
Originally Posted by dixo View Post
I want to handle all FX and FX parameters, so these banks are infinite. For practical reasons, 16 FX and 32 parameters would be big enough for the time being.
Infinity is too hard to handle, unfortunately. Nor does REAPER report the number of effects / parameters, so you'll have to check (manually or programmatically) what the highest numbers are that you'll need to set for effect / parameter bank sizes. In some cases - say, a REAKTOR ensemble with many thousands of parameters - that may be quite a nightmare.

Interested to see your progress, btw - I also have a BCR-2000, and have done similar things as you intend, although not yet using OSCII-bot.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 10-09-2014, 07:50 AM   #3
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 92
Default

Hi Banned,

I will experiment with selecting effects and see what Reaper sends. But I would really like to avoid querying the individual effects when a new track is selected, because that probably leads to ugly/complex script code.
It would be far nicer to have Reaper send what it knows about the new track...

Does an effect need to have its UI window open to be controlled? Part of the convenience of having the BCR and parameter feedback to its LED circles is that you don't need everything on-screen.

If this fails I would be interested in the other ways you have done this.

I will keep you posted on my progress, most likely by asking more questions
dixo is offline   Reply With Quote
Old 10-13-2014, 04:59 PM   #4
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 92
Default

I have tried a lot of different .ReaperOSC setups, but I can't get Reaper to send the track FX data for all FX and FX parameters in the FX/FX param banks without having to focus each FX first. I really don't see what the purpose of the FX bank size and parameter bank size settings are if you have to select each FX to get its data.

I also have been looking at ReaScript, would that be a better choice to implement what I want? I saw that ReaScript provides access to the Reaper API functions which could potentially make it more powerful than using OSC.

Is there a way to get a ReaScript running at Reaper start?
dixo is offline   Reply With Quote
Old 10-13-2014, 11:36 PM   #5
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 370
Default

Quote:
Originally Posted by dixo View Post
So, I defined:

Code:
DEVICE_TRACK_COUNT 1
I expected Reaper to send the names and values of all the FX and FX parameters upon track change: the new track is always outside the current bank of the device (track bank size is 1) and the FX bank has space for data from multiple FX and FX parameters.
But it doesn't work, Reaper does not send any FX parameters at all.

Dixo
I remember having a bug with device_track_count 1, try 2 instead of 1 to see if it's better...

For Reascript, it is cool stuff, but don't consider it for realtime modulation of parameter. You can run a script in the background using the function RPR_defer , all you'll have to do is to start it once.
mim is offline   Reply With Quote
Old 10-15-2014, 08:47 AM   #6
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 92
Default

Thanks mim!

I have been experimenting with different track bank sizes, but so far not much luck. It is still hard for me to get predictable results when changing the .ReaperOSC configuration. The only more or less predictable way I have found so far is to query all track FX by sending OSC fx select messages when the selected track changes, but it would be so much cleaner not having to do that.
I just seem to fail to understand the design behind Reaper OSC, how it decides what to send, and when.

ReaScript seems indeed not a good tool for this: it has access to many of the Reaper API functions, but I read in a different thread that you can't send/receive MIDI using ReaScript.

Reaper seems to offer many ways to expand it (JS, ReaScript, C++ API, OSC/oscii-bot) but each way has its strengths and omissions. It would have been nice to have a scripting interface that enables you to write full Reaper extensions, instead of having to resort to installing a C++ development environment and all related complexity. For example, the oscii-bot way of interacting with MIDI and OSC devices is very nice.
dixo is offline   Reply With Quote
Old 10-15-2014, 12:29 PM   #7
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 198
Default

it would be nice to have a subscription-based solution for osc.

and also a possibility to filter the trackbank (e.g. all tracknames that start with "AUX:") without mirroring the mixer window, but now I'm dreaming...
Teddy is online now   Reply With Quote
Old 10-15-2014, 03:51 PM   #8
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 370
Default

Quote:
Originally Posted by dixo View Post
Thanks mim!

I have been experimenting with different track bank sizes, but so far not much luck. It is still hard for me to get predictable results when changing the .ReaperOSC configuration. The only more or less predictable way I have found so far is to query all track FX by sending OSC fx select messages when the selected track changes, but it would be so much cleaner not having to do that.
I just seem to fail to understand the design behind Reaper OSC, how it decides what to send, and when.

ReaScript seems indeed not a good tool for this: it has access to many of the Reaper API functions, but I read in a different thread that you can't send/receive MIDI using ReaScript.

Reaper seems to offer many ways to expand it (JS, ReaScript, C++ API, OSC/oscii-bot) but each way has its strengths and omissions. It would have been nice to have a scripting interface that enables you to write full Reaper extensions, instead of having to resort to installing a C++ development environment and all related complexity. For example, the oscii-bot way of interacting with MIDI and OSC devices is very nice.
Sorry it didn't help. I think the key is to use those different ways together, but it is not very intuitive, and some areas will remain dark. Even a c++ devlopment won't help you to make script to activate envelopes for exemple.

@Teddy, yeah reflecting either TCP or MCP or "Absolute tracklist" would be nice.

NTM, parameter touch OSC pattern ...
mim 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 12:32 PM.


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