From: Rudolf Polzer Date: Sat, 20 Nov 2021 19:00:46 +0000 (-0500) Subject: nokia2tuba: improve legato. X-Git-Tag: xonotic-v0.8.5~53 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fe5eadf2c2f338a4cba3d768ac7b1217ea897bbb;p=xonotic%2Fxonotic.git nokia2tuba: improve legato. Oops, had this commit laying around quite long. --- diff --git a/misc/tools/nokia2tuba.sh b/misc/tools/nokia2tuba.sh index ac9172ed..f96ed065 100755 --- a/misc/tools/nokia2tuba.sh +++ b/misc/tools/nokia2tuba.sh @@ -6,6 +6,8 @@ defaultoctave=1 defaultlength=4 baseoctave=1 gato=-0.1 +mingato=0.034 +maxgato=-0.034 tuba_note_42="moveleft back crouch fire" tuba_note_43="back crouch fire" @@ -123,6 +125,14 @@ playnote() { noteoff=$(echo "$time + $gato" | bc -l) ;; esac + noteoff=$(echo " + minnoteoff = $time + $mingato; + maxnoteoff = $time + $duration + $maxgato; + noteoff = $noteoff; + if (noteoff > maxnoteoff) { noteoff = maxnoteoff; } + if (noteoff < minnoteoff) { noteoff = minnoteoff; } + noteoff; + " | bc -l) echo "defer $time \"$(tuba +)\"" echo "defer $noteoff \"$(tuba -)\"" fi