head_music 7.0.4 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/lib/head_music/{diatonic_interval → analysis/diatonic_interval}/category.rb +1 -1
- data/lib/head_music/{diatonic_interval → analysis/diatonic_interval}/naming.rb +6 -6
- data/lib/head_music/{diatonic_interval → analysis/diatonic_interval}/parser.rb +4 -4
- data/lib/head_music/{diatonic_interval → analysis/diatonic_interval}/semitones.rb +4 -4
- data/lib/head_music/{diatonic_interval → analysis/diatonic_interval}/size.rb +1 -1
- data/lib/head_music/{diatonic_interval.rb → analysis/diatonic_interval.rb} +19 -16
- data/lib/head_music/{harmonic_interval.rb → analysis/harmonic_interval.rb} +5 -2
- data/lib/head_music/{melodic_interval.rb → analysis/melodic_interval.rb} +6 -3
- data/lib/head_music/{motion.rb → analysis/motion.rb} +6 -3
- data/lib/head_music/content/bar.rb +2 -2
- data/lib/head_music/content/composition.rb +3 -3
- data/lib/head_music/content/note.rb +1 -1
- data/lib/head_music/content/placement.rb +1 -1
- data/lib/head_music/content/position.rb +1 -1
- data/lib/head_music/content/rhythmic_value.rb +3 -3
- data/lib/head_music/{staff.rb → content/staff.rb} +6 -3
- data/lib/head_music/content/voice.rb +2 -2
- data/lib/head_music/{instrument.rb → instruments/instrument.rb} +10 -7
- data/lib/head_music/{data → instruments}/instrument_families.yml +49 -0
- data/lib/head_music/{instrument_family.rb → instruments/instrument_family.rb} +5 -2
- data/lib/head_music/{data → instruments}/instruments.yml +116 -0
- data/lib/head_music/{instrument → instruments}/staff.rb +5 -2
- data/lib/head_music/{instrument → instruments}/staff_scheme.rb +7 -2
- data/lib/head_music/{instrument → instruments}/variant.rb +6 -3
- data/lib/head_music/locales/en.yml +22 -0
- data/lib/head_music/locales/es.yml +22 -22
- data/lib/head_music/{alteration.rb → rudiment/alteration.rb} +9 -6
- data/lib/head_music/{chromatic_interval.rb → rudiment/chromatic_interval.rb} +7 -4
- data/lib/head_music/{circle.rb → rudiment/circle.rb} +9 -6
- data/lib/head_music/{clef.rb → rudiment/clef.rb} +7 -4
- data/lib/head_music/{consonance.rb → rudiment/consonance.rb} +4 -1
- data/lib/head_music/{interval_cycle.rb → rudiment/interval_cycle.rb} +12 -9
- data/lib/head_music/{key_signature → rudiment/key_signature}/enharmonic_equivalence.rb +4 -4
- data/lib/head_music/{key_signature.rb → rudiment/key_signature.rb} +10 -7
- data/lib/head_music/{letter_name.rb → rudiment/letter_name.rb} +9 -6
- data/lib/head_music/{meter.rb → rudiment/meter.rb} +6 -3
- data/lib/head_music/{musical_symbol.rb → rudiment/musical_symbol.rb} +4 -1
- data/lib/head_music/{pitch → rudiment/pitch}/enharmonic_equivalence.rb +4 -4
- data/lib/head_music/{pitch → rudiment/pitch}/octave_equivalence.rb +2 -2
- data/lib/head_music/{pitch.rb → rudiment/pitch.rb} +30 -27
- data/lib/head_music/{pitch_class.rb → rudiment/pitch_class.rb} +14 -11
- data/lib/head_music/{pitch_class_set.rb → rudiment/pitch_class_set.rb} +5 -2
- data/lib/head_music/{pitch_set.rb → rudiment/pitch_set.rb} +14 -11
- data/lib/head_music/{quality.rb → rudiment/quality.rb} +4 -1
- data/lib/head_music/{reference_pitch.rb → rudiment/reference_pitch.rb} +5 -2
- data/lib/head_music/{register.rb → rudiment/register.rb} +6 -3
- data/lib/head_music/rudiment/rhythm.rb +6 -0
- data/lib/head_music/{rhythmic_unit.rb → rudiment/rhythmic_unit.rb} +5 -2
- data/lib/head_music/{scale.rb → rudiment/scale.rb} +12 -9
- data/lib/head_music/{scale_degree.rb → rudiment/scale_degree.rb} +8 -5
- data/lib/head_music/{scale_type.rb → rudiment/scale_type.rb} +4 -1
- data/lib/head_music/{solmization.rb → rudiment/solmization.rb} +4 -1
- data/lib/head_music/{sonority.rb → rudiment/sonority.rb} +7 -4
- data/lib/head_music/{spelling.rb → rudiment/spelling.rb} +20 -17
- data/lib/head_music/{tuning.rb → rudiment/tuning.rb} +6 -3
- data/lib/head_music/style/annotation.rb +6 -6
- data/lib/head_music/style/guidelines/consonant_climax.rb +4 -4
- data/lib/head_music/style/guidelines/diatonic.rb +1 -1
- data/lib/head_music/style/guidelines/step_out_of_unison.rb +1 -1
- data/lib/head_music/version.rb +1 -1
- data/lib/head_music.rb +50 -46
- metadata +51 -51
- data/lib/head_music/rhythm.rb +0 -3
- /data/lib/head_music/{data → rudiment}/clefs.yml +0 -0
- /data/lib/head_music/{solmizations.yml → rudiment/solmizations.yml} +0 -0
@@ -458,6 +458,13 @@ cymbal:
|
|
458
458
|
staff_schemes:
|
459
459
|
default:
|
460
460
|
- clef: neutral_clef
|
461
|
+
didgeridoo:
|
462
|
+
family_key: didgeridoo
|
463
|
+
variants:
|
464
|
+
default:
|
465
|
+
staff_schemes:
|
466
|
+
default:
|
467
|
+
- clef: neutral_clef
|
461
468
|
double_bass:
|
462
469
|
alias_name_keys:
|
463
470
|
- contrabass
|
@@ -561,6 +568,15 @@ hammered_dulcimer:
|
|
561
568
|
default:
|
562
569
|
- clef: treble_clef
|
563
570
|
orchestra_section_key: percussion
|
571
|
+
harmonica:
|
572
|
+
alias_name_keys:
|
573
|
+
- mouth_organ
|
574
|
+
family_key: harmonica
|
575
|
+
variants:
|
576
|
+
default:
|
577
|
+
staff_schemes:
|
578
|
+
default:
|
579
|
+
- clef: treble_clef
|
564
580
|
harp:
|
565
581
|
family_key: harp
|
566
582
|
variants:
|
@@ -963,6 +979,13 @@ subcontrabass_saxophone:
|
|
963
979
|
sounding_transposition: -38
|
964
980
|
range_categories:
|
965
981
|
- subcontrabass
|
982
|
+
sitar:
|
983
|
+
family_key: sitar
|
984
|
+
variants:
|
985
|
+
default:
|
986
|
+
staff_schemes:
|
987
|
+
default:
|
988
|
+
- clef: treble_clef
|
966
989
|
snare_drum:
|
967
990
|
alias_name_keys:
|
968
991
|
- side_drum
|
@@ -997,6 +1020,15 @@ sousaphone:
|
|
997
1020
|
sounding_transposition: 0
|
998
1021
|
range_categories:
|
999
1022
|
- bass
|
1023
|
+
steelpan:
|
1024
|
+
alias_name_keys:
|
1025
|
+
- steel_drum
|
1026
|
+
family_key: steelpan
|
1027
|
+
variants:
|
1028
|
+
default:
|
1029
|
+
staff_schemes:
|
1030
|
+
default:
|
1031
|
+
- clef: treble_clef
|
1000
1032
|
suspended_cymbal:
|
1001
1033
|
family_key: cymbal
|
1002
1034
|
variants:
|
@@ -1005,6 +1037,8 @@ suspended_cymbal:
|
|
1005
1037
|
default:
|
1006
1038
|
- clef: neutral_clef
|
1007
1039
|
synthesizer:
|
1040
|
+
alias_name_keys:
|
1041
|
+
- electronic_keyboard
|
1008
1042
|
family_key: synthesizer
|
1009
1043
|
variants:
|
1010
1044
|
default:
|
@@ -1014,6 +1048,13 @@ synthesizer:
|
|
1014
1048
|
name_key: right_hand
|
1015
1049
|
- clef: bass_clef
|
1016
1050
|
name_key: left_hand
|
1051
|
+
tabla:
|
1052
|
+
family_key: tabla
|
1053
|
+
variants:
|
1054
|
+
default:
|
1055
|
+
staff_schemes:
|
1056
|
+
default:
|
1057
|
+
- clef: neutral_clef
|
1017
1058
|
tam_tam:
|
1018
1059
|
alias_name_keys:
|
1019
1060
|
- gong
|
@@ -1069,6 +1110,13 @@ tenor_voice:
|
|
1069
1110
|
sounding_transposition: -12
|
1070
1111
|
range_categories:
|
1071
1112
|
- tenor
|
1113
|
+
theremin:
|
1114
|
+
family_key: theremin
|
1115
|
+
variants:
|
1116
|
+
default:
|
1117
|
+
staff_schemes:
|
1118
|
+
default:
|
1119
|
+
- clef: treble_clef
|
1072
1120
|
timpani:
|
1073
1121
|
alias_name_keys:
|
1074
1122
|
- kettledrum
|
@@ -1148,6 +1196,74 @@ tuba:
|
|
1148
1196
|
staff_schemes:
|
1149
1197
|
default:
|
1150
1198
|
- clef: bass_clef
|
1199
|
+
ukulele:
|
1200
|
+
alias_name_keys:
|
1201
|
+
- soprano_ukulele
|
1202
|
+
family_key: ukulele
|
1203
|
+
variants:
|
1204
|
+
default:
|
1205
|
+
staff_schemes:
|
1206
|
+
default:
|
1207
|
+
- clef: treble_clef
|
1208
|
+
range_categories:
|
1209
|
+
- soprano
|
1210
|
+
- alto
|
1211
|
+
pocket_ukulele:
|
1212
|
+
alias_name_keys:
|
1213
|
+
- sopranino_ukulele
|
1214
|
+
- piccolo_ukulele
|
1215
|
+
family_key: ukulele
|
1216
|
+
variants:
|
1217
|
+
default:
|
1218
|
+
staff_schemes:
|
1219
|
+
default:
|
1220
|
+
- clef: treble_clef
|
1221
|
+
range_categories:
|
1222
|
+
- sopranino
|
1223
|
+
- soprano
|
1224
|
+
concert_ukulele:
|
1225
|
+
alias_name_keys:
|
1226
|
+
- alto_ukulele
|
1227
|
+
family_key: ukulele
|
1228
|
+
variants:
|
1229
|
+
default:
|
1230
|
+
staff_schemes:
|
1231
|
+
default:
|
1232
|
+
- clef: treble_clef
|
1233
|
+
range_categories:
|
1234
|
+
- soprano
|
1235
|
+
- alto
|
1236
|
+
tenor_ukulele:
|
1237
|
+
family_key: ukulele
|
1238
|
+
variants:
|
1239
|
+
default:
|
1240
|
+
staff_schemes:
|
1241
|
+
default:
|
1242
|
+
- clef: treble_clef
|
1243
|
+
range_categories:
|
1244
|
+
- tenor
|
1245
|
+
baritone_ukulele:
|
1246
|
+
family_key: ukulele
|
1247
|
+
variants:
|
1248
|
+
default:
|
1249
|
+
staff_schemes:
|
1250
|
+
default:
|
1251
|
+
- clef: treble_clef
|
1252
|
+
range_categories:
|
1253
|
+
- alto
|
1254
|
+
- tenor
|
1255
|
+
- baritone
|
1256
|
+
bass_ukulele:
|
1257
|
+
family_key: ukulele
|
1258
|
+
variants:
|
1259
|
+
default:
|
1260
|
+
staff_schemes:
|
1261
|
+
default:
|
1262
|
+
- clef: bass_clef
|
1263
|
+
range_categories:
|
1264
|
+
- bass
|
1265
|
+
- baritone
|
1266
|
+
- tenor
|
1151
1267
|
vibraphone:
|
1152
1268
|
alias_name_keys:
|
1153
1269
|
- vibes
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
# Namespace for instrument definitions, categorization, and configuration
|
2
|
+
module HeadMusic::Instruments; end
|
3
|
+
|
4
|
+
class HeadMusic::Instruments::Staff
|
2
5
|
DEFAULT_CLEF = "treble_clef"
|
3
6
|
|
4
7
|
attr_reader :staff_scheme, :attributes
|
@@ -9,7 +12,7 @@ class HeadMusic::Instrument::Staff
|
|
9
12
|
end
|
10
13
|
|
11
14
|
def clef
|
12
|
-
HeadMusic::Clef.get(smart_clef_key)
|
15
|
+
HeadMusic::Rudiment::Clef.get(smart_clef_key)
|
13
16
|
end
|
14
17
|
|
15
18
|
def smart_clef_key
|
@@ -1,4 +1,9 @@
|
|
1
|
-
|
1
|
+
require_relative "staff"
|
2
|
+
|
3
|
+
# Namespace for instrument definitions, categorization, and configuration
|
4
|
+
module HeadMusic::Instruments; end
|
5
|
+
|
6
|
+
class HeadMusic::Instruments::StaffScheme
|
2
7
|
attr_reader :variant, :key, :list
|
3
8
|
|
4
9
|
def initialize(variant:, key:, list:)
|
@@ -13,7 +18,7 @@ class HeadMusic::Instrument::StaffScheme
|
|
13
18
|
|
14
19
|
def staves
|
15
20
|
@staves ||= list.map do |attributes|
|
16
|
-
HeadMusic::
|
21
|
+
HeadMusic::Instruments::Staff.new(self, attributes)
|
17
22
|
end
|
18
23
|
end
|
19
24
|
end
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
# Namespace for instrument definitions, categorization, and configuration
|
2
|
+
module HeadMusic::Instruments; end
|
3
|
+
|
4
|
+
class HeadMusic::Instruments::Variant
|
2
5
|
attr_reader :key, :attributes
|
3
6
|
|
4
7
|
def initialize(key, attributes = {})
|
@@ -10,13 +13,13 @@ class HeadMusic::Instrument::Variant
|
|
10
13
|
return unless attributes["pitch_designation"].to_s != ""
|
11
14
|
|
12
15
|
@pitch_designation ||=
|
13
|
-
HeadMusic::Spelling.get(attributes["pitch_designation"])
|
16
|
+
HeadMusic::Rudiment::Spelling.get(attributes["pitch_designation"])
|
14
17
|
end
|
15
18
|
|
16
19
|
def staff_schemes
|
17
20
|
@staff_schemes ||=
|
18
21
|
(attributes["staff_schemes"] || {}).map do |key, list|
|
19
|
-
HeadMusic::
|
22
|
+
HeadMusic::Instruments::StaffScheme.new(
|
20
23
|
key: key,
|
21
24
|
variant: self,
|
22
25
|
list: list
|
@@ -86,6 +86,7 @@ en:
|
|
86
86
|
mezzo_soprano_voice: mezzo-soprano
|
87
87
|
percussion: percussion
|
88
88
|
percussion_instrument: percussion instrument
|
89
|
+
pitched: pitched
|
89
90
|
plucked: plucked
|
90
91
|
plucked_instrument: plucked instrument
|
91
92
|
reed: reed
|
@@ -95,6 +96,7 @@ en:
|
|
95
96
|
stringed_instrument: stringed instrument
|
96
97
|
strings: strings
|
97
98
|
struck: struck
|
99
|
+
unpitched: unpitched
|
98
100
|
voice: voice
|
99
101
|
wind: wind
|
100
102
|
wind_instrument: wind instrument
|
@@ -119,6 +121,7 @@ en:
|
|
119
121
|
alto_flute: alto flute
|
120
122
|
alto_recorder: alto recorder
|
121
123
|
alto_saxophone: alto saxophone
|
124
|
+
alto_ukulele: alto ukulele
|
122
125
|
alto_voice: alto
|
123
126
|
arpeggione: arpeggione
|
124
127
|
bagpipe: bagpipe
|
@@ -126,6 +129,7 @@ en:
|
|
126
129
|
baritone_horn: baritone horn
|
127
130
|
baritone_oboe: baritone oboe
|
128
131
|
baritone_saxophone: baritone saxophone
|
132
|
+
baritone_ukulele: baritone ukulele
|
129
133
|
baritone_voice: baritone
|
130
134
|
bass: bass
|
131
135
|
bass_clarinet: bass clarinet
|
@@ -137,6 +141,7 @@ en:
|
|
137
141
|
bass_trombone: bass trombone
|
138
142
|
bass_trumpet: bass trumpet
|
139
143
|
bass_tuba: bass tuba
|
144
|
+
bass_ukulele: bass ukulele
|
140
145
|
bass_voice: bass
|
141
146
|
basset_horn: basset horn
|
142
147
|
basset_recorder: basset recorder
|
@@ -154,6 +159,7 @@ en:
|
|
154
159
|
clavichord: clavichord
|
155
160
|
concert_bells: concert bells
|
156
161
|
concert_cymbals: concert cymbals
|
162
|
+
concert_ukulele: concert ukulele
|
157
163
|
contra_great_bass_recorder: contra-great bass recorder
|
158
164
|
contrabass: contrabass
|
159
165
|
contrabass_clarinet: contrabass clarinet
|
@@ -171,8 +177,10 @@ en:
|
|
171
177
|
crotales: crotales
|
172
178
|
cymbal: cymbal
|
173
179
|
descant: descant
|
180
|
+
didgeridoo: didgeridoo
|
174
181
|
double_bass: double bass
|
175
182
|
double_contrabass_recorder: double-contrabass recorder
|
183
|
+
electronic_keyboard: electronic keyboard
|
176
184
|
english_horn: English horn
|
177
185
|
euphonium: euphonium
|
178
186
|
fiddle: fiddle
|
@@ -188,6 +196,7 @@ en:
|
|
188
196
|
great_highland_bagpipe: great highland bagpipe
|
189
197
|
guitar: guitar
|
190
198
|
hammered_dulcimer: hammered dulcimer
|
199
|
+
harmonica: harmonica
|
191
200
|
harp: harp
|
192
201
|
harpsichord: harpsichord
|
193
202
|
hautbois_d_amour: hautbois d'amour
|
@@ -204,6 +213,7 @@ en:
|
|
204
213
|
mezzo_soprano: mezzo-soprano
|
205
214
|
mezzo_soprano_voice: mezzo-soprano
|
206
215
|
military_drum: military drum
|
216
|
+
mouth_organ: mouth_organ
|
207
217
|
natural_horn: natural horn
|
208
218
|
oboe: oboe
|
209
219
|
oboe_d_amore: oboe d'amore
|
@@ -219,25 +229,33 @@ en:
|
|
219
229
|
piccolo_recorder: piccolo recorder
|
220
230
|
piccolo_saxophone: piccolo saxophone
|
221
231
|
piccolo_trumpet: piccolo trumpet
|
232
|
+
piccolo_ukulele: piccolo ukulele
|
222
233
|
pipe_organ: pipe organ
|
234
|
+
pocket_trumpet: pocket trumpet
|
235
|
+
pocket_ukulele: pocket ukulele
|
223
236
|
quart_bass_recorder: quart bass recorder
|
224
237
|
recorder: recorder
|
225
238
|
ride_cymbal: ride cymbal
|
226
239
|
saxophone: saxophone
|
227
240
|
side_drum: side drum
|
241
|
+
sitar: sitar
|
228
242
|
snare_drum: snare drum
|
229
243
|
sopranino_clarinet: sopranino clarinet
|
230
244
|
sopranino_recorder: sopranino recorder
|
231
245
|
sopranino_saxophone: sopranino saxophone
|
246
|
+
sopranino_ukulele: sopranino ukulele
|
232
247
|
sopranissimo_recorder: sopranissimo recorder
|
233
248
|
sopranissimo_saxophone: sopranissimo saxophone
|
234
249
|
soprano: soprano
|
235
250
|
soprano_clarinet: soprano clarinet
|
236
251
|
soprano_recorder: soprano recorder
|
237
252
|
soprano_saxophone: soprano saxophone
|
253
|
+
soprano_ukulele: soprano ukulele
|
238
254
|
soprano_voice: soprano
|
239
255
|
soprillo: soprillo
|
240
256
|
sousaphone: sousaphone
|
257
|
+
steelpan: steelpan
|
258
|
+
steel_drum: steel drum
|
241
259
|
string_bass: string bass
|
242
260
|
sub_bass_recorder: sub-bass recorder
|
243
261
|
sub_contrabass_recorder: sub-contrabass recorder
|
@@ -245,6 +263,7 @@ en:
|
|
245
263
|
subcontrabass_saxophone: subcontrabass saxophone
|
246
264
|
suspended_cymbal: suspended cymbal
|
247
265
|
synthesizer: synthesizer
|
266
|
+
tabla: tabla
|
248
267
|
tabor: tabor
|
249
268
|
tam_tam: tam-tam
|
250
269
|
tambourine: tambourine
|
@@ -255,7 +274,9 @@ en:
|
|
255
274
|
tenor_saxophone: tenor saxophone
|
256
275
|
tenor_trombone: tenor trombone
|
257
276
|
tenor_tuba: tenor tuba
|
277
|
+
tenor_ukulele: tenor ukulele
|
258
278
|
tenor_voice: tenor
|
279
|
+
theremin: theremin
|
259
280
|
timpani: timpani
|
260
281
|
timpanum: timpanum
|
261
282
|
tom_drum: tom drum
|
@@ -266,6 +287,7 @@ en:
|
|
266
287
|
trumpet: trumpet
|
267
288
|
tuba: tuba
|
268
289
|
tubular_bells: tubular bells
|
290
|
+
ukulele: ukulele
|
269
291
|
vibes: vibes
|
270
292
|
vibraphone: vibraphone
|
271
293
|
viola: viola
|
@@ -90,7 +90,7 @@ es:
|
|
90
90
|
accordion: acordeón
|
91
91
|
alto_clarinet: clarinete alto
|
92
92
|
alto_flute: flauta alto
|
93
|
-
alto_recorder: flauta
|
93
|
+
alto_recorder: flauta dulce alto
|
94
94
|
alto_saxophone: saxofón alto
|
95
95
|
alto_voice: contralto
|
96
96
|
arpeggione: arpeggione
|
@@ -105,14 +105,14 @@ es:
|
|
105
105
|
bass_drum: bombo
|
106
106
|
bass_guitar: bajo eléctrico
|
107
107
|
bass_oboe: oboe bajo
|
108
|
-
bass_recorder: flauta
|
108
|
+
bass_recorder: flauta dulce bajo
|
109
109
|
bass_saxophone: saxofón bajo
|
110
110
|
bass_trombone: trombón bajo
|
111
111
|
bass_trumpet: trompeta baja
|
112
112
|
bass_tuba: tuba baja
|
113
113
|
bass_voice: bajo
|
114
114
|
basset_horn: clarinete bajo
|
115
|
-
basset_recorder: flauta
|
115
|
+
basset_recorder: flauta dulce bajo
|
116
116
|
bassoon: fagot
|
117
117
|
bells: campanas
|
118
118
|
bugle: cornetín
|
@@ -127,10 +127,10 @@ es:
|
|
127
127
|
clavichord: clavicordio
|
128
128
|
concert_bells: carillón orquestal
|
129
129
|
concert_cymbals: platillos de orquesta
|
130
|
-
contra_great_bass_recorder:
|
130
|
+
contra_great_bass_recorder: flauta dulce contrabajo
|
131
131
|
contrabass: contrabajo
|
132
132
|
contrabass_clarinet: clarinete contrabajo
|
133
|
-
contrabass_recorder: flauta
|
133
|
+
contrabass_recorder: flauta dulce contrabajo
|
134
134
|
contrabass_saxophone: saxofón contrabajo
|
135
135
|
contrabass_tuba: tuba contrabajo
|
136
136
|
contrabassoon: contrafagot
|
@@ -143,9 +143,9 @@ es:
|
|
143
143
|
crash_cymbal: platillo de choque
|
144
144
|
crotales: crótalos
|
145
145
|
cymbal: cimbalos
|
146
|
-
descant: flauta
|
146
|
+
descant: flauta dulce soprano
|
147
147
|
double_bass: contrabajo
|
148
|
-
double_contrabass_recorder: flauta
|
148
|
+
double_contrabass_recorder: flauta dulce subcontrabajo
|
149
149
|
english_horn: corno inglés
|
150
150
|
euphonium: euphonium
|
151
151
|
fiddle: violín
|
@@ -154,10 +154,10 @@ es:
|
|
154
154
|
flute: flauta
|
155
155
|
fortepiano: fortepiano
|
156
156
|
french_horn: corno
|
157
|
-
garklein_recorder: flauta
|
157
|
+
garklein_recorder: flauta dulce garklein
|
158
158
|
glockenspiel: metallofono
|
159
159
|
gong: gong
|
160
|
-
great_bass_recorder: flauta
|
160
|
+
great_bass_recorder: flauta dulce gran bajo
|
161
161
|
great_highland_bagpipe: gaita escocesa
|
162
162
|
guitar: guitarra
|
163
163
|
hammered_dulcimer: salterio
|
@@ -180,7 +180,7 @@ es:
|
|
180
180
|
natural_horn: trompa natural
|
181
181
|
oboe: oboe
|
182
182
|
oboe_d_amore: oboe de amor
|
183
|
-
octocontrabass_recorder: flauta
|
183
|
+
octocontrabass_recorder: flauta dulce subcontrabajo
|
184
184
|
orchestral_chimes: campanas orquestales
|
185
185
|
orchestral_cymbals: platillos orquestales
|
186
186
|
organ: órgano
|
@@ -189,32 +189,32 @@ es:
|
|
189
189
|
piccolo: flautín
|
190
190
|
piccolo_clarinet: clarinete piccolo
|
191
191
|
piccolo_flute: flauta piccolo
|
192
|
-
piccolo_recorder: flauta
|
192
|
+
piccolo_recorder: flauta dulce piccolo
|
193
193
|
piccolo_saxophone: saxofón piccolo
|
194
194
|
piccolo_trumpet: trompeta piccolo
|
195
195
|
pipe_organ: órgano de tubos
|
196
|
-
quart_bass_recorder: flauta
|
197
|
-
recorder: flauta
|
196
|
+
quart_bass_recorder: flauta dulce bajo cuarteto
|
197
|
+
recorder: flauta dulce
|
198
198
|
ride_cymbal: platillo de conducción
|
199
199
|
saxophone: saxofón
|
200
|
-
side_drum: tambor
|
200
|
+
side_drum: tambor lateral
|
201
201
|
snare_drum: tambor de caja
|
202
202
|
sopranino_clarinet: clarinete sopranino
|
203
|
-
sopranino_recorder: flauta
|
203
|
+
sopranino_recorder: flauta dulce sopranino
|
204
204
|
sopranino_saxophone: saxofón sopranino
|
205
|
-
sopranissimo_recorder: flauta
|
205
|
+
sopranissimo_recorder: flauta dulce sopranissimo
|
206
206
|
sopranissimo_saxophone: saxofón sopranissimo
|
207
207
|
soprano: soprano
|
208
208
|
soprano_clarinet: clarinete soprano
|
209
|
-
soprano_recorder: flauta
|
209
|
+
soprano_recorder: flauta dulce soprano
|
210
210
|
soprano_saxophone: saxofón soprano
|
211
211
|
soprano_voice: voz de soprano
|
212
212
|
soprillo: soprillo
|
213
213
|
sousaphone: sousafón
|
214
214
|
string_bass: contrabajo de cuerdas
|
215
|
-
sub_bass_recorder: flauta
|
216
|
-
sub_contrabass_recorder: flauta
|
217
|
-
sub_great_bass_recorder: flauta
|
215
|
+
sub_bass_recorder: flauta dulce subbajo
|
216
|
+
sub_contrabass_recorder: flauta dulce subcontrabajo
|
217
|
+
sub_great_bass_recorder: flauta dulce subgran bajo
|
218
218
|
subcontrabass_saxophone: saxofón subcontrabajo
|
219
219
|
suspended_cymbal: platillo suspendido
|
220
220
|
synthesizer: sintetizador
|
@@ -224,7 +224,7 @@ es:
|
|
224
224
|
temple_blocks: bloques de templo
|
225
225
|
tenor: tenor
|
226
226
|
tenor_drum: tambor tenor
|
227
|
-
tenor_recorder: flauta
|
227
|
+
tenor_recorder: flauta dulce tenor
|
228
228
|
tenor_saxophone: saxofón tenor
|
229
229
|
tenor_trombone: trombón tenor
|
230
230
|
tenor_tuba: tuba tenor
|
@@ -233,7 +233,7 @@ es:
|
|
233
233
|
timpanum: tímpano
|
234
234
|
tom_drum: tom
|
235
235
|
tom_tom: tom-tom
|
236
|
-
treble_recorder: flauta
|
236
|
+
treble_recorder: flauta dulce contralto
|
237
237
|
triangle: triángulo
|
238
238
|
trombone: trombón
|
239
239
|
trumpet: trompeta
|
@@ -1,8 +1,11 @@
|
|
1
|
-
require "head_music/musical_symbol"
|
1
|
+
require "head_music/rudiment/musical_symbol"
|
2
2
|
|
3
|
-
# A
|
3
|
+
# A module for music rudiments
|
4
|
+
module HeadMusic::Rudiment; end
|
5
|
+
|
6
|
+
# An Alteration is a symbol that modifies pitch, such as a sharp, flat, or natural.
|
4
7
|
# In French, sharps and flats in the key signature are called "altérations".
|
5
|
-
class HeadMusic::Alteration
|
8
|
+
class HeadMusic::Rudiment::Alteration
|
6
9
|
include Comparable
|
7
10
|
|
8
11
|
attr_reader :identifier, :cents, :musical_symbols
|
@@ -51,7 +54,7 @@ class HeadMusic::Alteration
|
|
51
54
|
end
|
52
55
|
|
53
56
|
def self.get(identifier)
|
54
|
-
return identifier if identifier.is_a?(HeadMusic::Alteration)
|
57
|
+
return identifier if identifier.is_a?(HeadMusic::Rudiment::Alteration)
|
55
58
|
|
56
59
|
all.detect do |alteration|
|
57
60
|
alteration.representions.include?(identifier)
|
@@ -86,7 +89,7 @@ class HeadMusic::Alteration
|
|
86
89
|
end
|
87
90
|
|
88
91
|
def <=>(other)
|
89
|
-
other = HeadMusic::Alteration.get(other)
|
92
|
+
other = HeadMusic::Rudiment::Alteration.get(other)
|
90
93
|
cents <=> other.cents
|
91
94
|
end
|
92
95
|
|
@@ -104,7 +107,7 @@ class HeadMusic::Alteration
|
|
104
107
|
|
105
108
|
def initialize_musical_symbols(list)
|
106
109
|
@musical_symbols = (list || []).map do |record|
|
107
|
-
HeadMusic::MusicalSymbol.new(
|
110
|
+
HeadMusic::Rudiment::MusicalSymbol.new(
|
108
111
|
unicode: record[:unicode],
|
109
112
|
ascii: record[:ascii],
|
110
113
|
html_entity: record[:html_entity]
|
@@ -1,5 +1,8 @@
|
|
1
|
+
# A module for music rudiments
|
2
|
+
module HeadMusic::Rudiment; end
|
3
|
+
|
1
4
|
# A chromatic interval is the distance between two pitches measured in half-steps.
|
2
|
-
class HeadMusic::ChromaticInterval
|
5
|
+
class HeadMusic::Rudiment::ChromaticInterval
|
3
6
|
include Comparable
|
4
7
|
include HeadMusic::Named
|
5
8
|
|
@@ -37,7 +40,7 @@ class HeadMusic::ChromaticInterval
|
|
37
40
|
end
|
38
41
|
|
39
42
|
def simple
|
40
|
-
HeadMusic::ChromaticInterval.get(semitones % 12)
|
43
|
+
HeadMusic::Rudiment::ChromaticInterval.get(semitones % 12)
|
41
44
|
end
|
42
45
|
|
43
46
|
def simple?
|
@@ -60,11 +63,11 @@ class HeadMusic::ChromaticInterval
|
|
60
63
|
alias_method :specific_interval, :semitones
|
61
64
|
|
62
65
|
def +(other)
|
63
|
-
HeadMusic::ChromaticInterval.get(to_i + other.to_i)
|
66
|
+
HeadMusic::Rudiment::ChromaticInterval.get(to_i + other.to_i)
|
64
67
|
end
|
65
68
|
|
66
69
|
def -(other)
|
67
|
-
HeadMusic::ChromaticInterval.get((to_i - other.to_i).abs)
|
70
|
+
HeadMusic::Rudiment::ChromaticInterval.get((to_i - other.to_i).abs)
|
68
71
|
end
|
69
72
|
|
70
73
|
def <=>(other)
|
@@ -1,7 +1,10 @@
|
|
1
|
-
require "head_music/interval_cycle"
|
1
|
+
require "head_music/rudiment/interval_cycle"
|
2
|
+
|
3
|
+
# A module for music rudiments
|
4
|
+
module HeadMusic::Rudiment; end
|
2
5
|
|
3
6
|
# A Circle of Fifths or Fourths shows relationships between pitch classes
|
4
|
-
class HeadMusic::Circle < HeadMusic::IntervalCycle
|
7
|
+
class HeadMusic::Rudiment::Circle < HeadMusic::Rudiment::IntervalCycle
|
5
8
|
def self.of_fifths
|
6
9
|
get(:perfect_fifth)
|
7
10
|
end
|
@@ -12,20 +15,20 @@ class HeadMusic::Circle < HeadMusic::IntervalCycle
|
|
12
15
|
|
13
16
|
def self.get(interval = :perfect_fifth)
|
14
17
|
@circles ||= {}
|
15
|
-
diatonic_interval = HeadMusic::DiatonicInterval.get(interval)
|
18
|
+
diatonic_interval = HeadMusic::Analysis::DiatonicInterval.get(interval)
|
16
19
|
@circles[interval] ||= new(interval: diatonic_interval, starting_pitch: "C4")
|
17
20
|
end
|
18
21
|
|
19
22
|
def index(pitch_class)
|
20
|
-
pitch_classes.index(HeadMusic::Spelling.get(pitch_class).pitch_class)
|
23
|
+
pitch_classes.index(HeadMusic::Rudiment::Spelling.get(pitch_class).pitch_class)
|
21
24
|
end
|
22
25
|
|
23
26
|
def key_signatures_up
|
24
|
-
spellings_up.map { |spelling| HeadMusic::KeySignature.new(spelling) }
|
27
|
+
spellings_up.map { |spelling| HeadMusic::Rudiment::KeySignature.new(spelling) }
|
25
28
|
end
|
26
29
|
|
27
30
|
def key_signatures_down
|
28
|
-
spellings_down.map { |spelling| HeadMusic::KeySignature.new(spelling) }
|
31
|
+
spellings_down.map { |spelling| HeadMusic::Rudiment::KeySignature.new(spelling) }
|
29
32
|
end
|
30
33
|
|
31
34
|
def spellings_up
|
@@ -1,10 +1,13 @@
|
|
1
1
|
require "yaml"
|
2
2
|
|
3
|
+
# A module for music rudiments
|
4
|
+
module HeadMusic::Rudiment; end
|
5
|
+
|
3
6
|
# A clef assigns pitches to the lines and spaces of a staff.
|
4
|
-
class HeadMusic::Clef
|
7
|
+
class HeadMusic::Rudiment::Clef
|
5
8
|
include HeadMusic::Named
|
6
9
|
|
7
|
-
RECORDS = YAML.load_file(File.expand_path("
|
10
|
+
RECORDS = YAML.load_file(File.expand_path("clefs.yml", __dir__)).freeze
|
8
11
|
|
9
12
|
def self.get(name)
|
10
13
|
get_by_name(name)
|
@@ -82,7 +85,7 @@ class HeadMusic::Clef
|
|
82
85
|
|
83
86
|
def initialize_data_from_record(record)
|
84
87
|
initialize_keys_from_record(record)
|
85
|
-
@pitch = HeadMusic::Pitch.get(record[:pitch])
|
88
|
+
@pitch = HeadMusic::Rudiment::Pitch.get(record[:pitch])
|
86
89
|
@line = record[:line]
|
87
90
|
@modern = record[:modern]
|
88
91
|
initialize_musical_symbols(record[:symbols])
|
@@ -95,7 +98,7 @@ class HeadMusic::Clef
|
|
95
98
|
|
96
99
|
def initialize_musical_symbols(list)
|
97
100
|
@musical_symbols = (list || []).map do |symbol_data|
|
98
|
-
HeadMusic::MusicalSymbol.new(**symbol_data.slice(:ascii, :html_entity, :unicode))
|
101
|
+
HeadMusic::Rudiment::MusicalSymbol.new(**symbol_data.slice(:ascii, :html_entity, :unicode))
|
99
102
|
end
|
100
103
|
end
|
101
104
|
end
|
@@ -1,5 +1,8 @@
|
|
1
|
+
# A module for music rudiments
|
2
|
+
module HeadMusic::Rudiment; end
|
3
|
+
|
1
4
|
# Consonance describes a category or degree of harmonic pleasantness: perfect, imperfect, or dissonant
|
2
|
-
class HeadMusic::Consonance
|
5
|
+
class HeadMusic::Rudiment::Consonance
|
3
6
|
LEVELS = %w[perfect imperfect dissonant].freeze
|
4
7
|
|
5
8
|
def self.get(name)
|