sonic-pi-net / sonic-pi

Code. Music. Live.

Home Page:https://sonic-pi.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anomolous behaviour for midi_sysex on Linux versions of Sonic Pi

rbnpi opened this issue · comments

midi_sysex commands do not appear to be sent when running SP4.4 on linux (/raspberry-pi and debian 12 checked)

The midi string appears to be blocked, and to release it you need to follow the command with another midi command (I used midi_note_off, but also tried with a midi_cc command) and then it works. Tested by sending to a midi monitor snoopmidi

The program below worked

Operation on Mac and Windows PC worked as expected without the extra midi_note_off

use_real_time
use_midi_defaults port: "midisnoop_midi_input_130_0",channel: 1
midi_sysex 240, 146, 12, 12, 146, 12, 12, 146, 12, 12, 146, 12, 247
sleep 0.001
midi_note_off 8 # this bodge extra midi command needs to be present for it to work

Hi there,

this is odd. However, if it's working just fine on Windows and macOS but not Linux - then that's likely to be an issue with either the rtMIDI implementation on Linux or whatever rtMIDI is using in Linux-land to actually send the MIDI out. I'm not sure this is anything we can directly address within Sonic Pi itself.

However, I have seen that there is a more recent rtMIDI release, so it might make sense to try building a version with that new release.

I've substituted RtMidi.cpp and RtMidi.h files for those from version 6.0 and rebuilt but no change. AFAICS the changes in RtMidi are mainly the addition of Android support.
However, there are issues with long SysEx messages mentioned, so it looks as if it is an area than can give problems. However my tests were with relatively short messages.

Ah, that's a real shame. Thanks for trying this though. Perhaps it's worth raising the issue with them and see what they say?