Re: [LAU] executing arbitrary bash scripts from midi notes

From: Athanasios Silis <athanasios.silis@email-addr-hidden>
Date: Tue Nov 04 2014 - 03:50:59 EET

ace!
thank you all for the replies!
i'll get into it the following days.
I did not mention that before - it still shouldn't change much - I hope
these can work in a headless environment. right?

On Sun, Nov 2, 2014 at 1:30 PM, Tito Latini <tito.01beta@email-addr-hidden> wrote:

> On Sun, Nov 02, 2014 at 12:27:44AM +0200, Athanasios Silis wrote:
> > hello there,
> > is there an application that I am missing that allows programming
> execution
> > of arbitrary bash scripts (or others) following pressing specific midi
> > notes?
> > googling about it did not provide any results..
> >
> > Thank you for your help
>
> A shell script could be enough. The follow example uses `amidi'
> with a virtual rawmidi port:
>
> #!/bin/bash
> # midistraggo
>
> do_something()
> {
> case $1 in
> 3C) play doooo.wav & ;;
> 3E) play reeee.wav & ;;
> 40) play miiii.wav & ;;
> 41) play faaaa.wav & ;;
> *) play boooo.wav & ;;
> esac
> }
>
> amidi -p virtual -d | while read -n2 st; do
> if [[ ${st} == 90 ]]; then
> read -n3 key
> do_something ${key}
> fi
> done
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user@email-addr-hidden
> http://lists.linuxaudio.org/listinfo/linux-audio-user
>

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Nov 4 04:15:01 2014

This archive was generated by hypermail 2.1.8 : Tue Nov 04 2014 - 04:15:02 EET