Old 08-13-2018, 01:19 PM   #1
Kaitain
Human being with feelings
 
Join Date: Nov 2016
Posts: 34
Default Reaper OSC feedbacK

Hello everyone

I'm building a MIDI controller for plugins. This controller is USB and sends MIDI NRPN. Using OSCii-bot I've managed o transform the MIDI messages to OSC and send them to Reaper sucsessfully.

Now, the problem comes when changing between tracks. I need Reaper to send to the controller the plugin parameters of the selected track, so the controller can be updated. I think this should be doable as there are a lot of control surfaces with motorized faders or encoders which work that way.

Using a scrip published by Banned in this thread: https://forums.cockos.com/showthread.php?p=1512002 I've managed to see the OSC messages coming from Reaper in the OSCii-bot log window.

But so far the messages coming from Reaper don't seem to follow any logic (or at least I don't see it). Sometimes it sends all plugin parameters when a track is selected, sometimes just a few (and not always the same parameters). What is going on? Supposedly Reaper should send all parameters every time a track is selected so the controller can update al its controls, right?

Trying to isolate the problem, I'm using a very reduced .ReaperOSC file:

DEVICE_TRACK_COUNT 8
DEVICE_FX_COUNT 8
DEVICE_FX_PARAM_COUNT 47

FX_NAME s/fx/name s/fx/@/name s/track/@/fx/@/name
FX_NUMBER s/fx/number/str s/fx/@/number/str s/track/@/fx/@/number/str
FX_OPEN_UI b/fx/openui b/fx/@/openui b/track/@/fx/@/openui
FX_PARAM_VALUE n/fxparam/@/value

So, what's happening? Why the feedback from Reaper looks so strange?

Thank you all
Kaitain is offline   Reply With Quote
Old 08-13-2018, 09:24 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default

Quote:
Originally Posted by Kaitain View Post
I'm building a MIDI controller for plugins. This controller is USB and sends MIDI NRPN. Using OSCii-bot I've managed o transform the MIDI messages to OSC and send them to Reaper sucsessfully.
Why go via OSC and not directly do a bidirectional communication via Midi as suggested here -> https://forum.cockos.com/showthread.php?t=183143 ?

For a new "MIDI controller" (IIUC, you mean a Midi enabled "surface device") I would work together with Geoff regarding the Midi communication with Reaper.

In fact, If you do the firmware for that device, you can make it appropriately compatible with the "MC"-Protocol which is already supported by Geoff's "CSI" Reaper extension and it should work with Reaper (and with other MC compatible DAW software).

-Michael

Last edited by mschnell; 08-13-2018 at 09:32 PM.
mschnell is offline   Reply With Quote
Old 08-14-2018, 02:21 AM   #3
Kaitain
Human being with feelings
 
Join Date: Nov 2016
Posts: 34
Default

Hi mschnell

Well, the idea is that the controller can be used with *almost* any sequencer. Having that said, there are two main reasons for using OSC instead of MIDI:

- Resolution: 127 steps is not enough for me (one of the plugins I want to control is an EQ, and frequency needs more resolution than that). I made the firmware able to use NRPN messages, but unfortunatelly just a few DAW/plugins can deal with them. Luckyly OSC is not plugin dependent, so using it I can reach the plugins with full resolution.

- Feedback: I need that my controller updates its controls whenever a track/plugin window is selected, to avoid the "parameter jumping" thing when switching between tracks. As far as I know, plugins don't send back their parameters values via MIDI when they are selected. They do via OSC (or at least the DAW does for them). I'm precisely trying to understand how to get this working properly.

In the meantime I'm reading the thread you suggested (44 pages!). I guess that this is, among other things, about getting this feedback via MIDI. But this is a Reaper only solution right?

Last edited by Kaitain; 08-14-2018 at 03:04 AM.
Kaitain is offline   Reply With Quote
Old 08-14-2018, 07:31 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default

The Midi MC protocol, as well as other midi protocols do provide as well high resolution (16384) as bidirectional communication (aka "feedback").

Yep, the CSI is a Reaper extension and hence will not run without it.

That is why I suggested to use the MC protocol that is provided by other DAWs - and maybe other software products, as well as by Reaper, out of the box including feedback.

Regarding CSI/Reaper, if using MC protocol, here you can define a dedicated workflow for accessing multiple pages of plugin parameters, "matrix", etc.

I doubt that it's a good idea to need to bundle a tool like OSII2Bot to be able to use some Midi hardware device with a DAW, especially if same is not necessarily Reaper.

-Michael

Last edited by mschnell; 08-14-2018 at 07:39 AM.
mschnell is offline   Reply With Quote
Old 08-14-2018, 08:49 AM   #5
Kaitain
Human being with feelings
 
Join Date: Nov 2016
Posts: 34
Default

With Midi MC protocol you mean Mackie Control, right? Sounds like I could give it a try.

I've never tinker with it. Do you know if it is well documented, or where can I find any info about it?

Thnx
Kaitain is offline   Reply With Quote
Old 08-14-2018, 09:25 AM   #6
Kaitain
Human being with feelings
 
Join Date: Nov 2016
Posts: 34
Default

I found this: https://theagemanblog.files.wordpres...015/10/hui.pdf

Which looks like the documentation for MCU. At first sight looks like everything runs on SysEx messages.

Two questions about this:
- When configuring a MCU type control surface in Reaper, does Reaper sends Fx params as soon as you select a track?
- How to send messages to control parameters from rotary potentiometers? The doc only covers mesagges from/to faders... such a strange thing, as the MCU hardware has rotary encoders, so this kind of mesagges should be implemented. Am I missing something here?
Kaitain is offline   Reply With Quote
Old 08-14-2018, 11:48 AM   #7
LugNut
Human being with feelings
 
Join Date: Jun 2013
Location: So Florida
Posts: 1,427
Default

Hi,
No, that's hui implementation. MCP is different midi messages.
LugNut is online now   Reply With Quote
Old 08-14-2018, 12:13 PM   #8
Kaitain
Human being with feelings
 
Join Date: Nov 2016
Posts: 34
Default

Okay, does exist any specification to MPC that I could dive into? So far I haven't found too much...
Thnx!

Last edited by Kaitain; 08-14-2018 at 12:22 PM.
Kaitain is offline   Reply With Quote
Old 08-14-2018, 01:40 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default

I seem to remember that a link to a description of the MC protocol is somewhere in the thread I mentioned. If not, Geoff is an expert and will help.

Maybe this helps -> http://web.archive.org/web/200801260...ules/MCMap.htm

Quote:
Originally Posted by Kaitain View Post
- How to send messages to control parameters from rotary potentiometers? The doc only covers mesagges from/to faders... such a strange thing, as the MCU hardware has rotary encoders, so this kind of mesagges should be implemented. Am I missing something here?
You need to use a Reaper surface feature/extension. Same needs to be added and configured in the Reaper "Preferences" -> "Control/OSC/WEB" menu. There (out of the box) you can add "Mackie Control Universal" - and, if you installed Geoff's extension, also "Control Surface Integrator").

-Michael

Last edited by mschnell; 08-14-2018 at 09:43 PM.
mschnell is offline   Reply With Quote
Old 08-14-2018, 03:38 PM   #10
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Quote:
Originally Posted by Kaitain View Post
Okay, does exist any specification to MPC that I could dive into? So far I haven't found too much...
Thnx!
https://images.thomann.de/pics/prod/151261_manual.pdf
See the MIDI implementation at the end. If there is a difference between described protocol and what is called "Mackie Control Protocol", I have failed to find it.

Especially notice the feedback for encoders, it is not "simple" 1-127 to ring.
Also note the "handshake" protocol. Most DAWs work just fine without expected response, but some strictly follow the rules.

For an overview of MIDI messages, you can use this picture: http://www.azslow.com/files/mcu.png . Note that the right side buttons are labeled differently for different DAWs (original Mackie units have plastic overlays.
azslow3 is offline   Reply With Quote
Old 08-14-2018, 09:50 PM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default

There also seem to be a mandatory keep alive messages:

When switching my "XTouch Compact" to MC mode, the faders return to certain values when no messages are received.

Maybe this is used to make sure certain default values.

-Michael
mschnell is offline   Reply With Quote
Old 08-15-2018, 02:54 AM   #12
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Quote:
Originally Posted by mschnell View Post
When switching my "XTouch Compact" to MC mode, the faders return to certain values when no messages are received.
Mackie logic for faders requires feedback, even when they are moved by hands. "Simple" logic, when motor faders can be moved from the DAW but work fine without feedback at all, is obviously more universal. But Mackie assumes it is always used with special plug-in on the DAW side (as you can see in the documentation, early units could even keep silence till proper peer is detected).
azslow3 is offline   Reply With Quote
Old 08-15-2018, 06:45 AM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,687
Default

Just to let Kaitain know, in case he wants to implement MC protocol with his Midi device.

-Michael
mschnell is offline   Reply With Quote
Old 08-16-2018, 02:37 AM   #14
Kaitain
Human being with feelings
 
Join Date: Nov 2016
Posts: 34
Default

Wow, thank you guys. I'm into it!

In the meantime and to have a B plan, I'd like to resume the original question on the first post:

Where can I find any documentation about how Reaper behaves when giving feedback to OSC messages?

I will keep you posted about my progress with MC protocol. Thanks a lot!
Kaitain 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 02:12 PM.


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