Skip to content

Commit

Permalink
Allow midi output device to be a quoted string with whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Rippert committed Jan 10, 2019
1 parent c772857 commit 10ebd79
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions NetOSC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function cctapspeed {
oldtime=0
if [ $# -gt 5 ]; then mult=$6; else mult=1; fi

{ receivemidi ts dev $mididevice channel $ccchannel control-change $ccnumber |
{ receivemidi ts dev "$mididevice" channel $ccchannel control-change $ccnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand All @@ -86,7 +86,7 @@ function cctaptime {
oldtime=0
if [ $# -gt 5 ]; then mult=$6; else mult=1; fi

{ receivemidi ts dev $mididevice channel $ccchannel control-change $ccnumber |
{ receivemidi ts dev "$mididevice" channel $ccchannel control-change $ccnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand All @@ -109,7 +109,7 @@ function noteontapspeed {
oldtime=0
if [ $# -gt 5 ]; then mult=$6; else mult=1; fi

{ receivemidi ts dev $mididevice channel $notechannel note-on $notenumber |
{ receivemidi ts dev "$mididevice" channel $notechannel note-on $notenumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand All @@ -135,7 +135,7 @@ function noteontaptime {
oldtime=0
if [ $# -gt 5 ]; then mult=$6; else mult=1; fi

{ receivemidi ts dev $mididevice channel $notechannel note-on $notenumber |
{ receivemidi ts dev "$mididevice" channel $notechannel note-on $notenumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand All @@ -158,7 +158,7 @@ function pchtapspeed {
oldtime=0
if [ $# -gt 5 ]; then mult=$6; else mult=1; fi

{ receivemidi ts dev $mididevice channel $pchchannel program-change $pchnumber |
{ receivemidi ts dev "$mididevice" channel $pchchannel program-change $pchnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand All @@ -185,7 +185,7 @@ function pchtaptime {
oldtime=0
if [ $# -gt 5 ]; then mult=$6; else mult=1; fi

{ receivemidi ts dev $mididevice channel $pchchannel program-change $pchnumber |
{ receivemidi ts dev "$mididevice" channel $pchchannel program-change $pchnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand Down Expand Up @@ -223,7 +223,7 @@ function cc2param {

oldtime=0

{ receivemidi ts dev $mididevice channel $ccchannel control-change $ccnumber |
{ receivemidi ts dev "$mididevice" channel $ccchannel control-change $ccnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
newtime="$((10#$msec+10#$sec*1000+10#$min*60000+10#$hr*3600000))"
Expand All @@ -246,7 +246,7 @@ function cc2toggle {
oscpath=$5
format=$6

{ receivemidi ts dev $mididevice channel $ccchannel control-change $ccnumber |
{ receivemidi ts dev "$mididevice" channel $ccchannel control-change $ccnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
if [ $dat -eq $onvalue ]
Expand All @@ -266,7 +266,7 @@ function note2toggle {
oscpath=$4
format=$5

{ receivemidi ts dev $mididevice channel $notechannel nn note $notenumber |
{ receivemidi ts dev "$mididevice" channel $notechannel nn note $notenumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
if [ $typenum -eq $notenumber -a $dat -gt 0 ]
Expand Down Expand Up @@ -471,7 +471,7 @@ function pch2 {

shift 2

{ receivemidi ts dev $mididevice channel $pchchannel program-change $pchnumber |
{ receivemidi ts dev "$mididevice" channel $pchchannel program-change $pchnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum
do
echo "$@" > $cpipe
Expand All @@ -485,7 +485,7 @@ function cc2 {

shift 3

{ receivemidi ts dev $mididevice channel $ccchannel control-change $ccnumber |
{ receivemidi ts dev "$mididevice" channel $ccchannel control-change $ccnumber |
while IFS=":. " read hr min sec msec ch chnum type typenum dat
do
if [ $dat -eq $value ]
Expand Down Expand Up @@ -733,6 +733,7 @@ xairip=$1
xairport=$2 # ipv4 address of XAir mixer
mididevice=$3


XAir_Interface -i $xairip -p $xairport -v 0 -t 0 -f $pipe <> $pipe &
sendmidi -- <> $mpipe &

Expand Down

0 comments on commit 10ebd79

Please sign in to comment.