Close

Software Thoughts

A project log for Pi-ano

Portable MIDI synth for use with an existing USB-MIDI out keyboard

themekonThe_Mekon 05/01/2020 at 14:430 Comments

I have fluidsynth installed and it'll happily run with the roll-up keyboard. I've attempted no optimisations but the latency is acceptable.

At the moment there's no startup script on the pi.  I have cobbled together some javascript to run on the remote tablet or 'phone to send commands to the pi. It runs through logging in, starting fluidsynth and connecting any plugged-in MIDI device.  It works and allows the user to monitor the whole startup process, but it can be slow and doesn't allow for the pi-ano to start without a wi-fi connected controller.  For now, this is a good way to adjust the settings easily, but once I've worked out a typical useable setup I'll put the commands into a shell script along the lines of that usd by PiMiDi.

My current start-up commands (URLencoded):

'screen',
'%01c',
' ',
'fluidsynth+-C0+-R0+-r22050+-l+-a+alsa+-o+audio.alsa.device=plughw:0+-o+synth.polyphony=64+/usr/share/sounds/sf2/FluidR3_GM.sf2',
'%01c',
' ',
'aconnect -i',
'aconnect 20:0 128:0',
'ls /usr/share/sounds/sf2/',
'%011',
'fonts'

For testing, the roll-up keyboard takes up an unreasonable amount of space so I've been trying to use the much smaller (and cooler) Harmonix Rock Band keyboard via a USB/MIDI converter.  The pi recognises the coverter as a "QinHeng Electronics CH345 MIDI adapter", but I don't seem to receive any commands fron the keyboard to fluidsynth after connecting.  Connecting the keyboard and adapter to an old (pre General MIDI) Roland MIDI module allows me to hear sounds transmitted from the keyboard in drum mode (channel 10) but nothing in its normal keyboard operation (channel 1).  I believe the roll-up USB keyboard transmits on channel 0, so perhaps the problem lies in the way instruments are mapped in fluidsynth or the way they are connected in Alsa Connect. 


This is all a bit of a dark art to me.  My plan is to keep thowing things at it until either it works, or I give up and get out the ironing board to set up the roll-up keybord instead.

Pi-ano with Roland MIDI Sequencer
Trying to connect to real MIDI devices via a cheap USB/MIDI adaptor - no luck so far

Discussions