Strange problem/bug sending midi sysex
Hi, I see a strange problem/bug with self._send_midi().
I use this code to send out parameter values to display on a iPad:
This is just an example for parameter 14.
Listener: self.song().appointed_device.parameters[14].add_value_listener OR turning knob 14 on the MIDI Fighter Twister
Action:
parNr = 14
header = (240, 126, 3,)
devPar = (parNr,)
val = tuple([ord(c) for c in self.song().appointed_device.parameters[parNr].str_for_value(self.song().appointed_device.parameters[parNr].value)],)
closer = (247,)
sysexMsg = header + devPar + val + closer
self._send_midi(sysexMsg)
self.log_message(“csslog: ” + str(sysexMsg))
I always get the correct output in the css log and I get midi sysex output:
1. after loading a live set and in the first selected track there is a selected/bluehanded device
2. when I click a random parameter in a selected/bluehanded device > in this case not only the now selected parameter works but also every other parameter of this device…
But there is no midi sysex output when:
1. selecting (blue hand) a device with a midi controller input
2. selecting (blue hand) a device by mouse clicking on the device menu bar
3. selecting (blue hand) a device with keyboard arrows left/right
I also tried to use “selected device” rather than “appointed device” but that also doesn’t work.
Any hints what might be wrong with the code ?
Regards, mj
And here’s the complementing Open Stage Control file – essentially the “display” to show parameter names and values etc.. This is more a sketch and work in progress. Any help would be appreciated. Regards, mj
Hi MartinJ,
I am sorry but I could not open the last json script you sent in CSS.
In the past, I have had more luck with “selected device” rather than “appointed device” but you already tried that.
I also had mixed results with the self._send_midi() command, but haven’t been able to pin down what it was what triggered the failure.
I am not at all familiar with OSC (yet), but maybe there is a way to get the parameter name and value directly through the Live Object Model via OSC?
Greetings
Hi Wim, thank you to have a look at it. The second file “DeviceR light – CSS_work.json” is the session file for Open Stage Control (https://openstagecontrol.ammd.net) and not CSS although it’s also a JSON file ;-). It needs to be opened with the Open Stage Control launcher app. Regards, mj
Ok, I see.. That makes sense 🙂
One of these days I will tackle OSC, for the moment I have too many other things on my plate. Still intrigued by the _send_midi() though. Please keep us posted if you find a (partial) solution, I will have another look soon too!
Till posted!
I tried a little bit further and I have to correct my first statement because by changing the selected device csslog also doesn’t output the parameter value string..
Sign up
User registration is currently not allowed.