PDA

View Full Version : How to read the OSC messages


iacoposk8
07-23-2013, 03:07 AM
Hello to all! I'm developing a program that reads the OSC messages of Reaper.
1) What should I know for the connection? I can point out the ip and port on which to send in messages, the connection is TCP or UDP? there's more to know? (if there is a guide as well pass me the link please)
2) with which events Reaper launches OSC messages? just press play? or move a slider on the mixer?
thanks :)

adaragray
07-23-2013, 03:24 AM
oh yes please! what about a reaper/osc/midi translator ?
Midi feedback.. yeah!
:)

Banned
07-23-2013, 03:29 AM
Hello to all! I'm developing a program that reads the OSC messages of Reaper.
1) What should I know for the connection? I can point out the ip and port on which to send in messages, the connection is TCP or UDP? there's more to know? (if there is a guide as well pass me the link please)
You can set up the port(s) to use in Preferences > Control Surfaces after you have added an OSC Control Surface. Currently, only UDP is supported.

The best 'guide' is to (thoroughly!) read the comments in the Default.ReaperOSC configuration file, which comes with the default install; on a Mac it's typically here:
~/Library/Application\ Support/REAPER/OSC/Default.ReaperOSC
There is also a lot of valuable information in the (HUGE) thread for OSC FRs and bug reports (http://forum.cockos.com/showthread.php?t=96958).
2) with which events Reaper launches OSC messages? just press play? or move a slider on the mixer?
thanks :)
Lots more! Look at all the stuff in that Default.ReaperOSC configuration file! Success, and don't hesitate to ask for help. :)

Banned
07-23-2013, 03:33 AM
oh yes please! what about a reaper/osc/midi translator ?
Midi feedback.. yeah!
:)
That's quite trivial to do, really. There are some simple tutorials elsewhere on this forum (http://forum.cockos.com/showthread.php?t=97255) on how to do that with a free tool like Pure data; but it can be done with many tools.

The hard part is deciding how exactly you want things to be 'translated', I can't think of any scheme that would be generally useful; it's a matter of personal preference.

iacoposk8
07-23-2013, 03:37 AM
sorry but I did not understand, my English is bad :)
however I am still doing research, I was able to connect with a UDP socket to IP and port specified.
Now I have other problems .. if I can not solve them, I'll post again :)

iacoposk8
07-23-2013, 03:58 AM
if I press play or stop Reaper of the OSC messages are sent in how long time?
another question: if I did a program type mixer, it would be interesting that the sliders were synchronized with Reaper, How can I find information on the position of the sliders?
thanks :)

Banned
07-23-2013, 03:59 AM
sorry but I did not understand, my English is bad :)
however I am still doing research, I was able to connect with a UDP socket to IP and port specified.
Now I have other problems .. if I can not solve them, I'll post again :)
This stuff can be difficult even for those who speak the Queen's English. ;)

What programming language / platform / tool are you using to listen to REAPER 'at the other end', if I may ask?

iacoposk8
07-23-2013, 04:00 AM
oops, sorry Banned, as I answered you answered too and it was not reported to you that message .. just read all your posts

iacoposk8
07-23-2013, 04:04 AM
ok I read it all! Now I look at the material you posted.
in the meantime, answer me while I wrote too: D
http://forum.cockos.com/showpost.php?p=1215667&postcount=6

however, I am using php, I know that is not the language pià suitable, but I only know (but many) languages ​​for the web ... and then I saw that here they have even developed a class, for which I am made to force :)

http://opensoundcontrol.org/implementation/open-sound-control-php

adaragray
07-23-2013, 04:08 AM
That's quite trivial to do, really. There are some simple tutorials elsewhere on this forum (http://forum.cockos.com/showthread.php?t=97255) on how to do that with a free tool like Pure data; but it can be done with many tools.

The hard part is deciding how exactly you want things to be 'translated', I can't think of any scheme that would be generally useful; it's a matter of personal preference.

i have to admit the puredata thing looks super complicated to me.
i was thinking about a simple solution to freely map for example reaper osc actions to cc's or such.
something like an action list, in wich you can pick an action and drag a connector to the channel and cc of your liking. nothing fixed so if it doesn't work for you, you can just change it.

Banned
07-23-2013, 04:09 AM
if I press play or stop Reaper of the OSC messages are sent in how long time?
They should be sent out (almost) instantly. For optimal speed, in REAPER you can configure the "Control surface display update frequency" (to a relatively high setting). I would also recommend setting the "Outgoing max packet size" to 0 (so REAPER sends out packets immediately rather than trying to bundle some of them), and setting "Wait between packets" to 0 ms - assuming that your UDP network connection can handle it (e.g. when using 127.0.0.1 / localhost for sending OSC to another app on the same computer system).
another question: if I did a program type mixer, it would be interesting that the sliders were synchronized with Reaper, How can I find information on the position of the sliders?
thanks :)
The values of the volume sliders ('faders') of REAPER's Mixer Control Panel ('MCP') are configured in the Default.ReaperOSC configuration file, for example, as follows (in several formats):
TRACK_VOLUME n/track/volume n/track/@/volume
TRACK_VOLUME s/track/volume/str s/track/@/volume/str
TRACK_VOLUME f/track/volume/db f/track/@/volume/db

The master track has its own set of OSC actions.

You can configure how many tracks you want to 'see' simultaneously; look for "DEVICE_TRACK_COUNT" in the Default.ReaperOSC configuration file.

Banned
07-23-2013, 04:24 AM
i have to admit the puredata thing looks super complicated to me.
i was thinking about a simple solution to freely map for example reaper osc actions to cc's or such.
something like an action list, in wich you can pick an action and drag a connector to the channel and cc of your liking. nothing fixed so if it doesn't work for you, you can just change it.
The way it works is quite simple, though. What makes it 'super complicated', imho, is that there are way too much things you can do to fit on one screen, and that you may want to handle things like wildcards intelligently, rather than having to set up connections for a long list of separate but highly similar OSC messages.

If it's the specific GUI of Pure data (modular / graphic patching) that you dislike, there are plenty of other types of tools that seem to fit your requirements, e.g. OSCulator (http://www.osculator.net/) (Mac). For Windows, perhaps GlovePIE (http://glovepie.org/glovepie.php), does what you need (haven't used it myself, not sure).

iacoposk8
07-23-2013, 05:33 AM
The values of the volume sliders ('faders') of REAPER's Mixer Control Panel ('MCP') are configured in the Default.ReaperOSC configuration file, for example, as follows (in several formats):
TRACK_VOLUME n/track/volume n/track/@/volume
TRACK_VOLUME s/track/volume/str s/track/@/volume/str
TRACK_VOLUME f/track/volume/db f/track/@/volume/db

The master track has its own set of OSC actions.

You can configure how many tracks you want to 'see' simultaneously; look for "DEVICE_TRACK_COUNT" in the Default.ReaperOSC configuration file.

but my program, most likely will not reside on the same pc reaper, so how can I access that file?

Banned
07-23-2013, 05:59 AM
but my program, most likely will not reside on the same pc reaper, so how can I access that file?
You can set the value remotely using OSC as well, using this:
DEVICE_TRACK_COUNT i/device/track/count t/device/track/count/@
So, if for example you want to receive the data for a bank of 32 tracks at a time, you can send REAPER an OSC message like this:
/device/track/count 32
Of course, you would have to set up a bi-directional OSC connection to 'speak to' REAPER rather than only 'listen to' REAPER.

Banned
07-23-2013, 06:04 AM
[...] however, I am using php, I know that is not the language pià suitable, but I only know (but many) languages ​​for the web ... and then I saw that here they have even developed a class, for which I am made to force :)

http://opensoundcontrol.org/implementation/open-sound-control-php
Yeah, that was my point: there are already plenty tools that can be helpful. But that one looks like it won't help you for receiving OSC from REAPER, only for sending OSC to REAPER (emphasis added):
A small PHP class which can format and send OSC messages. It has no parsing capability, so it can only be used for uni-directional communication (i.e. sending of messages).

iacoposk8
07-23-2013, 06:18 AM
You can set the value remotely using OSC as well, using this:
DEVICE_TRACK_COUNT i/device/track/count t/device/track/count/@
So, if for example you want to receive the data for a bank of 32 tracks at a time, you can send REAPER an OSC message like this:
/device/track/count 32
Of course, you would have to set up a bi-directional OSC connection to 'speak to' REAPER rather than only 'listen to' REAPER.

and where trope in reaper this option?

Yeah, that was my point: there are already plenty tools that can be helpful. But that one looks like it won't help you for receiving OSC from REAPER, only for sending OSC to REAPER (emphasis added):

yes, I read it, so I'm building something to read messages :)

Banned
07-23-2013, 07:06 AM
and where trope in reaper this option?
You can set up the in/out ports in Preferences > Control Surfaces > Edit (after you have created an OSC control surface), and disable/enable the check boxes "Receive on port:" / "Send to port:" as required.

iacoposk8
07-23-2013, 07:10 AM
what I did, but as I say to exactly reaper send this message?
/device/track/count 32

Banned
07-23-2013, 07:19 AM
what I did, but as I say to exactly reaper send this message?
I'm not sure I understand what you mean... can you try to explain your question again?

iacoposk8
07-23-2013, 07:29 AM
I've said that for a mixer application type should I receive this message by Reaper
/device/track/count 32
once inside "Preferences > Control Surfaces" I told him on that ip and port to receive / send messages, when or how Reaper I send this message to my application?
/device/track/count 32

Banned
07-23-2013, 07:57 AM
I've said that for a mixer application type should I receive this message by Reaper
/device/track/count 32
once inside "Preferences > Control Surfaces" I told him on that ip and port to receive / send messages, when or how Reaper I send this message to my application?
/device/track/count 32
No, that's not what REAPER sends, it is what you can send to REAPER (instead of tweaking the .ReaperOSC configuration file) to set the number of tracks that make up a bank.

If you're trying to test and debug this stuff without access to the system running REAPER, that's going to be a little frustrating, I guess. :)

iacoposk8
07-23-2013, 08:08 AM
I want to open my application and see all the faders to 0.
as soon as I open a project reaper, I was working on, my application will synchronize automatically, setting the faders as you see on reaper.
As it happens in real mixer.
is it possible?

Banned
07-23-2013, 11:19 AM
I want to open my application and see all the faders to 0.
as soon as I open a project reaper, I was working on, my application will synchronize automatically, setting the faders as you see on reaper.
As it happens in real mixer.
is it possible?
Yes. Success!

iacoposk8
07-24-2013, 12:05 AM
and when, or how, I Reaper sends the information to make sure that other devices can synchronize with him?

Banned
07-24-2013, 02:04 AM
and when, or how, I Reaper sends the information to make sure that other devices can synchronize with him?
Again, not sure exactly what you mean, but I think you find all you need in the Default.ReaperOSC file. Make a duplicate of it, rename it, and hack away. :)

iacoposk8
07-24-2013, 03:10 AM
but if my application, which is performed by a tablet, how to access this file?

Banned
07-24-2013, 03:33 AM
I don't know, how do you generally access the filesystem / GUI of another system? Perhaps using RDP, SHH? Again, in general, it would be *much* easier if you have direct access to the system you're trying to configure. It sounds a bit like you're trying to hack into someone's REAPER session without him/her knowing about it. ;)

iacoposk8
07-24-2013, 05:29 AM
but usually, the devices that communicate with Reaper via OSC, use this function? ie synchronization with Reaper? or is it something that I want to invent me but you can not do?

Banned
07-24-2013, 07:25 AM
I'm getting really confused what you mean now, it must be the language barrier. :)

There are two things to distinguish: (1) configuration of how REAPER sends / responds to OSC messages, and (2) sending OSC between apps (to 'synchronize' parameter values). Generally, you can not do (1) by doing (2). There are some exceptions, such as the 'follow' behaviour and - as mentioned above - setting the number of tracks for which REAPER sends out parameter values as further configured in the .ReaperOSC file.

So, if you want to make REAPER's OSC configuration fully configurable remotely via OSC, that would be something new to 'invent'. But I don't think that is what you mean...

iacoposk8
07-24-2013, 07:36 AM
I try to explain better:
* I have the tablet in hand with my mixer application
* On the table have a computer with Reaper
1) I open my application (sound) on the tablet
2) I open a Reaper project I was working on (the project has already been mixing, then the faders will not be in the zero position)

Now I would like the faders of my application synchronized with each other their position with that of Reaper (like a real mixer)

question: is it possible? how?

Banned
07-24-2013, 07:46 AM
I try to explain better:
* I have the tablet in hand with my mixer application
* On the table have a computer with Reaper
1) I open my application (sound) on the tablet
2) I open a Reaper project I was working on (the project has already been mixing, then the faders will not be in the zero position)

Now I would like the faders of my application synchronized with each other their position with that of Reaper (like a real mixer)

question: is it possible? how?
Yes, that's possible. Just make your app listen to the OSC messages REAPER sends out for track volume, and update the fader positions in your app with the values you receive.

iacoposk8
07-24-2013, 07:52 AM
then it means that when I open a project, Reaper sends OSC messages containing all the project settings?

Banned
07-24-2013, 08:06 AM
then it means that when I open a project, Reaper sends OSC messages containing all the project settings?
Not "all" but plenty, depending on your configuration. Again, just read the Default.ReaperOSC configuration file. It is all in there.

iacoposk8
07-24-2013, 08:08 AM
ok! perfect! you have been very kind and very patient.
I've answered everything! thanks again :)

Banned
07-24-2013, 08:25 AM
Cool, glad to be of help. :)

Now, again, success with building that app, and don't hesitate to come back here and show it off when you're done. :)