josephernest / SamplerBox

SamplerBox is a sampler musical instrument based on RaspberryPi.
https://www.samplerbox.org
429 stars 97 forks source link

Is MIDI with GPIO serial still working as of today? #49

Open josephernest opened 2 years ago

josephernest commented 2 years ago

See https://www.samplerbox.org/article/midiinwithrpi point 3.

Needs to be double-checked if it still works nowadays, with new kernels.

There are 3 places to check:

Then we have to connect a real hardware synthesizer (e.g. Roland or Yamaha), and see if it still works.

mojca commented 2 years ago

I cannot check whether it works "with any hardware midi device" (I only have an Arduino), but I'm thinking of doing the reverse test first: try to open a serial connection and send some messages from RPi, while measuring the rate with oscilloscope. Once that gets confirmed, test in the other direction.

That second test sounds a bit more tricky to me because the messages might get interpreted correctly even at a slightly wrong baud rate settings.

By reading #24 it looks like one might have to verify this on:

When things broke for me, it might be that it was a result of some mixture of apt-get update && apt-get upgrade, switching between RPi 2B+ and RPi4, ...

What's the oldest OS that you want to target?

On https://www.raspberrypi.com/software/operating-systems/ there is a link to Debian 11 2022-04-04-raspios-bullseye-armhf-lite.img.xz, but your scripts are currently pointing to Debian 10.

josephernest commented 2 years ago

With oscilloscope it might work, and then finally not work on a real Roland, Yamaha synth, etc. So I'll do this test one of these days with real synthesizers, to be sure everything works without the 38400 baud hack :)

rolfmeurer commented 2 years ago

Python script MIDI IN via SERIAL PORT is very poor. Running status is not considered, so most keyboards produce stuck notes. The Python script then accepts neither NOTE OFF as a NOTE ON message with Velocity=0 nor NOTE OFF as a 0x8n message