I want to write a tool (a renoise tool specifically, although renoise’s OSC API works like most others) that can use grids as a controller. I want to be able to get the device list from serialosc to let the user pick one rather than having to specify the ports and prefix manually. From reading the osc docs this seems to require these steps:
- create an osc server to listen for serialosc’s output
- create an osc client to send the
/serialosc/listmessage to port 12002
- wait for the device list messages to come back
- create another client to send an info message to the port of the device I want to use in the device list
- read the port out of that message and create a server listening on it
- use this final client/server pair to communicate with the device.
Is there a simpler way to do this? In renoise’s API (which uses callbacks for osc servers) this is messy due to creating multible OSC servers and clients for different ports, and I can only think of doing step 3 by literally including a delay, as I can’t see any way in serialosc’s API to tell when the device list is finished.