Re: [LAU] building a bash script for jack midi connect-disconnect with toggle keybindings

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: linux-audio-user <linux-audio-user@...>
Date: Saturday, November 13, 2010 - 1:21 am

On Tue, Nov 9, 2010 at 5:51 PM, Paul Davis wrote:

...

this thread got me curious :)

an example using xbindkeys:

setup a script like this for the desired midi switching:

#!/bin/bash
if [ $1 = a ] ; then
jack_disconnect 'Non-Sequencer:midi_out-1' 'yoshimi-01:midi in'
jack_connect 'Non-Sequencer:midi_out-1' 'yoshimi:midi in'
elif [ $1 = b ] ; then
jack_disconnect 'Non-Sequencer:midi_out-1' 'yoshimi:midi in'
jack_connect 'Non-Sequencer:midi_out-1' 'yoshimi-01:midi in'
fi

for testing, invoke it with its arguments

./jmidiswitch.sh a
./jmidiswitch.sh b

install xbindkeys

create an appropriate file ~/.xbindkeysrc, containing:

# xbindkeys configuration
"$HOME/jmidiswitch.sh a"
Alt +a
"$HOME/jmidiswitch.sh b"
Alt +b

run xbindkeys,
and happy switching.

IIRC only jack2 allows for click-free port switching,
the tests I ran with jack1 and jack2-svn confirm this.

best,
d
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAU] building a bash script for jack midi connect-disco..., David Adler, (Sat Nov 13, 1:21 am)