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

Reply
 
Thread Tools Display Modes
Old 06-26-2018, 06:56 AM   #1
Duane1826
Human being with feelings
 
Join Date: Jun 2018
Posts: 6
Default Problem using OSC to control currently selected track

Thanks to the archives of this board, I’ve been able to learn so much about OSC that I’ve *almost* turned an old midi box into the control surface of my dreams — except for one remaining problem, which I’m hoping you guys can help me address.

Basically, I’d like to use an old BCR2000 as a big single-channel controller with every knob permanently mapped to a parameter of a plugin on the currently-selected track. Unfortunately, I can’t get it to control anything but Track 1.

Using OSCulator, I’ve been able to translate the incoming midi CC data into OSC commands that Reaper understands, and the feedback running in the other direction works as well — I turn knob #1 and the parameter I want changes; I move the parameter with my mouse and the LEDs around knob 1 respond in kind. Hooray!

More specifically, I’m doing this:

Controller knob #1 -> CC61 [x] -> midi into computer -> OSCulator translation -> /track/1/fx/1/fxparam/1/value [x] enters Reaper -> the plugin reacts.

And it works! The reverse works too:

Move the slider -> /track/1/fx/1/fxparam/1/value [x] -> OSCulator -> CC61 [x] -> LEDs react.

The problem is that no matter which track is selected — or none at all — knob #1 only (and always) controls that plugin parameter on Track 1. It’s controlling it whether the plugin window is open or closed, focussed or not, etc.

At the moment, that’s not particularly useful (unless I start doing minimalist one-track recordings) and I’m sure there must be a way to have it control a plugin in that particular slot of any currently-selected track…right?

Here are some other things I’ve tried:

Instead of /track/1/fx/1/fxparam/1/value, I’ve had OSCulator send the following commands:

/fx/1/fxparam/1/value (omitting the /track and track number altogether)
/fxparam/1/value /fx/1/fxparam/1/value /track/1/fx/1/fxparam/1/value (sending the entire string of commands contained in the config file)
/track/@/fx/1/fxparam/1/value (leaving the track number as a wildcard)
/track/x/fx/1/fxparam/1/value (using ‘x’ as the wildcard, which I picked up in a board post somewhere)

Reaper is receiving all of those with no problem (according to the ‘listen’ function in the Preferences/Control Surfaces) but the plugins won’t react to any of them. The only luck I’ve had is with ‘/track/1/fx/1/fxparam/1/value,’ and then only on Track 1.

Here are my other settings, as defined by my OSC pattern config file:

DEVICE_TRACK_COUNT 1 (I also tried 2 for a while, since somebody said there might be a bug when choosing 1)
DEVICE_SEND_COUNT 8
DEVICE_RECEIVE_COUNT 4
DEVICE_FX_COUNT 8
DEVICE_FX_PARAM_COUNT 16
DEVICE_FX_INST_PARAM_COUNT 16
DEVICE_MARKER_COUNT 0
DEVICE_REGION_COUNT 0

REAPER_TRACK_FOLLOWS REAPER
DEVICE_TRACK_FOLLOWS LAST_TOUCHED
DEVICE_TRACK_BANK_FOLLOWS MIXER
DEVICE_FX_FOLLOWS FOCUSED

DEVICE_EQ EXISTING

DEVICE_ROTARY_CENTER 0

The rest of the commands are unchanged from the default file.

Sorry for the novel — just trying to anticipate any questions in advance. Thank you so much for all of your help so far, and here’s hoping you can help me take this the final step!
Duane1826 is offline   Reply With Quote
Old 06-26-2018, 02:53 PM   #2
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Well, with
DEVICE_TRACK_FOLLOWS LAST_TOUCHED
DEVICE_FX_FOLLOWS LAST_TOUCHED


(assuming you have not modified the rest of default file)
/fxparam/1/value - should control the first parameter of the last touched FX (independent from the track)
/fx/1/fxparam/1/value - should control the first parameter of the first plug-in in the last touched track.

You write you have checked the last one, but I will be surprised in cast that does not work.
azslow3 is offline   Reply With Quote
Old 06-26-2018, 04:11 PM   #3
Duane1826
Human being with feelings
 
Join Date: Jun 2018
Posts: 6
Default

Quote:
Originally Posted by azslow3 View Post
Well, with
DEVICE_TRACK_FOLLOWS LAST_TOUCHED
DEVICE_FX_FOLLOWS LAST_TOUCHED


(assuming you have not modified the rest of default file)
/fxparam/1/value - should control the first parameter of the last touched FX (independent from the track)
/fx/1/fxparam/1/value - should control the first parameter of the first plug-in in the last touched track.

You write you have checked the last one, but I will be surprised in cast that does not work.
Thank you so much for responding. I made your suggested change to the OSC pattern config file and switched my incoming message to /fxparam/1/value. Unfortunately, this doesn't work either.

In fact -- as with any other variation -- it not only doesn't work, but it breaks the connection to the plugin (any plugin) I had been able to establish with the full command string. I can verify through the 'listen' function that Reaper is receiving the correct new OSC commands from OSCulator, but anything other than the full /track/1/fx/1/fxparam/1/value string doesn't work at all.

On the bright side, that seems significant...right? In terms of trouble shooting, we know one thing that does work and many others that don't (but should).

Thanks again for your help, and please chime in out there if you have any other thoughts...

Last edited by Duane1826; 06-26-2018 at 04:17 PM.
Duane1826 is offline   Reply With Quote
Old 06-26-2018, 11:04 PM   #4
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Sorry, by except:
DEVICE_FX_FOLLOWS FOCUSED
(I have typed from memory) that is what works for sure (you are not the only one who use OSC ).

So can I suggest you to take absolutely "clean" default pattern file (you can find it in Program Files/REAPER/InstallData/OSC), modify just these 2 lines (xxx_FOLLOWS) and try again?
Also I do not think one pattern can influence another,
they should be happy to work in parallel.

Can you also just try with "/track/volume"?
Also check the values you are sending. They should be float 0 to 1.
azslow3 is offline   Reply With Quote
Old 06-27-2018, 11:50 AM   #5
Duane1826
Human being with feelings
 
Join Date: Jun 2018
Posts: 6
Default

***** TL;DR — Azslow3 has helped me solve the problem — thanks so much! I’m going to post the rest of this for future users who might be having the same problem, because the archives here have helped me so much. I do have one remaining question detailed at the very end, though… ****


Quote:
Originally Posted by azslow3 View Post
So can I suggest you to take absolutely "clean" default pattern file (you can find it in Program Files/REAPER/InstallData/OSC)
Done.

Quote:
Originally Posted by azslow3 View Post
modify just these 2 lines (xxx_FOLLOWS) and try again?
Done — when you say “2 lines,” I’m assuming that you mean DEVICE_FX_FOLLOWS FOCUSED mentioned above and also DEVICE_TRACK_FOLLOWS REAPER.

Here is what my modified pattern file now reads:

REAPER_TRACK_FOLLOWS REAPER
DEVICE_TRACK_FOLLOWS MIXER
DEVICE_TRACK_BANK_FOLLOWS DEVICE
DEVICE_FX_FOLLOWS FOCUSED

DEVICE_EQ INSERT

DEVICE_ROTARY_CENTER 0

Everything else in the file has been left untouched.

Quote:
Originally Posted by azslow3 View Post
Also check the values you are sending. They should be float 0 to 1.
Done, and true for everything that follows.


Quote:
Originally Posted by azslow3 View Post
Can you also just try with “/track/volume”?

Okay, very interesting! I changed OSCulator to send /track/volume. At the point that command was first sent, track two just happened to be selected. (In hindsight, the significant thing here wasn’t that the track was selected in the mixer, but that this track had most recently had a plugin added.)

The result was that my MIDI controller now controls the volume of track two…AND ONLY TRACK TWO. I can change the selected track in Reaper’s mixer to a different track, or select no track at all…and throughout, track two responds.

To test this out, I restarted Reaper, loaded up seven empty tracks (with no plugins) selected track five in the mixer before turning the MIDI controller for the first time. But this time, the master track responded — and again, only the master track, regardless of which track is selected in the mixer.

But THEN, I added a plugin to a random track…and suddenly, that track’s volume is being changed by the MIDI controller.

And it continues to work: each time I add a new plugin to a new track, the controller begins to control that track’s volume. To be clear, none of these new tracks are being selected in the mixer, and that selection continues to have no impact on the volume control. And it doesn’t seem to matter if the new plugin window is focussed or even open…

So right now, it seems to me that the act of adding a new plugin to a track is what is required to ‘select’ the track from Reaper’s perspective. Simply clicking on the track in the mixer doesn’t do it, but adding any random plugin does.


Inspired by the above discovery, I edited OSCulator to send this command:

/fx/1/fxparam/1/value

I then created a new project, seven empty tracks, and added a plugin to slot one of the fifth track. The midi controller controlled parameter #1. (Already a huge success, compared to where I was this morning.)

I then added a plugin to slot one of track two…and control switched over to track two!

Better yet, I was finally able to switch back and forth between controlling those different plugins by changing which one is focussed at a given moment. HOORAY!

I then started adding more plugins to those two tracks, to make sure only the one in the first slot was being controlled (vs any plugin currently focussed). Not only does it work, but interestingly I found that focussing on any plugin in track five moves control over to the first plugin in track five, even if that first plugin window isn’t focussed. Essentially, focussing on any random plugin on a given track is accomplishing what I would have expected the act of highlighting a track in the mixer window to do.

I closed everything out, restarted, and was able to repeat those results on a clean launch.

My next step is to get feedback flowing in the other direction, but I’ll do that work on my own and start a new thread with questions there if necessary.

MY REMAINING QUESTION: why is simply selecting the track in Reaper’s mixer not fully “selecting” the track from the perspective of OSC control. At this point I’m happy with the workaround of launching/focussing a plugin window to initiate the change, but in my perfect world I’d be leaving the windows closed and simply selecting tracks in the mixer. (I will be using the controller strictly for EQ plugins, and I’d almost rather be forced to use my ears when making those decisions.) It’s partially academic at this point, but I’d love to hear if there’s an easy fix that I’m missing…

Once again, thanks to Azslow3 for the help!
Duane1826 is offline   Reply With Quote
Old 06-27-2018, 07:11 PM   #6
Duane1826
Human being with feelings
 
Join Date: Jun 2018
Posts: 6
Default

Deleting my post here because it didn't hold up to further testing...

Last edited by Duane1826; 06-27-2018 at 08:51 PM. Reason: Learned more.
Duane1826 is offline   Reply With Quote
Old 06-27-2018, 09:19 PM   #7
Duane1826
Human being with feelings
 
Join Date: Jun 2018
Posts: 6
Default

Okay, I’m pretty sure I’ve isolated a bug here — I’m so green that I’m posting here first to see if I’ve just missed something obvious.

The issue I’ve been having seems to revolve around line 55:

DEVICE_EQ

The document lists the two options as INSERT or EXISTING.

For whatever reason, either choice creates some unexpected behaviors for me.

When set to INSERT:

Reaper will respond to /fx/1/fxparam/1/value
Reaper will send out the OSC command /fxparam/1/value, but not /track/[x]/fx/1/fxparam/1/value

When set to EXISTING:

First, I get an error message when loading the config file: Pattern "EXISTING" starts with unknown flag 'E' on line 55 (allowed: [nfbtrsi])

With that option selected, Reaper stops responding to /fx/1/fxparam/1/value. However, it will respond to /track/[x]/fx/1/fxparam/1/value, which works but only on the specified track…which is how this whole line of questioning started in the first place.

That EXISTING flag also changes the kind of feedback that Reaper sends out: /fxparam/1/value stops working, but /track/[x]/fx/1/fxparam/1/value does get sent.

In my post above, I believe the significant issue was actually the change of this flag. (In my deleted post above, I attributed it to having set DEVICE_TRACK_BANK_FOLLOWS to MIXER instead of LAST_TOUCHED, which is incorrect per the config file but doesn’t actually seem to be causing any problems.)

What’s frustrating about this is that I’m trying to get a combination of the two states working:

I want to be able to have my MIDI controller’s CC messages translate to /fx/1/fxparam/1/value (so that I can control a specific plugin and parameter, but on any selected track).

At the same time, I want to have Reaper send back /fx/1/fxparam/1/value for translation out to my MIDI controller. Since that doesn’t seem to be an option, I’d rather have /track/[x]/fx/1/fxparam/1/value. /fxparam/1/value doesn’t do much for me, since I’ll be running more than one plugin on each channel and that changes the first parameter of every plugin on the selected track.

So, long story short:

INSERT gives me the input behavior I need, but the feedback behavior doesn’t work.
EXISTING forces me into an input behavior that is unworkable, but the feedback is right.

Any thoughts? I’m on a Mac (10.12.6) running Reaper v5.80/64 rev cda4b1.

Thanks!
Duane1826 is offline   Reply With Quote
Old 06-27-2018, 11:02 PM   #8
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Sorry I was not precise about "2 lines":
---
DEVICE_TRACK_FOLLOWS LAST_TOUCHED
DEVICE_FX_FOLLOWS FOCUSED
---

DEVICE_EQ influence (REAPER) EQ dedicated OSC only (so ".../fxeq/..." set of commands). But I agree, with "EXISTING" that seems like a bug

Note that in /track/X , X is NOT absolute track number but the number inside bank. For final version you will need to set:
DEVICE_TRACK_BANK_FOLLOWS MIXER

To get proper feedback from FXes, check "DEVICE_TRACK_COUNT", "DEVICE_FX_COUNT" and "DEVICE_FX_PARAM_COUNT", REAPER does not send all FXes/Parameters, just the specified "amount" of them. But it sends feedback for all specified patterns, so f.e. for /fxparam/5/value, /fx/3/fxparam/5/value and /track/2/fxparam/5/value in case track 2, fx 3 parameter 5 is modified, that fx is in focus and track 2 is "touched".


You are on Mac, os there can be some differences with touching/focus tracks. But please check DEVICE_ settings again before making conclusions.
azslow3 is offline   Reply With Quote
Old 06-28-2018, 10:18 PM   #9
Duane1826
Human being with feelings
 
Join Date: Jun 2018
Posts: 6
Default

Quote:
Originally Posted by azslow3 View Post
DEVICE_EQ influence (REAPER) EQ dedicated OSC only (so ".../fxeq/..." set of commands). But I agree, with "EXISTING" that seems like a bug
Okay, thanks for the confirmation -- I'll type up a bug report for it tomorrow.

Quote:
Originally Posted by azslow3 View Post
For final version you will need to set:
DEVICE_TRACK_BANK_FOLLOWS MIXER
Interesting -- so 'MIXER' is a proper designation for that line, even though it isn't listed as an option in the config file?

Quote:
Originally Posted by azslow3 View Post
You are on Mac, os there can be some differences with touching/focus tracks. But please check DEVICE_ settings again before making conclusions.
Here are my most current settings -- does anything here seem incorrect to you?

DEVICE_TRACK_COUNT 1
DEVICE_SEND_COUNT 8
DEVICE_RECEIVE_COUNT 0
DEVICE_FX_COUNT 1
DEVICE_FX_PARAM_COUNT 16
DEVICE_FX_INST_PARAM_COUNT 0
DEVICE_MARKER_COUNT 0
DEVICE_REGION_COUNT 0

(...)

REAPER_TRACK_FOLLOWS REAPER
DEVICE_TRACK_FOLLOWS LAST_TOUCHED
DEVICE_TRACK_BANK_FOLLOWS MIXER
DEVICE_FX_FOLLOWS FOCUSED

DEVICE_EQ INSERT

DEVICE_ROTARY_CENTER 0



Quote:
Originally Posted by azslow3 View Post
Note that in /track/X , X is NOT absolute track number but the number inside bank.
Thanks, that hadn't been clear to me before. So since I've set my device to one track, shouldn't a /track/1/fx/1/fxparam... command should effectively work like /fx/1/fxparam... with no track designation at all? That's the command I'm after, but so far I haven't had much luck making it work.

To ask it another way: is 'DEVICE_TRACK_COUNT' the one and only place that we define how big our bank size is?

Quote:
Originally Posted by azslow3 View Post
To get proper feedback from FXes, check "DEVICE_TRACK_COUNT", "DEVICE_FX_COUNT" and "DEVICE_FX_PARAM_COUNT", REAPER does not send all FXes/Parameters, just the specified "amount" of them. But it sends feedback for all specified patterns, so f.e. for /fxparam/5/value, /fx/3/fxparam/5/value and /track/2/fxparam/5/value in case track 2, fx 3 parameter 5 is modified, that fx is in focus and track 2 is "touched".
I think I understand, but what I'm picking up coming out of Reaper does not include all of those patterns. As a side question: is there a third-party piece of software that works like the 'listen' function in the Prefs menu, only on the output side? In other words, a way of monitoring what OSC patterns are actually being generated from within Reaper? I've been trusting OSCulator to do this for me so far, but I'd like to double-check it with another program in case some of the strangeness here is being created by that particular program.

Thanks again for all of your help.
Duane1826 is offline   Reply With Quote
Old 06-29-2018, 03:23 AM   #10
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Funny, but I have not found easy/small/simple OSC app/debugger.

Developed for different purpose, but if you have windows (works under Wine in Linux, I guess should work under Wine in OS X):
http://www.azslow.com/index.php/topic,352.0.html
After configuring OSC/Preferences, open OSC/Debugger.
Send anything to REAPER (like "/ping"), than it knows where to send the feedback. You should see all messages which REAPER sends.
azslow3 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 04:22 AM.


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