-
Notifications
You must be signed in to change notification settings - Fork 0
/
mdExerciseBatchInfo
executable file
·116 lines (116 loc) · 3.5 KB
/
mdExerciseBatchInfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash
#
# set MD_SCRIPT_ROOT (e.g. in ~/.bash_profile)
# export MD_SCRIPT_ROOT=~/musodojo/documents/mdExerciseBatchScript
# set MSCORE_PLUGIN_ROOT (e.g. in ~/.bash_profile)
# export MSCORE_PLUGIN_ROOT=~/MuseScore3/Plugins
#
#
# ****************************
# If there is anything arguments in the command line
# this function is called
# outputs info to check over to terminal
# ****************************
#
sanityCheck () {
echo "";
echo " File Name ${exerciseFileName}";
echo "Musescore Name ${exerciseMuseScoreName}";
echo " YouTube Name ${exerciseYoutubeName}";
echo "";
echo "${#keysFileNames[@]}, ${#keysMusescoreNames[@]}, ${#keysYoutubeNames[@]}, ${#keysMusescoreNumbers[@]}";
echo "";
for ((i=0; i<${#keysFileNames[@]}; i++))
do
echo "${keysFileNames[$i]}, ${keysMusescoreNames[$i]}, ${keysYoutubeNames[$i]}, ${keysMusescoreNumbers[$i]}";
done;
}
#
# ****************************
# ********** TITLES **********
# ****************************
#
exercise="Minor";
exerciseFileName="MinorPentatonicScaleOneOctave";
exerciseMuseScoreName="Minor Pentatonic Scale One Octave";
exerciseYoutubeName="Minor Pentatonic Scale One Octave at 100bpm";
#
# naming convention examples below
#
#exerciseFileName="MelodicMinorScaleOneOcatve";
#exerciseMuseScoreName="Melodic Minor Scale One Octave";
#exerciseYoutubeName="Melodic Minor Scale One Octave at 100bpm";
#
#exerciseFileName="MinorScaleTo5th";
#exerciseMuseScoreName="Minor Scale to 5th";
#exerciseYoutubeName="Minor Scale to 5th at 60bpm";
#
# ****************************
# *********** KEYS ***********
# ****************************
#
# -7 = C flat major / A flat minor
# -6 = G flat major / E flat minor
# -5 = D flat major / B flat minor
# -4 = A flat major / F minor
# -3 = E flat major / C minor
# -2 = B flat major / G minor
# -1 = F major / D minor
# 0 = C major / A minor
# 1 = G major / E minor
# 2 = D major / B minor
# 3 = A major / F sharp minor
# 4 = E major / C sharp minor
# 5 = B major / G sharp minor
# 6 = F sharp major / D sharp minor
# 7 = C sharp major / A sharp minor
#
# many keys
#
keysFileNamesUniversal=("fFlat" "cFlat" "gFlat" "dFlat" "aFlat" "eFlat" "bFlat" "f" "c" "g" "d" "a" "e" "b" "fSharp" "cSharp" "gSharp" "dSharp" "aSharp" "eSharp" "bSharp");
keysMusescoreNamesUniversal=("F♭" "C♭" "G♭" "D♭" "A♭" "E♭" "B♭" "F" "C" "G" "D" "A" "E" "B" "F♯" "C♯" "G♯" "D♯" "A♯" "E♯" "B♯");
keysYoutubeNamesUniversal=("F♭ F Flat" "C♭ C Flat" "G♭ G Flat" "D♭ D Flat" "A♭ A Flat" "E♭ E Flat" "B♭ B Flat" "F" "C" "G" "D" "A" "E" "B" "F♯ F Sharp" "C♯ C Sharp" "G♯ G Sharp" "D♯ D Sharp" "A♯ A Sharp" "E♯ E Sharp" "B♯ B Sharp");
case ${exercise} in
"Major")
universalIndex="1";
;;
"Dorian")
universalIndex="3";
;;
"Phrygian")
universalIndex="5";
;;
"Lydian")
universalIndex="0";
;;
"Mixolydian")
universalIndex="2";
;;
"Minor")
universalIndex="4";
;;
"Locrian")
universalIndex="6";
;;
*)
echo "exercise name is not from standard list";
exit 1;
;;
esac
keysFileNames=("${keysFileNamesUniversal[@]:${universalIndex}:15}");
keysMusescoreNames=("${keysMusescoreNamesUniversal[@]:${universalIndex}:15}");
keysYoutubeNames=("${keysYoutubeNamesUniversal[@]:${universalIndex}:15}");
#
# more variables
#
keysMusescoreNumbers=("-7" "-6" "-5" "-4" "-3" "-2" "-1" "0" "1" "2" "3" "4" "5" "6" "7");
colorVariants=("BnW" "Color");
youtubeBatchNumber=4;
#
# if command line argument mdExerciseBatchScript
# run the sanity check function above
#
if [ $# -gt 0 ]
then
sanityCheck;
fi