I'm using TouchOSC on my iPad and trying to find a way to send an OSC message to my iPad from SoundFlow that will disable a certain push button or pull another push button to the front. Essentially, trying to have a toggle button in TouchOSC modify existing buttons in one area so those buttons can essentially perform multiple actions.
Alternatively, if there is a way to disable SoundFlow triggers from a script I can just set the same trigger for multiple scripts and have each script that switches the buttons to just disable the triggers I don't want to be triggered. Although, I think I've read in the forum that you can't disable/enable SoundFlow triggers from a script yet, correct?
I'm probably just held back by my lack of knowledge of java and OSC but after a day of searching the resources I could find online I couldn't find anything that showed me how to enable/disable or send to back/bring to front any object in TouchOSC. I coud find resources using OSCulator and others so I know this should be possible. This seems very easy to do I'm just missing the terminology and values of what I'm trying to accomplish.
Looking forward to any responses.
- Christian Scheuer @chrscheuer2020-10-11 17:59:48.383Z
Hi John,
It's fairly easy to send OSC messages out of SoundFlow - I think the harder part is the TouchOSC routing you'll need. If you can tell SoundFlow which endpoint (IP address or hostname, and port) to send to, and the OSC you need, then it's a simple call like this:
sf.osc.sendMessage({ host: '127.0.0.1', port: 9000, oscAddress: '/path/to/thing', arguments: [ { type: 'Int', value: 5, }, ], });
Here I'm sending OSC from SoundFlow to port 9000 on the local machine as an example (I imagine you'll either need the Touch OSC device here instead - you can use ".local" notation instead of IP addresses)
Then I'm sending to the OSC address '/path/to/thing' and sending a single argument of type Integer with a value of 5.
Christian Scheuer @chrscheuer2020-10-11 18:02:23.247Z
Note that obviously all this is complex due to Touch OSC routing being complex, since you need to do a lot of manual sending messages back and forth and handling of network issues becomes part of the job.
I'd definitely recommend checking out SoundFlow surfaces, where you don't need to do any such manual routing. Although at the moment, I understand why you may want to stick with the surface you've already designed in Touch OSC. Just wanted to point out that SF surfaces make these things much easier to deal with.
In terms of having the same input/trigger do multiple things - you could also take a look at
globalState
variables in SoundFlow. This is a way in which you for example can have one script toggle a global state variable, that then gets read in another script (or in the same one) at a later time. By utilizing this, you can have as many virtual layers as you want.- JJohn Michael Caldwell @johnmcald
Ah, this globalState variable sounds like an interesting way to lean. I'll definitely look into this. Thanks!
I'm understanding getting the OSC messages sent to TouchOSC from SoundFlow I'm just having trouble knowing what to send to get the button to do what I want it to do (in this case disable one button or move it to the back and enable another button that's in the same position or bring this button to the front); and having a hard time finding the recources that describe the terminology for what I'm looking for. :/
Christian Scheuer @chrscheuer2020-10-11 22:23:12.345Z
Ah ok.. But finding the right OSC messages to send to Touch OSC sounds like a question for a Touch OSC forum though, if I'm understanding you correctly. (Which sort of goes a bit in the same direction as I was mentioning that depending on the complexity of what you're trying to set up it may be worth it to wait until SF surfaces have these kinds of features, as the programming of it will be much simpler)
- JJohn Michael Caldwell @johnmcald
I am much looking forward to new releases of Surfaces to see what's to be incorporated into newer releases. (Especially any features that make working with multi-workstations easier for individuals! ;) ).
I've managed to get a lot of what I wanted to work accomplished through your suggestion of using a globalState to identify the current relationship or state of the function I want to be triggered. It worked out well!
Christian Scheuer @chrscheuer2020-10-12 18:24:18.269Z
That's awesome!