[LAU] sending random midi notes from a bash script

David Santamauro david.santamauro at gmail.com
Sat Feb 6 10:44:00 EST 2010


On Sat,  6 Feb 2010 14:46:19 +0000 (GMT)
"james morris" <james at jwm-art.net> wrote:

> 
> I want to send a random midi note each time a bash script is called...
> 
> Not for anything useful, just experimenting...
> 
> I guess the tool would best be connecting to a midi-through port
> rather than hard-coding a particular synth?
> 
> The tool would just be required to send a single midi note to some
> port. The note to be sent should be specifiable on command line,
> along with length/velocity ... probably would be enough.
> 
> Any ideas?

# play middle C for 2 seconds
# on channel 1 then turn it off
amidi -p hw:1,0 -S "90 3C 7F" \
sleep 2 \
amidi -p hw:1,0 -S "90 3C 00"

Replace your port as needed...

Hope that helps.

David


More information about the Linux-audio-user mailing list