Linux example code in C for ALSA MIDI out. Could not find any working short example, so I made this.
sudo apt-get install libasound2-dev
gcc -o alsa_midi_out alsa_midi_out.c -lasound
./alsa_midi_out
- Start program in terminal it will give a MIDI out unit to connect to a soundsource with MIDI-in.
- Connect it together with a program like aconnectgui
- When ready press return for the first note.
- Continue to press return untill all 7 notes are played,
- then program exits automatically.