Midi SysEx Messages


#1

Hi,

am I correct in assuming that currently it is not possible to send SysEx messages with Sonic Pi?


#2

You can send raw midi so probably can that way though I’ve not investigated it.


#3

Yes, I have seen that. The thing is that I need to send something like:

F0 00 20 6B 7F 42 02 00 **01 70 09** F7 (source)

and up to now I have not spotted how to translate this to something like

midi_raw 0xb0, 0x79, 0x0  # example from Sonic Pi doc

accepting only 3 bytes. As far as I understood sysex commands contain more than 3 bytes (as in the example above, where the mere midi control data bytes are #9 to #11).


#4

Great question. It should work, but I have to confess to not having tried it myself, so it’s possible there’s a bug somewhere.

I’m currently on the road, so it’s a bit hard for me to try something out right now, but please pester me if I don’t get back to you on this.


#5

First time I tried, it did not work. But I’ll give some more effort tomorrow. Maybe I did someting wrong.

If I understand correctly I will just have to spit up the command in 3 groups, right?

Thanks for the input, @samaaron !


#6

Hi Sam,

if you have the time I’d like some help about this issue. I have confirmed that I can trigger the controller by using amidi. F. e. I can send the following message to trigger a pad’s LED to on:

 amidi -p hw:2 -S 'F0 00 20 6B 7F 42 02 00 10 77 01 F7'

I tried different versions but I do not manage to send the same command using Sonic Pi’s midi_raw.

Some obvious questions:

  • How do I divide the command (if at all); midi_raw expects 3 bytes (or at least parts) if I interpret the documentation correctly: “midi_raw a (byte), b (byte), c (byte)”
  • Do I need the sysex delimiters F0 ... F7?
  • Do I need the hex prefixes 0x; if yes: for all bytes?
  • Finally - and an answer to the questions before: Could you give an example using the above mentioned sysex command I sent with amidi that I could try?

I’d be very grateful for some help on this issue.

Martin


#7

I’m in Australia for a couple more weeks. Hopefully I’ll an opportunity to look into this before Christmas.


#8

Yes, I know. Have a nice stay. No hurry with that.

Thanks
Martin


Complete Rewrite of Live Looper