Tip for anyone composing in #Frescobaldi:
If you want to use MIDI input but get errors about an "invalid running status" when you attach a physical MIDI instrument, your instrument or interface may be generating SysEx messages that Frescobaldi can't understand. To work around this, you can use an app like #VMPK - in VMPK's "Connections" menu, set the input to your MIDI hardware; and in Frescobaldi's "Preferences" dialogue, set the input to VMPK. This makes your instrument change the internal state of VMPK's keyboard, and VMPK then generates appropriate MIDI events reflecting those changes. Since it's tolerant of SysEx messages in its input but won't generate them in its output, this effectively filters the stream to make it safe for Frescobaldi to consume.
As a bonus, you can see the keys light up on the VMPK interface to reflect the notes currently sounding, which may be more intuitive than reading the #Lilypond source Frescobaldi generates. If you also set something like #FluidSynth as the output in the "Connections" menu, you'll be able to hear what you're playing, too.