[LAU] sending random midi notes from a bash script

james morris james at jwm-art.net
Sat Feb 6 11:50:15 EST 2010


On 6/2/2010, "David Santamauro" <david.santamauro at gmail.com> wrote:

>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.

Yes, thanks, perfect :)


More information about the Linux-audio-user mailing list