I have my MIDI enabled digital piano connected via USB. To play .mid files I am using pmidi. Sometimes when I stop playback (using ^C) some notes are still playing. I know that's because of how MIDI works. To make these notes stop playing I have to switch off and on my piano. That is inconvenient and bad for the device.
Is there a way to reset my MIDI device in software from command line? There is a MIDI command which does that, but I can't find a way to send it to the device.