Sonic Pi MIDI usability

The problem may be because you are running windows. Others have reported jitter problems on this platform, eg see Ian’s post above. I find it works well on my Mac and on my Raspberry PI4 which is running my own build from source on Sonic Pi. One thing to note. sustain: is used by default with a value of 1, so you might get a better response above if you used a smaller value eg sustain: 0.4, otherwise in the loop above you will get overlapping notes, although you may not hear that with a percussive synth eg a piano. The Sonic Pi midi command actually sends midi_on followed by a sleep (value sustain) followed by midi_off. Also it transmits on all available ports and channels, unless you specify which port and channel you want. (The available ports are listed in the IO prefs window. Try restricting things to the port and channel you are actually using eg:
port: "name_of_port_from_io_window", channel: 1
You can set this with the use_midi_defaults command rather than specifying it every time you have a midi command if you want. eg
use_midi_defaults port: "name_of_port_from_io_window", channel: 1

EDIT YOu could also try a software synth on your windows machine eg helm or vmpk then you wouldn’t need your external midi cables. See this

2 Likes