
At a high level, what I want to do is to have a script on Lemur probe the 16 MIDI channels on a target and if a device is found, log the returned info.
More detail -- I have an old synth (Yamaha TX-816) that is effectively 8 synthesizers in a rack. Each slot can be configured for a different MIDI channel as well as other settings. I have a defined 'get status' message of 5 bytes and a 'current status returned' response of 16 bytes, so the traffic is fairly minimal. I wanted to automatically probe to see if the slot has a synth and get the info from it.
In other procedural languages, I'd simply code up a loop for i=0 to 15, do a midiout(), wait for a response with a timer or delay, and then either log the returned data or move on if I time out. In the land of Lemur, the 'wait for a response and then move on' part is not a standard construct. How can I do something like that? Do the new MIDI clocks in 5.0 help?
Yes, I know I could ask the user to manually set up all that info, but it would be nice to do it automatically. This particular task is not the first time (and probably not the last time) I'll need to wait on something (a response from the user, a response from a connected device, etc).
Thanks in advance for any ideas/snippets/thoughts on this issue.