MIDI SysEx hello-world for Arturia Beatstep 1

Status
Not open for further replies.

moony

New member
Hi there,

I'm trying to send sysex messages, which works partially. All midi-devices are connected via USB (Beatstep sequencer, software-sampler and TeensyLC). To get something to work at all, I'm trying to make a hello-world: This should blink a LED-pad of the Arturia Beatstep 1 via sysex.

Switching the LED on and of works in cli with amidi:
# set controler mode:
amidi -p hw:2,0,0 -S "F0 00 20 6B 7F 42 02 00 03 70 24 F7"
# led on:
amidi -p hw:2,0,0 -S "90 24 00"
# led off:
amidi -p hw:2,0,0 -S "90 24 01"


However, if I'm trying to do this with the teensy, it doesn't work. The first sysex messages seem to work, the next two are playing notes - why is that? This is coming from the teensy:
aseqdump -p 20:0
Waiting for data. Press Ctrl+C to end.
Source Event Ch Data
20:0 System exclusive F0 00 20 6B 7F 42 02 00 01 70 09 F7
20:0 System exclusive F0 00 20 6B 7F 42 02 00 03 70 24 F7
20:0 Note on 0, note 36, velocity 127
20:0 Note off 0, note 36

My code for the teensy is attached.


Best regards,
moony
 

Attachments

  • teensy-hello-sysex-midi_small.ino
    851 bytes · Views: 54
The first two messages start with 0xF0 and end with 0xF7 which are the start and end symbols for a SYSEX message.
But the other two messages don't. But your code tells the midi library that the prefix/suffix are there when in fact they aren't. Without the sysex prefix/suffix, they are note on messages.
Either change "true" to "false" in the third and fourth messages, or add the prefix and suffix in the declaration of the message.

Pete
 
thanks for your fast reply. I've tried that already, and tried it again to be sure. One time with "false" and another time with start and end symbols.

Still this from aseqdump:
20:0 System exclusive F0 00 20 6B 7F 42 02 00 01 70 09 F7
20:0 System exclusive F0 00 20 6B 7F 42 02 00 03 70 24 F7
20:0 Note on 0, note 36, velocity 127
20:0 Note off 0, note 36

Code:
// hello world (blinking pad) with sysex for the arturia beatstep 1

#include <MIDI.h>

// select sequencer mode
const uint8_t sel_mode[] = { 0xF0, 0x00, 0x20, 0x6B, 0x7F, 0x42, 0x02, 0x00, 0x01, 0x70, 0x09, 0xF7 };

// select note
const uint8_t sel_c1[] = { 0xF0, 0x00, 0x20, 0x6B, 0x7F, 0x42, 0x02, 0x00, 0x03, 0x70, 0x24, 0xF7 };

const uint8_t led_on[] = { 0xF0, 0x90, 0x24, 0x7F, 0xF7 };
const uint8_t led_off[] = { 0xF0, 0x90, 0x24, 0x00, 0xF7 };

const int channel = 1; // not needed for sysex (?)

MIDI_CREATE_DEFAULT_INSTANCE(); // won't compile without this!

void setup() {

}

void loop() {

usbMIDI.sendSysEx(12, sel_mode, true); 
usbMIDI.sendSysEx(12, sel_c1, true);   

//LED
usbMIDI.sendSysEx(5, led_on, true);
delay(500);
usbMIDI.sendSysEx(5, led_off, true);
delay(500);

// MIDI Controllers should discard incoming MIDI messages.
while (usbMIDI.read()) {}
}
 
"aseqdump" isn't a good midi-monitor here. "amidi" shows this:

F7
F0 00 20 6B 7F 42 02 00 01 70 09 F7
F0 00 20 6B 7F 42 02 00 03 70 24 F7
F0
90 24 7F
F7
F0
90 24 00
F7

which looks much better :) No idea why aseqdump interprets some of that as midi-notes..
 
..and it's _USB_midi :rolleyes: I had to connect those two devices with "aconnect" now my hardware-sequencer responds to the sysex messages :)
 
Status
Not open for further replies.
Back
Top