[linux-audio-user] Re: Reading MIDI Program Change with bash script

Sean Edwards cybersean3000 at yahoo.com
Thu Feb 23 23:48:39 EST 2006

It is very simple.  I want to connect a MIDI program
change to a shell script execution.  For example, if
MIDI program change 5 is detected, it would run a
shell script that plays a file with ecasound or
ogg123; if program change 2 is detected, a shell
script would execute an ecasound chain.

Four requirements:
1) Associate MIDI program change numbers with
arbitrary files.

2) Listen on a MIDI channel for a MIDI program change

3) When a program change is detected, execute the file
associated with the received program number.

4) After file is launched, return to listening mode
and wait for another program change.

To allow MIDI sequencer output triggered by a program
change, it would be nice for the the listener on the
MIDI-In be assigned a channel, but allow global
playback of MIDI-Out on all MIDI channels.

Why bash/shell scripts?  I need the Linux distro to be
small, fast, and able to run on recycled hardware or a
flash drive.  It may also run headless, or with a very
small display.

So far, the hardest part appears to be getting the
MIDI Channel and program change info.

--- Carlo Capocasa <capocasa at gmx.net> wrote:

> I don't think there's anything available but I could
> code you a small
> utility if you like, sounds like a fairly
> straight-forward task...
> What exactly do you want to use it for?
> Carlo

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Linux-audio-user mailing list