View Full Version : Resetting OSC Values

03-12-2011, 07:45 PM
Ok, interesting one for you here, is there any way to set all the values of controls in OSC based on a received midi command.

Basically my midi desk outputs a number to tell me what scene that is it on. Is there any way for me to take that value in Osculator and then change the positions of a few controls on TouchOSC ?

It's a bit of a bodge, but could get me away from a few issues that I am having.

Ideally I'd like something like /midi/cc1/1 that when set to a value then sets /1/push1 and /1/push2 to pre saved values.


03-14-2011, 12:06 PM
Hello James,

You can do that in various ways, but here is a simple starting point, that we can discuss further.

What you would need to do, is to send several OSC messages when the /midi/cc1/1 message is received.
To perform several events when one message is received, you need to use the "Duplicate" command (in the Edit menu).
Select the /midi/cc1/1 message, and use duplicate, this will add slots to which you can assign a OSC Routing event.

For each control you want to reset in TouchOSC, create a OSC Routing.
This is done in the Parameters Window, OSC tab.

You will need to set the rewrite address to the address of the control you want to set, for example /1/push1 or /1/push2. If you have many controls and don't want to add them all manually, you can drag and drop a .touchosc file onto the table at the bottom to create all the definitions automatically.

OSC Routing come with a default argument "all args" which means that all received arguments are added to the OSC message. For example, when receiving a MIDI Control Change message, this would add the value of the control change to the OSC message (the value is normalized to the 0.0-1.0 range also). So, if you receive a MIDI CC with a value of 64, the OSC message will be triggered with a single argument, 0.5.

You can replace the "all args" token by a value you type manually. In you case, if you want to reset the push buttons, you would type the number 0, then press space or enter key to create the token. Of course if your MIDI CC already sends the value 0, there is no need to change the argument list for your OSC Routings.


03-16-2011, 12:17 AM
Hi There.

Thats exactly what I wanted !!

Cheers for that, I noticed you said that I could drag and drop a .touchosc file, where do I drag and drop it to ? Tried multiple places and it doesn't appear to do anything ? :s


03-16-2011, 12:24 AM
Sorry, I should have been more explicit.
In the Parameters Window, go to the OSC tab, and drop the .touchosc file on the table at the bottom.
Alternatively, you could use the "gear" button, and click "Import...".

03-16-2011, 01:08 AM
Doesn't appear to work for me at all !!


03-16-2011, 01:16 AM
Could you please give me the version of the TouchOSC Editor you are using?
Also, if you can send me your touchosc file (camille at osculator dot net), I'll be able to find what's going wrong, thanks!

03-16-2011, 12:17 PM
1.4.2 I believe.

I'll mail it over to you when I get a second.