Initial commit

This commit is contained in:
Job Bautista 2022-04-05 22:52:30 +08:00
commit 663b1f7d01
5 changed files with 1276 additions and 0 deletions

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (C) 2022 Job Bautista
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

143
README Normal file
View File

@ -0,0 +1,143 @@
libsox.sh
---------
A library for GNU bash making it easier to create music with the power of SoX
synths.
Usage
-----
Simply source libsox.sh into the script containing the music. Example scripts
are included in this repository.
Usual syntax
------------
#############################################################################
#!/bin/bash
: '
Long copyright boilerplate goes here.
It's up to you though if you want to include it or not.
'
source path/to/libsox.sh
declare textintro='
Optional ASCII art and info about the music goes here.
'
setTempo 120 # In BPM
notes=(
# "$duration:${note[pitch]}"
# Basic durations:
# $fu = whole note
# $ha = half note
# $qu = quarter note
# $ei = eighth note
# $si = sixteenth note
# We use scientific pitch notation
"$ha:0" # This is how to do a half rest
"$si:${c[5]}" # A sixteenth C note in the 5th octave
"$ei:${gs[4]}" # An eighth G sharp in 4th octave
"$qu:${fs[4]}"
)
function repeatingNotes { # Use bash functions to repeat parts of your music
notes+=( # use += to append to the notes array
"$qu:${cs[4]}"
"$qu:${ds[4]}"
"$qu:${e[3]}"
"$qu:${gs[4]}"
)
}
repeatingNotes # Don't forget to call your function
notes+=( # continue adding notes
"$ei:${cs[4]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${ds[4]}"
)
repeatingNotes # Will repeat the earlier C sharp, D sharp, E, and G sharp
# quarter notes
notes+=(
"$dei:${b[2]}" # Dotted notes are supported
"$tqu:${a[3]}" # Triplets are supported
"0.02:${gs[4]}" # You can do custom durations
"0.05:489 # Custom frequencies too, though I'm not sure why you'd do that
)
execute loop no $1 # Will not loop
# Useful for intros that shouldn't be looped back into
# For $1, type --help in one of the example scripts
# Loop start
setTempo 160 # Change the BPM if needed
notes=( # Don't forget to reset the notes array. Don't append.
"$dei:${fs[5]}"
"$dei:${c[6]}"
"$ei:${as[5]}"
"$ha:${as[5]}"
"$ei:${as[5]}"
)
function commonNotes {
notes+=(
"$si:${cs[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${cs[5]}"
)
}
commonNotes; commonNotes;
notes+=(
"$qu:${c[4]}"
"$qu:${cs[4]}"
"$qu:${ds[4]}"
"$ei:${f[4]}"
"$si:${as[4]}"
"$dei:${f[4]}"
)
commonNotes
notes+=(
"$dei:${f[4]}"
"$ei:${as[4]}"
"$ei:${a[4]}"
"$ei:${a[4]}"
"$ei:${as[4]}"
"$si:${a[4]}"
"$si:${as[4]}"
"$si:${f[5]}"
)
execute loop yes $1 # Will loop forever.
# Don't forget to include the arguments! They're required.
#############################################################################
License
-------
Copyright (C) 2022 Job Bautista
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

303
casket-of-star.sh Executable file
View File

@ -0,0 +1,303 @@
#!/bin/bash
: '
Copyright (C) 2022 Job Bautista
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'
source libsox.sh
declare textintro='
___ __ __ ___ __ ___ __ ___ __ __
\ / |__ /__` /__` |__ | / \ |__ /__` | /\ |__) /__`
\/ |___ .__/ .__/ |___ |___ \__/ | .__/ | /~~\ | \ .__/
_ _
// \ \_//
__ __ ___ ___ __ ___ __ ___ __
/ ` /\ /__` |__/ |__ | / \ |__ /__` | /\ |__)
\__, /~~\ .__/ | \ |___ | \__/ | .__/ | /~~\ | \
星の器 ~ Casket of Star
Composed by ZUN for Touhou Gensoukyou: Lotus Land Story
Arranged by Job Bautista
'
setTempo 170
# intro
function intro-common {
notes+=(
"$ei:${e[4]}"
"$ei:${a[4]}"
"$ei:${b[4]}"
"$qu:${e[4]}"
"$ei:${a[4]}"
"$ei:${b[4]}"
"$qu:${d[5]}"
"$ei:${c[5]}"
"$ei:${b[4]}"
"$qu:${a[4]}"
)
}
function intro-part1 {
notes+=(
"$ei:${e[4]}"
"$ei:${a[4]}"
"$ei:${b[4]}"
)
}
intro-common; intro-part1;
intro-common; intro-part1;
intro-common;
notes+=(
"$ei:${b[4]}"
"$ei:${c[5]}"
"$ei:${d[5]}"
"$ei:${e[5]}"
"$qu:0"
"$ei:${e[5]}"
"$qu:0"
"$ei:${e[5]}"
"0.02:0"
"$ei:${e[5]}"
"$qu:0"
"$qu:${e[5]}"
"0.02:0"
"$ei:${e[5]}"
"$ei:${d[5]}"
"$ei:${c[5]}"
"$ei:${b[4]}"
)
# verse 1
function verse1-common {
notes+=(
"$dqu:${a[4]}"
"$qu:${e[4]}"
"$ei:${a[4]}"
"$ei:${e[5]}"
"$ei:${d[5]}"
"$ei:0"
"$ei:${b[4]}"
"$ei:0"
"$qu:${g[4]}"
"$ei:${a[4]}"
"$qu:${b[4]}"
)
}
function verse1-part1 {
notes+=(
"$ei:${a[4]}"
"$ei:${b[4]}"
"$ei:${c[5]}"
"$qu:${b[4]}"
"$ei:${g[4]}"
"$ei:${e[4]}"
"$qu:${a[4]}"
)
}
function verse1-part2 {
notes+=(
"$ei:${c[5]}"
"$ei:${d[5]}"
"$ei:${e[5]}"
"$qu:${d[5]}"
)
}
function verse1-backgrnd {
notes+=(
"$ei:${a[3]}"
"$ei:${e[4]}"
"$ei:${a[3]}"
"$ei:0"
"$ei:${a[3]}"
"$ei:${e[4]}"
"$ei:${a[3]}"
)
}
function verse1-repeat {
verse1-common; verse1-part1;
verse1-backgrnd
verse1-common
}
verse1-repeat
verse1-part2
notes+=( "$ei:${b[4]}" "$ei:${g[4]}" "$qu:${a[4]}" )
verse1-backgrnd
verse1-repeat
verse1-part2
notes+=( "$ei:${e[5]}" "$ei:${b[4]}" "$qu:${c[5]}" )
verse1-backgrnd
# verse 2
notes+=(
"$ha:${a[4]}"
"$ei:${g[4]}"
"$ei:${e[4]}"
"$ei:${b[4]}"
"$ha:${a[4]}"
"0.02:0"
)
function verse2-common {
notes+=(
"$ei:${a[4]}"
"$ei:${b[4]}"
"$ei:${c[5]}"
"$ei:${d[5]}"
)
}
verse2-common
notes+=(
"$qu:${e[5]}"
"$qu:${a[5]}"
"$qu:${g[5]}"
"$ei:${a[5]}"
"$ha:${e[5]}"
"0.02:0"
"$ei:${e[5]}"
"$ei:${d[5]}"
"$si:${c[5]}"
"$si:${d[5]}"
"$ei:${b[4]}"
"$ha:${a[4]}"
"$dqu:${b[4]}"
"$ha:${c[5]}"
)
verse2-common
notes+=(
"$ha:${e[5]}"
"$qu:${d[5]}"
"$ei:${a[5]}"
"$ha:${gs[5]}"
"$ei:${e[6]}"
"$ei:${d[6]}"
"$ei:${c[6]}"
"$ei:${b[5]}"
"$ei:${gs[5]}"
"$ha:0"
)
# verse 3
notes+=(
"$qu:${cs[4]}"
"$qu:${e[4]}"
)
function verse3-common1 {
notes+=(
"$dei:${fs[5]}"
"$dei:${e[5]}"
"$ei:${cs[5]}"
"$ei:0"
"$ei:${cs[6]}"
"$ei:${b[5]}"
"$ei:${a[5]}"
"$dei:${gs[5]}"
"$dei:${a[5]}"
"$ei:${gs[5]}"
"$dei:${fs[5]}"
"$dei:${e[5]}"
)
}
verse3-common1
notes+=(
"$ei:${cs[5]}"
"$ei:0"
"$ei:${fs[5]}"
"$ei:${e[5]}"
"$ei:${cs[5]}"
"$dei:${f[5]}"
"$dei:${b[5]}"
"$ei:${a[5]}"
"$ha:${a[5]}"
"$ei:${a[5]}"
"$ei:${gs[5]}"
"$ei:${e[5]}"
"$ei:${cs[5]}"
)
verse3-common1
notes+=(
"$ei:${b[4]}"
"$ei:0"
"$ei:${fs[4]}"
"$ei:${gs[4]}"
"$ei:${a[4]}"
"$dei:${gs[4]}"
"$dei:${b[4]}"
"$ei:${cs[5]}"
"$dei:${cs[4]}"
"$dei:${fs[4]}"
"$ei:${gs[4]}"
"$ei:${a[4]}"
"$ei:${b[4]}"
"$ei:${cs[5]}"
"$ei:${e[5]}"
)
function verse3-common2 {
notes+=(
"$dei:${g[5]}"
"$dei:${f[5]}"
"$ei:${d[5]}"
"$ei:0"
"$ei:${d[6]}"
"$ei:${c[6]}"
"$ei:${as[5]}"
"$dei:${a[5]}"
"$dei:${as[5]}"
"$ei:${a[5]}"
"$dei:${g[5]}"
"$dei:${f[5]}"
)
}
verse3-common2
notes+=(
"$ei:${d[5]}"
"$ei:0"
"$ei:${g[5]}"
"$ei:${f[5]}"
"$ei:${d[5]}"
"$dei:${fs[5]}"
"$dei:${c[6]}"
"$ei:${as[5]}"
"$ha:${as[5]}"
"$ei:${as[5]}"
"$ei:${a[5]}"
"$ei:${f[5]}"
"$ei:${d[5]}"
)
verse3-common2
notes+=(
"$ei:${c[5]}"
"$ei:0"
"$ei:${g[4]}"
"$ei:${f[4]}"
"$ei:${d[4]}"
"$dei:${fs[4]}"
"$dei:${c[5]}"
"$ei:${d[5]}"
"$fu:${as[4]}"
)
execute loop yes $1

118
libsox.sh Executable file
View File

@ -0,0 +1,118 @@
#!/bin/bash
: '
Copyright (C) 2022 Job Bautista
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'
# notes
c=(16 32 65 130 261 523 1046 2093 4186)
cs=(17 34 69 138 277 554 1108 2217 4434)
d=(18 36 73 146 293 587 1174 2349 4698)
ds=(19 38 77 155 311 622 1244 2489 4978)
e=(20 41 82 164 329 659 1318 2637 5274)
f=(21 43 87 174 349 698 1396 2793 5587)
fs=(23 46 92 184 369 739 1479 2959 5919)
g=(24 48 97 195 391 783 1567 3135 6271)
gs=(25 51 103 207 415 830 1661 3322 6644)
a=(27 55 110 220 440 880 1760 3520 7040)
as=(29 58 116 233 466 932 1864 3729 7458)
b=(30 61 123 246 493 987 1975 3951 7902)
declare -rg c cs d ds e f g gs a as b
function setTempo {
declare -g BPM=$1
# durations
declare -g fu=$(echo "scale=3; 240 / $BPM" | bc -l) # Whole note
declare -g ha=$(echo "scale=3; 120 / $BPM" | bc -l) # Half note
declare -g qu=$(echo "scale=3; 60 / $BPM" | bc -l) # Quarter note
declare -g ei=$(echo "scale=3; 30 / $BPM" | bc -l) # Eighth note
declare -g si=$(echo "scale=3; 15 / $BPM" | bc -l) # Sixteenth note
declare -g dqu=$(echo "scale=3; 90 / $BPM" | bc -l) # Dotted-quarter note
declare -g dei=$(echo "scale=3; 45 / $BPM" | bc -l) # Dotted-eighth note
declare -g dsi=$(echo "scale=3; 22.5 / $BPM" | bc -l) # Dotted-sixteenth note
declare -g tqu=$(echo "scale=3; 40 / $BPM" | bc -l) # Triplet-quarter note
declare -g tei=$(echo "scale=3; 20 / $BPM" | bc -l) # Triplet-eighth note
declare -g tsi=$(echo "scale=3; 10 / $BPM" | bc -l) # Triplet-sixteenth note
}
declare -a notes # In the following format - "$duration:${key}[pitch]"
declare melodyCount=0
function execute {
declare soxpipes
function soxPipesCreator {
for note in "${notes[@]}"
do
soxpipes+=$(printf '"|sox -n -p synth '$(echo "$note" |
sed 's/:.*//')' sin '$(echo "$note" | sed 's/.*://')'" ')
done
}
function soxPlayPipes { echo "$soxpipes" | xargs play -S -V1; };
if [[ $1 = "loop" && $2 ]]
then
case $3 in
"--arggen")
soxPipesCreator &&
echo "$soxpipes"
;;
"--help")
printf "%s\n" \
"Usage: $(basename $0) (--arggen)" \
"" \
"Generates sounds from SoX according to the notes array and plays them." \
"" \
" --arggen Will not play music; instead it will redirect" \
" all generated SoX pipes to standard output." \
" --help Display this help." \
""
exit 0
;;
*)
if [ $melodyCount -eq 0 ]
then
printf "$textintro"
fi
echo "Pipes are loading, please wait..."
soxPipesCreator &&
trap 'pkill -f "play -S -V1"; exit 0' SIGINT SIGTERM
if [ $2 = "yes" ]
then
while true
do
soxPlayPipes
((melodyCount++))
done
else
soxPlayPipes
((melodyCount++))
fi
;;
esac
unset soxpipes # For multiple instances of this function
else
echo "Error: Missing loop argument"
exit 1
fi
}

693
sleeping-terror.sh Executable file
View File

@ -0,0 +1,693 @@
#!/bin/bash
: '
Copyright (C) 2022 Job Bautista
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'
source libsox.sh
declare textintro='
__ ___ ___ __ __ ___ ___ __ __ __ __
/__` | |__ |__ |__) | |\ | / _` | |__ |__) |__) / \ |__)
.__/ |___ |___ |___ | | | \| \__> | |___ | \ | \ \__/ | \
Sleeping Terror
Composed by ZUN for Touhou Gensoukyou: Lotus Land Story
Arranged by Job Bautista
'
# intro
setTempo 102
notes=(
"$qu:${ds[3]}"
"$qu:${f[3]}"
"$qu:${fs[3]}"
"$ei:${as[3]}"
"$si:${cs[3]}"
"$si:${ds[3]}"
"$ei:${ds[3]}"
"$ei:${ds[3]}"
"$ei:${f[3]}"
"$ei:${f[3]}"
"$ei:${fs[3]}"
"$si:${as[3]}"
"$dei:${cs[3]}"
"$ei:${ds[3]}"
"$qu:${ds[3]}"
"$qu:${f[3]}"
"$qu:${fs[3]}"
"$ei:${as[3]}"
"$si:${cs[3]}"
"$si:${d[3]}"
"$ei:${d[3]}"
"$ei:${ds[3]}"
"$si:${d[3]}"
"$si:${ds[3]}"
"$si:${as[3]}"
"$si:${ds[3]}"
"$si:${gs[3]}"
"$si:${d[3]}"
"$qu:${f[3]}"
"$qu:${fs[3]}"
"$qu:${gs[3]}"
"$ei:${as[3]}"
"$si:${ds[4]}"
"$ei:${as[3]}"
"$ei:${gs[3]}"
"$ei:${fs[3]}"
"$ei:${fs[3]}"
"$ei:${gs[3]}"
"$ei:${gs[3]}"
"$ei:${as[3]}"
"$si:${ds[4]}"
"$dei:${as[3]}"
"$si:${as[3]}"
"$si:${gs[3]}"
"$si:${fs[3]}"
"$si:${f[3]}"
"$qu:${fs[3]}"
"$qu:${gs[3]}"
"$ei:${as[3]}"
"$si:${ds[4]}"
"$dei:${as[3]}"
"$ei:${ds[4]}"
"$ei:${d[4]}"
"$ei:${d[4]}"
"$ei:${ds[4]}"
"$si:${d[4]}"
"$si:${ds[4]}"
"$si:${as[4]}"
"$si:${ds[4]}"
"$si:${gs[4]}"
"$si:${d[4]}"
"$qu:${f[4]}" # 62nd item
)
execute loop no $1
# main loop
setTempo 155
# fast bridge
notes=(
"$si:${c[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${c[4]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${c[4]}"
"$si:${e[3]}"
"$si:${ds[3]}"
)
# verse 1
function verse1-common {
notes+=(
"$qu:${cs[4]}"
"$qu:${ds[4]}"
"$qu:${e[4]}"
"$ei:${gs[4]}"
"$si:${b[3]}"
"$si:${cs[4]}"
)
}
verse1-common
notes+=(
"$ei:${cs[4]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${ds[4]}"
"$ei:${e[4]}"
"$si:${gs[4]}"
"$dei:${b[3]}"
"$ei:${cs[4]}"
)
verse1-common
notes+=(
"$ei:${c[4]}"
"$ei:${c[4]}"
"$ei:${cs[4]}"
"$si:${c[4]}"
"$si:${cs[4]}"
"$si:${gs[4]}"
"$si:${cs[4]}"
"$si:${cs[4]}"
"$si:${fs[4]}"
"$si:${c[4]}"
"$qu:${ds[4]}"
"$qu:${e[4]}"
"$qu:${fs[4]}"
"$ei:${gs[4]}"
"$si:${cs[5]}"
"$dei:${gs[4]}"
"$ei:${fs[4]}"
"$ei:${e[4]}"
"$ei:${e[4]}"
"$ei:${fs[4]}"
"$ei:${fs[4]}"
"$ei:${gs[4]}"
"$si:${cs[5]}"
"$si:${gs[4]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${ds[4]}"
"$qu:${e[4]}"
"$qu:${fs[4]}"
"$ei:${gs[4]}"
"$si:${cs[5]}"
"$dei:${gs[4]}"
"$ei:${cs[5]}"
"$ei:${c[5]}"
"$ei:${c[5]}"
"$ei:${cs[5]}"
"$si:${c[5]}"
"$si:${cs[5]}"
"$si:${gs[5]}"
"$si:${cs[5]}"
"$si:${fs[5]}"
"$si:${c[5]}"
"$qu:${ds[5]}"
)
# verse 2
notes+=( "$qu:${gs[3]}" )
function verse2-common1 {
notes+=(
"$si:${cs[4]}"
"$si:${ds[4]}"
"$si:${e[4]}"
"$si:${gs[4]}"
"$si:${cs[5]}"
"$si:${ds[5]}"
"$si:${e[5]}"
"$si:${gs[5]}"
"$si:${e[5]}"
"$si:${ds[5]}"
"$si:${cs[5]}"
"$si:${gs[4]}"
)
}
verse2-common1
notes+=(
"$qu:${fs[3]}"
"$si:${b[3]}"
"$si:${cs[4]}"
"$si:${ds[4]}"
"$si:${fs[4]}"
"$si:${b[4]}"
"$si:${cs[5]}"
"$si:${ds[5]}"
"$si:${fs[5]}"
"$si:${ds[5]}"
"$si:${cs[5]}"
"$si:${b[4]}"
"$si:${fs[4]}"
"$qu:${e[3]}"
)
verse2-common1
notes+=(
"$qu:${ds[3]}"
"$si:${c[4]}"
"$si:${cs[4]}"
"$si:${ds[4]}"
"$si:${fs[4]}"
"$si:${c[5]}"
"$si:${cs[5]}"
"$si:${ds[5]}"
"$si:${fs[5]}"
"$si:${ds[5]}"
"$si:${cs[5]}"
"$si:${c[5]}"
"$si:${fs[4]}"
"$qu:${cs[4]}"
)
function verse2-common2 {
notes+=(
"$si:${cs[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${cs[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${cs[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
)
}
verse2-common2
notes+=(
"$qu:${ds[4]}"
"$si:${ds[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${ds[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$si:${ds[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$qu:${cs[4]}"
)
verse2-common2
notes+=(
"$qu:${c[4]}"
"$si:${c[5]}"
"$si:${gs[4]}"
"$si:${fs[4]}"
"$si:${e[4]}"
"$qu:${cs[4]}"
"$qu:${ds[4]}"
)
# verse 3
function verse3 {
function verse3-common {
notes+=(
"$ei:${e[4]}"
"$ei:${fs[4]}"
"$ei:${gs[4]}"
"$ei:${cs[4]}"
"$si:${ds[4]}"
"$si:${e[4]}"
"$ei:${ds[4]}"
"$ei:${cs[4]}"
"$ei:${b[3]}"
"$qu:${cs[4]}"
)
}
verse3-common
notes+=(
"$ei:${gs[3]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${e[4]}"
"$ei:${ds[4]}"
"$ei:${gs[3]}"
)
verse3-common
notes+=(
"$ei:${ds[4]}"
"$ei:${gs[4]}"
"$ei:${fs[4]}"
"$ei:${ds[4]}"
"$ei:${e[4]}"
"$ei:${cs[4]}"
"$ei:${gs[4]}"
"$ei:${cs[5]}"
"$ei:${ds[5]}"
"$ei:${gs[4]}"
"$si:${e[5]}"
"$si:${fs[5]}"
"$ei:${e[5]}"
"$ei:${ds[5]}"
"$ei:${b[4]}"
"$si:${fs[4]}"
"$dei:${gs[4]}"
"$ei:${b[3]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${e[4]}"
"$ei:${e[4]}"
"$ei:${fs[4]}"
"$ei:${gs[4]}"
"$ei:${cs[4]}"
"$si:${ds[4]}"
"$si:${e[4]}"
"$ei:${ds[4]}"
"$ei:${cs[4]}"
"$ei:${c[4]}"
"$ha:${cs[4]}"
"$ha:${ds[4]}"
)
}
verse3; verse3;
# verse 4
function verse4-common {
notes+=(
"$qu:${as[3]}"
"$qu:${c[4]}"
"$qu:${cs[4]}"
"$ei:${f[4]}"
"$si:${gs[3]}"
"$si:${as[3]}"
)
}
verse4-common
notes+=(
"$ei:${as[3]}"
"$ei:${as[3]}"
"$ei:${c[4]}"
"$ei:${c[4]}"
"$ei:${cs[4]}"
"$si:${f[4]}"
"$dei:${gs[3]}"
"$ei:${as[3]}"
)
verse4-common
notes+=(
"$ei:${a[3]}"
"$ei:${a[3]}"
"$ei:${as[3]}"
"$si:${a[3]}"
"$si:${as[3]}"
"$si:${f[4]}"
"$si:${as[3]}"
"$si:${ds[4]}"
"$si:${a[3]}"
"$qu:${c[4]}"
"$qu:${cs[4]}"
"$qu:${ds[4]}"
"$ei:${f[4]}"
"$si:${as[4]}"
"$dei:${f[4]}"
"$ei:${ds[4]}"
"$ei:${cs[4]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${ds[4]}"
"$ei:${f[4]}"
"$si:${as[4]}"
"$si:${f[4]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${c[4]}"
"$qu:${cs[4]}"
"$qu:${ds[4]}"
"$ei:${f[4]}"
"$si:${as[4]}"
"$dei:${f[4]}"
"$ei:${as[4]}"
"$ei:${a[4]}"
"$ei:${a[4]}"
"$ei:${as[4]}"
"$si:${a[4]}"
"$si:${as[4]}"
"$si:${f[5]}"
"$si:${as[4]}"
"$si:${ds[5]}"
"$si:${a[4]}"
"$qu:${c[5]}"
)
# verse 5
notes+=( "$qu:${f[3]}" )
function verse5-common1 {
notes+=(
"$si:${as[3]}"
"$si:${c[4]}"
"$si:${cs[4]}"
"$si:${f[4]}"
"$si:${as[4]}"
"$si:${c[5]}"
"$si:${cs[5]}"
"$si:${f[5]}"
"$si:${cs[5]}"
"$si:${c[5]}"
"$si:${as[4]}"
"$si:${f[4]}"
)
}
verse5-common1
notes+=(
"$qu:${ds[3]}"
"$si:${gs[3]}"
"$si:${as[3]}"
"$si:${c[4]}"
"$si:${ds[4]}"
"$si:${gs[4]}"
"$si:${as[4]}"
"$si:${c[5]}"
"$si:${ds[5]}"
"$si:${c[5]}"
"$si:${as[4]}"
"$si:${gs[4]}"
"$si:${ds[4]}"
"$qu:${cs[3]}"
)
verse5-common1
notes+=(
"$qu:${c[3]}"
"$si:${a[3]}"
"$si:${as[3]}"
"$si:${c[4]}"
"$si:${ds[4]}"
"$si:${a[4]}"
"$si:${as[4]}"
"$si:${c[5]}"
"$si:${ds[5]}"
"$si:${c[5]}"
"$si:${as[4]}"
"$si:${a[4]}"
"$si:${ds[4]}"
"$qu:${as[3]}"
)
function verse5-common2 {
notes+=(
"$si:${as[4]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${as[4]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${as[4]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
)
}
verse5-common2
notes+=(
"$qu:${c[4]}"
"$si:${c[5]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${c[5]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$si:${c[5]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$qu:${as[3]}"
)
verse5-common2
notes+=(
"$qu:${a[3]}"
"$si:${a[4]}"
"$si:${f[4]}"
"$si:${ds[4]}"
"$si:${cs[4]}"
"$qu:${as[3]}"
"$qu:${c[4]}"
)
# verse 6
function verse6 {
function verse6-common {
notes+=(
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${f[4]}"
"$ei:${as[3]}"
"$si:${c[4]}"
"$si:${cs[4]}"
"$ei:${c[4]}"
"$ei:${as[3]}"
"$ei:${gs[3]}"
"$qu:${as[3]}"
)
}
verse6-common
notes+=(
"$ei:${f[3]}"
"$ei:${as[3]}"
"$ei:${c[4]}"
"$ei:${cs[4]}"
"$ei:${c[4]}"
"$ei:${f[3]}"
)
verse6-common
notes+=(
"$ei:${c[4]}"
"$ei:${f[4]}"
"$ei:${ds[4]}"
"$ei:${c[4]}"
"$ei:${cs[4]}"
"$ei:${as[3]}"
"$ei:${f[4]}"
"$ei:${as[4]}"
"$ei:${c[5]}"
"$ei:${f[4]}"
"$si:${cs[5]}"
"$si:${ds[5]}"
"$ei:${cs[5]}"
"$ei:${c[5]}"
"$ei:${gs[4]}"
"$si:${ds[4]}"
"$dei:${f[4]}"
"$ei:${gs[3]}"
"$ei:${as[3]}"
"$ei:${c[4]}"
"$ei:${as[3]}"
"$ei:${c[4]}"
"$ei:${cs[4]}"
"$ei:${cs[4]}"
"$ei:${ds[4]}"
"$ei:${f[4]}"
"$ei:${as[3]}"
"$si:${c[4]}"
"$si:${cs[4]}"
"$ei:${c[4]}"
"$ei:${as[3]}"
"$ei:${a[3]}"
"$qu:${as[3]}"
"$ei:${cs[4]}"
"$ei:${f[4]}"
"$qu:${c[4]}"
"$ei:${cs[4]}"
"$ei:${f[4]}"
)
}
verse6; verse6;
# verse 7
function verse7 {
function verse7-common {
notes+=(
"$ei:${d[4]}"
"$ei:${e[4]}"
"$ei:${fs[4]}"
"$ei:${b[3]}"
"$si:${cs[4]}"
"$si:${d[4]}"
"$ei:${cs[4]}"
"$ei:${b[3]}"
"$ei:${a[3]}"
"$qu:${b[3]}"
)
}
verse7-common
notes+=(
"$ei:${fs[3]}"
"$ei:${b[3]}"
"$ei:${cs[4]}"
"$ei:${d[4]}"
"$ei:${cs[4]}"
"$ei:${fs[3]}"
)
verse7-common
notes+=(
"$ei:${cs[4]}"
"$ei:${fs[4]}"
"$ei:${e[4]}"
"$ei:${cs[4]}"
"$ei:${d[4]}"
"$ei:${b[3]}"
"$ei:${fs[4]}"
"$ei:${b[4]}"
"$ei:${cs[5]}"
"$ei:${fs[4]}"
"$si:${d[5]}"
"$si:${e[5]}"
"$ei:${d[5]}"
"$ei:${cs[5]}"
"$ei:${a[4]}"
"$si:${e[4]}"
"$dei:${fs[4]}"
"$ei:${a[3]}"
"$ei:${b[3]}"
"$ei:${cs[4]}"
"$ei:${b[3]}"
"$ei:${cs[4]}"
"$ei:${d[4]}"
"$ei:${d[4]}"
"$ei:${e[4]}"
"$ei:${fs[4]}"
"$ei:${b[3]}"
"$si:${cs[4]}"
"$si:${d[4]}"
"$ei:${cs[4]}"
"$ei:${b[3]}"
"$ei:${as[3]}"
"$qu:${b[3]}"
"$ei:${d[4]}"
"$ei:${fs[4]}"
"$qu:${cs[4]}"
"$ei:${d[4]}"
"$ei:${fs[4]}"
)
}
verse7; verse7;
execute loop yes $1