Better function name than "execute"

This commit is contained in:
Job Bautista 2022-04-08 13:35:08 +08:00
parent 93fa7eceb5
commit d7a8176e02
6 changed files with 9 additions and 10 deletions

4
README
View File

@ -90,7 +90,7 @@ notes+=(
"0.05:489 # Custom frequencies too, though I'm not sure why you'd do that
)
execute # Useful for dividing the part that loops and the part that doesn't
createSoxPipes # Useful for dividing the part that loops and the part that doesn't
# Loop start
setTempo 160 # Change the BPM if needed
@ -132,7 +132,7 @@ notes+=(
"$si:${f[5]}"
)
execute
createSoxPipes
##############################################################################

View File

@ -348,4 +348,4 @@ notes+=(
"$fu:${as[5]}-902"
)
execute # loop yes $1
createSoxPipes # loop yes $1

View File

@ -300,4 +300,4 @@ notes+=(
"$fu:${as[4]}"
)
execute # loop yes $1
createSoxPipes # loop yes $1

View File

@ -79,7 +79,7 @@ notes+=(
"$qu:${g[4]}"
)
execute # loop no $1
createSoxPipes # loop no $1
notes=()
@ -250,4 +250,4 @@ notes+=(
"$qu:${g[4]}"
)
execute # loop yes $1
createSoxPipes # loop yes $1

View File

@ -59,8 +59,7 @@ function setTempo {
declare -a notes # In the following format - "$duration:${key}[pitch]"
declare melodyCount=0
function execute {
function createSoxPipes {
declare soxpipes
soxpipes=$(printf '\n"|sox -n -p synth '$(echo "${notes[0]}" |
sed 's/:.*//')' sin '$(echo "${notes[0]}" | sed 's/.*://')'"\n')

View File

@ -101,7 +101,7 @@ notes=(
"$si:${d[4]}"
"$qu:${f[4]}" # 62nd item
)
execute # loop no $1
createSoxPipes # loop no $1
# main loop
setTempo 155
@ -690,4 +690,4 @@ function verse7 {
}
verse7; verse7;
execute # loop yes $1
createSoxPipes # loop yes $1