Script Send() function , not clear how to input a MIDI message on there

Hi there,

I was trying to send MIDI events through a script, and I was not successful. I have done some attempts changing the parameters, but it looks like the args... part is not really telling the case of MIDI messages.

https://openstagecontrol.ammd.net/docs/widgets/scripting/#sendtarget-address-args

As I see from the debugging messages I could understand that

(DEBUG, OSC) In:  { address: '/note', args: [ 1, 5, 28 ] } From: midi:messing

Should be inputted as

 send('midi:messing' , '/note' , [1 , 5 , 20]);

But I get an error

(ERROR, MIDI) Traceback (most recent call last):
  File "midi.py", line 268, in <module>
  File "midi.py", line 231, in send_midi
  File "midi.py", line 231, in <listcomp>
TypeError: type str doesn't define __round__ method

I have tried other ways unsuccessfully.

An ideas?

Thank you

 send('midi:messing' , '/note' , 1 , 5 , 20);

without the square brackets.

1 Like

I get an Error saying:

(ERROR, OSC) Malformed address: 1

Could solve it by using:

send('midi','messing', '/note', 1 , 5 , 20);
1 Like

send() is slightly different in widget scripts and in custom module:

  • in widget script:
send('midi:messing', '/note', 1 , 5 , 20);
  • in custom module:
send('midi','messing', '/note', 1 , 5 , 20);
2 Likes