FreeDrum on Rasberry PI with bluetooth 5.48 and fluidsynth

Dear all,

I have two FreeDrum sticks (drumming in the air, gives bluetooth MIDI), and I had them working on Raspbian by installing bluetooth 5.48 (https://mclarenlabs.com/blog/2019/01/korg-microkey-air-37-bluetooth-midi-keyboard-with-raspberry-pi/ ) and fluidsynth. Now, yes it worked, but way too much latency. So I am trying patchbox OS.

  1. I am trying the same bluetooth upgrade as mentioned in the URL above, however the bluetooth is -after the update to 5.48- quite unstable. I can not really configure the bluetooth graphically (it resets now and then), and at the commandline with bluetoothctl it gives “Waiting to connect to bluetoothtd…” frequently. Is there something I should do to free bluetooth from any pre-installed things?

And, perhaps an idea to upgrade to bluetooth 5.48 out of the box in a next image? Would be nice to use MIDI through bluetooth by default (it is updated in the new buster raspbian updates).

  1. Secondly, aside from bluetooth, when I start fluidsynth
    fluidsynth -a jack -m alsa_seq -R no -C no -j /usr/share/sounds/sf2/FluidR3_GM.sf2 &
    it gives a lot of error messages
    Cannoc connect to server request channel
    exec of JACK server (command="#!/bin/sh") failed: No such file or directory
    JackShmReadWritePtr::ackShmReadWritePtr - Init not done for -1, skipping unlock
    fluidsynth: error: Failed to connect to Jack server.
    I am not used to jack, so, what am I doing wrong? I assume that starting up fluidsynth is quite basic. I do not have any hardware added, this is just a plain naked PI3B+.

  2. Thirdly. How am I ever going to get this working automaticly? Are these alsa_seq ports always on the same place? I hate this ‘aconnect’ stuff because I do not want to work with assigning virtual devices, but I want to connect these hardware drumsticks permanently to fluidsynth. Is there an other way than aconnect? I want this to run headless and when I plug in the power (combined with a bass amplifier in one box with a 3A amplifier and a 16A batterypack ).

Super super thanks for hints!
Niels

Patchbox OS upgrade to Buster is planned to happen in the near future, we’ll keep an eye on the bluetoothctl version within the new image, so it’s >=5.48.

As for fluidsynth and jack - it should not be starting a new server, but rather it should connect to the one running in the background. This should be achieved automatically by having the right environment variables defined, they are pre-defined by default in /etc/environment, in particular the JACK_PROMISCUOUS_SERVER=jack. It also depends on how the ‘fluidsynth’ binary itseIf was built - if it’s using older Jack development libraries, it might not support this functionality. Where from did you get the ‘fluidsynth’ installed?

To get MIDI connections automatically, Patchbox OS does have our own solution to this problem using amidiauto, it should automatically connect all hardware and software MIDI ports together, but you can also explicitly define the connections in a configuration file.

Super thanks for your answer back. I’ll wait for buster then, because things are kinda scrambled after updating it myself… Or, maybe I will install things on a buster, get things working like it did, and then optimise Raspbian&jack, maybe that is the fastest way to get it headless.

I don’t follow your answer on fluidsynth. I assumed I was just starting it up with that command, not aware of starting any “server” like behavior. It should just connect to jack with this command and not start jack. Maybe yes its linked with a different version… I installed with “sudo apt install fluidsynth”. I’ll ask the guys at fluidsynth.

I will dig into amidiauto. Sounds great!! Both the sticks have the same name though, only their bluetooth signature differs…