I will not go into too much detail in this post as the basics are well covered at his site. The keyboard you can see is Virtual MIDI Piano Keyboard VMPK running on Windows 7 with a PuTTY remote shell.
wget http://www.varal.org/ttymidi/ttymidi.tar.gz
tar -zxvf ttymidi.tar.gz
cd ttymidi/
make
sudo make install
ttymidi -s /dev/ttyAMA0 -b 38400 &
Will run ttymidi in the back ground.
ttymidi -s /dev/ttyAMA0 -b 38400 -v
Will run ttymidi in verbose mode (midi traffic displayed on screen).
aconnect -iol
Will display available ALSA connecters, see fluidsynth
aconnect
Is used to connect inputs and outputs within ALSA.
aplaymidi -p 128:1 your_midid_file.mid will send a MIDI file to the MIDI out.
Missing pthread library in Makefile
ReplyDeleteagreed. You need to add -lpthread to make file.
ReplyDeleteI've same problem, but don't know how to solve. What we are doing with -lpthread ? I've do this: make -lpthread but compiler returns an error. I'm a beginner, please help me. Thanks
ReplyDelete@Massimo Meli: Do the following - "sudo nano Makefile", then add "-lpthread" to line "gcc src/ttymidi.c -o ttymidi -lasound"
ReplyDeleteSource: https://zuzebox.wordpress.com/2015/12/13/setting-up-rpi-midi-and-fluid-synth-softsynth/
Many thanks, this worked perfectly. :D
ReplyDeleteI'm confused. If midi standard is specified for 31250 baud rate, then why ttymidi does not support that rate?
ReplyDeletettymidi acts as serial to AKSA bridge, 31250 is not a standard baudrate, so eg. it receive 38400 (that is standard baudrate) from other devices like Arduino
ReplyDelete