Using Volumio OS on Raspberry Pi 5 as the main player for a Pianoforce solenoid player equipped grand piano with electronic accompaniment system. My core library is > 32,000 titles and the music is stored on a dedicated external SSD.
I’d appreciate any experience advice on a little project to enable me to use Volumio to play solo piano (physical player piano) .MID files instead of their “analog MIDI” .mp3 counterpart required for the “accessory input black box” supplied by Pianoforce.*
I believe that it is a rather simple matter to have a co-process running on the Raspberry Pi 5 that uses an available Volumio API to determine the type of file playing. Then I can find a simple program that will allow me to “mute” the sound card HAT and then use a local MIDI player (on the Volumio micro-SD “main” storage) to a USB port of the Raspberry. The MIDI files themselves will likely be on the micro-SD as while I have tens of thousands they are tiny requiring less than 2 gb.
I would greatly appreciate any comments or suggestions particularly as to potential difficulties.
Since all of the solo piano songs are in .MP3 format while those accompanied with mono (A+B) audio in 90% quality level .OGG or .FLAC it is very easy to distinguish them. Pause and other playback controls from the Volumio will of course be disabled as the sound card HAT will only be unmuted about ¼ second or so after the “snooping” program finds that Volumio is playing anything other than an .mp3
*The reason for this is significant because the “best” so-called “analog MIDI” encoding I can use with the accessory input box has only 5-bit (32 possibilities) velocity information while MIDI has 7-bit (128 possibilities) as well as precise timing. MIDI uses delta time (how much time elapsed since the last event ) for timing which means that it is impossible to exactly match to the 44.1khz sampling frequency of .WAV files or compressions thereof.