From fe5eadf2c2f338a4cba3d768ac7b1217ea897bbb Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 20 Nov 2021 14:00:46 -0500 Subject: [PATCH] nokia2tuba: improve legato. Oops, had this commit laying around quite long. --- misc/tools/nokia2tuba.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.39.2