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

Reply
 
Thread Tools Display Modes
Old 08-06-2018, 09:58 AM   #1
Kostik Vento
Human being with feelings
 
Join Date: Nov 2013
Location: Yekaterinburg, Russia
Posts: 11
Default REAPER does not send OSC messages to local port

Hello,

I'm trying to play around with OSC in REAPER using Python, and I've set it up with "OSC (Open Sound Control)" choosing "Configure device IP + local port". REAPER does receive messages from my Python code, but does not send anything to localhost:8092 (or localhost:9000 or whatever). What am I supposed to set up in addition to make it work?

P.S. I've tested my Python server with telnet, and it does receive messages by itself, but it seems that REAPER sends just nothing whatever I change on tracks, transport controls etc.
Kostik Vento is offline   Reply With Quote
Old 08-06-2018, 10:59 AM   #2
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

I was using default "Local port" only (I have not really checked what other options means... but sound interesting )

In default configuration ("Local port") REAPER sends something to the port from which you have contacted it (so you need to contact it first). So check that you are sending messages from the same port on which you are listening.

Otherwise you can change f.e. to "Device IP + local port" and set your program listening port there.
azslow3 is offline   Reply With Quote
Old 08-06-2018, 12:34 PM   #3
Kostik Vento
Human being with feelings
 
Join Date: Nov 2013
Location: Yekaterinburg, Russia
Posts: 11
Default

Well, "Local port" did not work for me before I learnt how to send proper OSC messages to REAPER, but as of now it does. So I probably will not keep on trying to use "Device IP + local port" :-)

Yet, REAPER still does not (sometimes) send anything back for messages like "/track/1/mute 0" while it does what I want (I mean muting the track 1, in this case). I tried to send messages "/reaper/track/follows/device 1", and sometimes REAPER sends back some bundles with current values, but I did not catch any predictable pattern in that behaviour, so maybe if someone could point me to some kind of docs or articles on that, I would really much appreciate that.
Kostik Vento is offline   Reply With Quote
Old 08-06-2018, 01:12 PM   #4
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

See the comment in the default pattern files. If you still have questions, feel free to ask. But search the forum first, many such questions are already answered.

In general, there are several parameters which define what is sent back and for which tracks and FXes. Apart from the corresponding message definition (what is not defined is obviously not sent), check DEVICE_xxx_COUNT and xxx_FOLLOWS (all of them).
azslow3 is offline   Reply With Quote
Old 08-07-2018, 01:48 AM   #5
Kostik Vento
Human being with feelings
 
Join Date: Nov 2013
Location: Yekaterinburg, Russia
Posts: 11
Default

Unfortunately, the only thing Default.ReaperOSC is good for is to understand data types, and sometimes it does explain well particular messages like /track/1/mute, but in general it lacks for clarity on most of other messages which are just listed without any explanation. I'd expect some examples and notes about whether a particular message will (or not) be replied back with some other message (and which precisely in which cases), and so on.

For example, I did not get how to add a particular FX on a track, how to change FX order in FX chain in a track, how to receive the list of available FX's (to add some of them on a track), what is difference between fx and fxinst command, and so on.

And for instance, there is no description for /track/@/volume/db pattern while I was getting it sometimes from REAPER. So the trial-and-error method is now what I have to use to make it work
Kostik Vento is offline   Reply With Quote
Old 08-07-2018, 03:02 AM   #6
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

Quote:
Originally Posted by Kostik Vento View Post
Unfortunately, the only thing Default.ReaperOSC is good for is to understand data types, and sometimes it does explain well particular messages like /track/1/mute, but in general it lacks for clarity on most of other messages which are just listed without any explanation. I'd expect some examples and notes about whether a particular message will (or not) be replied back with some other message (and which precisely in which cases), and so on.
Self explaining commands are not commented. All not self explaining commands are commented. Sure, what is "self explaining" is a person dependent. I guess the developers was measuring that on themselves, so what will be self explaining if they have not written the program but had to use it. They are smart, so the level is high

REAPER sends everything defined in the pattern file, except uni-directional (dev->REAPER) commands.
There are "current" things (like track, fx, etc.). They are always sent when defined and changed (the subject of FOLLOW).
To not flood the client, there are _COUNT and _BANK limits, which specify what the client can display (it make no sense to send 128 track names to the display which is configured to show only 8 per time).

No "trial" required, everything is deterministic. Read ALL comments 2-3 times till you understand everything written. Every topic is explained once and is not repeated every time it is used (I remember many squad meters of documentation for DEC VMS... they was repeating close to everything for every command, so almost one book of documentation per command).

Quote:
For example, I did not get how to add a particular FX on a track, how to change FX order in FX chain in a track, how to receive the list of available FX's (to add some of them on a track),
I guess that is outside of the OSC extension capabilities. It does not expose complete REAPER API.
The workaround is to define specific actions in scripts (f.e. to insert particular frequently used plug-in) or use existing actions (f.e. SWS "Move selected FX up/down..."), by triggering them throw OSC (using /action <num> and other ACTION patterns).

Quote:
what is difference between fx and fxinst command, and so on.
Some FXes are "Soft Synthes", so Instruments. In many cases it is nice to distinguish between the instrument on the track and all other processors for the same track.

Quote:
And for instance, there is no description for /track/@/volume/db pattern while I was getting it sometimes from REAPER. So the trial-and-error method is now what I have to use to make it work
"TRACK_VOLUME f/track/volume/db f/track/@/volume/db" line.
* "f: raw floating-point argument", so not normalized to (0. - 1.). Make sense for some REAPER own parameters, including this one. So it will send track volume in dB
* to understand why there are 2 patterns, read "Example: TRACK_VOLUME n/track/volume n/track/@/volume" comment.
The only difference is the type (f vs n)
azslow3 is offline   Reply With Quote
Old 08-07-2018, 04:33 AM   #7
Kostik Vento
Human being with feelings
 
Join Date: Nov 2013
Location: Yekaterinburg, Russia
Posts: 11
Default

Quote:
Originally Posted by azslow3 View Post
They are smart, so the level is high
Well, I believe that shallow learning curve is better for saving time when a newbie gets into a completely new area That's what I stand for.

Thanks for all the comments!

Quote:
Originally Posted by azslow3 View Post
The workaround is to define specific actions in scripts (f.e. to insert particular frequently used plug-in) or use existing actions (f.e. SWS "Move selected FX up/down..."), by triggering them throw OSC (using /action <num> and other ACTION patterns).
Yes, that's what I am already trying for things that couldn't be done via OSC messages so far
That's gonna be an action that sets up a small server which then receives requests from Python code to perform API calls inside REAPER (yes, inspired by beyond.Reaper).

Quote:
Originally Posted by azslow3 View Post
"TRACK_VOLUME f/track/volume/db f/track/@/volume/db" line
I am sorry, I've actually found that line after I wrote the comment shame on me.
Thanks for your patience!
Kostik Vento is offline   Reply With Quote
Old 08-07-2018, 06:57 AM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by azslow3 View Post
I guess that is outside of the OSC extension capabilities. It does not expose complete REAPER API.
That is why there is "Beyond Reaper". Same exposes the complete Reaper API (plus things you might want to do yourself in reaper using Python) via OSC.

-Michael
mschnell is offline   Reply With Quote
Old 08-07-2018, 07:09 AM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Kostik Vento View Post
(yes, inspired by beyond.Reaper).!
Yep.

A friend of mine successfully uses Beyond in multiple projects

Re did stand alone Python programs as the master software.

-Michael
mschnell 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 06:49 AM.


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