lilith wrote:bluebell wrote:I use the following script to connect my MIDI keyboards to qtractor:
Code: Select all
#!/bin/bash
gx1=`aconnect -i | grep 'Client.*GX61' | cut -d " " -f 2 | tr -d ':'`
gx2=`aconnect -i | grep 'Client.*Code 61' | cut -d " " -f 2 | tr -d ':'`
qt=`aconnect -o | grep 'Client.*Qtractor' | cut -d " " -f 2 | tr -d ':'`
for KB in $gx1 $gx2
do
for I in 0 1 2 3
do
aconnect ${KB}:${I} $qt:0
done
done
Oops.... Do you have a link where this is explained?
It's basic shell scripting and the use of aconnect. The 3 lines in the beginning use "aconnect -i" for MIDI inputs (my keyboards) and "aconnect -o" for Qtractor as output/destination.
It's all about finding out the client numbers.
grep 'Client.*Qtractor' -> find a line for Qtractor
cut -d " " -f 2 -> get "129:" out of "Client 129: 'Qtractor' [Typ=User]"
tr -d ':' -> remove the ":"
With those number I can run aconnect to make the connections. The "for I in 0 1 2 3" is due to the fact that one of my keaboard has 4 "sub"-clients. Don't know why. Maybe these represent the possible zones I could set on the keyboard.