SamplerBox icon indicating copy to clipboard operation
SamplerBox copied to clipboard

Is MIDI with GPIO serial still working as of today?

Open josephernest opened this issue 3 years ago • 3 comments
trafficstars

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:

  • https://github.com/josephernest/SamplerBox/blob/master/isoimage/root/boot/config.txt
  • https://github.com/josephernest/SamplerBox/blob/master/isoimage/root/boot/cmdline.txt
  • https://github.com/josephernest/SamplerBox/blob/ea16c5f943fd2faf2d6f43807036a10d8578fa6c/samplerbox.py#L387

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

josephernest avatar Aug 08 '22 20:08 josephernest

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:

  • various Debian versions
  • various RPi models (at least zero, 2B, 4)
  • maybe both 32-bit and 64-bit(?)
  • using both serial and USB connection and I'm not sure if I can cover all combinations of them, but I can try some. I won't have hardware access before the weekend (and no hardware + oscilloscope combination before next week).

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.

mojca avatar Aug 08 '22 22:08 mojca

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 :)

josephernest avatar Aug 09 '22 10:08 josephernest

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

rolfmeurer avatar Aug 23 '22 16:08 rolfmeurer