head_music 1.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f33a752be0b413a020045e15277d598f679a99e8a02cff2e90d7678a8def945e
4
- data.tar.gz: 69f384290299e50524c717f71baa2fa4760468553ef4b603c0303ddb75d364e0
3
+ metadata.gz: c2b4bf3672dec05430ee66153014df39ebd585bdfe683d1269d31f32fb2b6c13
4
+ data.tar.gz: 4516d7312a57ff182e33620dfb1169761f0d2fe2030979379ecf2412144ca101
5
5
  SHA512:
6
- metadata.gz: 9fa8bd4a2eae4959cd980a8865f88a367b2781df9836357b34b91f0d79cd6970dc71389f5e29c8b1b72cd0c68d633721da4a4e189bb8210193c41c12cc20bc0c
7
- data.tar.gz: 9f953d75afacaccc35e8a688eeff8606ec854600281fb6636e44ed3fcd3155afefc5eb4ecf13a53a97b0facaf4e32d516b32c690b3d5653fa596dac2096ca914
6
+ metadata.gz: 6219c398ddbdf7245fee263e916d299ae518b158883761fb7e89894808fa91142008f66c883007d715625d150806b520cab3e3418d87b955e02d4862c03ad3c8
7
+ data.tar.gz: 6c67afe62906e12ea8b4c91e2ef27ed99d41b3c501d2999369ed6cd5df9430c9ac5fec4fa1c33d9d1e4b2399930ca0fadcdac4bcbd4842ec433aa1477aaf824d
data/TODO.md CHANGED
@@ -1,5 +1,109 @@
1
1
  # TODO
2
2
 
3
+ May 7, 2023
4
+
5
+ Robert Head:
6
+ Hey, Brian. You have a sec for a music question? I’m trying to come up with different terms for the way “family” is used. “Woodwind family” vs. “Oboe family”.
7
+
8
+ Brian Head:
9
+ Those are good, I’d say. In what context?
10
+
11
+ Robert Head:
12
+ In my software project, I’m trying to define those relationships. One is a section of the orchestra and the other is species of instrument. But usually people, in my experience, just say “family”.
13
+ Is there some more precise terminology or adjective that can disambiguate those two terms?
14
+
15
+ Brian Head:
16
+ Hmmm. Already “family” is informal. Blatter distinguishes between “choir” and “family” as in the trumpet family” within the “brass choir”.
17
+
18
+ Robert Head:
19
+ Ah, yes! I do like that.
20
+ But does it apply to percussion?
21
+ “Section” is another candidate, but that gets used for string parts as well.
22
+
23
+ Brian Head:
24
+ Strings and percussion probably don’t think of themselves as a choir, but if you’re mainly looking for a taxonomically consistent word, that’s the feat I can think of at the moment.
25
+ Section is a good word, too, which easily flows between smaller and larger meanings.
26
+
27
+ Robert Head:
28
+ Obviously, the four “families” is a garbage way to classify all instruments and it really is more applicable to the orchestral context, so maybe “orchestra family” or “orchestra section”.
29
+
30
+ Brian Head:
31
+ I’d say that “family” is best used at the instrument level, as in “saxophone family”. Choir or section are better for larger collections. Still, both of those words connote membership in an orchestra. Or large ensemble. “Woodwinds” or “percussion” describe the class of instruments themselves.
32
+
33
+ Robert Head:
34
+ Cool
35
+
36
+ Action Item: Call them orchestra_section
37
+
38
+ Add Score Order
39
+
40
+ Orchestral Score Order
41
+
42
+ # So, in orchestral scores, the groupings are by instrumental 'family':
43
+ # woodwinds on top of the page, and below them, in descending order,
44
+ # brass,
45
+ # percussion,
46
+ # harp and keyboards,
47
+ # soloists (instrumental or vocal),
48
+ # voices,
49
+ # strings
50
+
51
+ (Notice the different placement of percussion in orchestra and band scores)
52
+
53
+ Flutes (Fl or Fls)
54
+ Oboes (Ob or Obs)
55
+ Clarinets (Cl or Cls)
56
+ Bassoons (Bsn or Bsns)
57
+ Horns (Hn or Hns)
58
+ Trumpets (Tpt or Tpts)
59
+ Trombones (Trb or Trbs)
60
+ Tuba (Tuba)
61
+ Timpani (Timp)
62
+ Percussion (Perc)
63
+ Other Instruments
64
+ harp and keyboards
65
+ soloists
66
+ voices
67
+ Violins I (Vlns)
68
+ Violins II
69
+ Viola (Vla)
70
+ Violoncellos (Vcl)
71
+ Double Bass (DB)
72
+
73
+ Band Score Order
74
+
75
+ Flutes (Fl or Fls)
76
+ Oboes (Ob or Obs)
77
+ Bassoons (Bsn or Bsns)
78
+ Clarinets (Cl or Cls)
79
+ Saxophones (AS, or TS, or BS)
80
+ Cornets (Cor)
81
+ Trumpets (Tpt or Tpts)
82
+ Horns (Hn or Hns)
83
+ Trombones (Trb or Trbs)
84
+ Euphoniums (Euph)
85
+ Tubas (Tubas)
86
+ Timpani (Timp)
87
+ Percussion (Perc)
88
+
89
+ Brass Quintet
90
+
91
+ Trumpet I
92
+ Trumpet II
93
+ Horn
94
+ Trombone
95
+ Tuba
96
+
97
+ Woodwind Quintet
98
+
99
+ Flute
100
+ Oboe
101
+ Clarinet
102
+ Horn
103
+ Bassoon
104
+
105
+
106
+
3
107
  Disambiguate PitchSet and Sonority
4
108
 
5
109
  Sonority should be a name for a specific set of intervals
@@ -31,11 +135,12 @@ Make new analysis classes:
31
135
  Dyad
32
136
  .interval
33
137
  .implied_triad (if a third)
138
+ - returns most likely of possible triads
34
139
  .possible_triads
35
140
  - returns major and minor if a perfect fifth
36
141
  - returns minor and diminished if minor third
37
142
  - returns major and augmented if major third
38
- - returns augmented if augmented fifth
143
+ - returns inverted major and root augmented if augmented fifth
39
144
  - returns diminished if diminished fifth
40
145
  - should it take into account enharmonics? I think yes.
41
146
  .possible_seventh_chords
@@ -3,10 +3,10 @@
3
3
  # A chromatic interval is the distance between two pitches measured in half-steps.
4
4
  class HeadMusic::ChromaticInterval
5
5
  include Comparable
6
+ include HeadMusic::Named
6
7
 
7
8
  private_class_method :new
8
9
 
9
- # TODO: include the Named module
10
10
  NAMES = %w[
11
11
  perfect_unison minor_second major_second minor_third major_third perfect_fourth tritone perfect_fifth
12
12
  minor_sixth major_sixth minor_seventh major_seventh perfect_octave
@@ -21,8 +21,21 @@ class HeadMusic::ChromaticInterval
21
21
  @intervals[semitones] ||= new(semitones.to_i)
22
22
  end
23
23
 
24
- def initialize(semitones)
25
- @semitones = semitones
24
+ def initialize(identifier)
25
+ if identifier.to_s.strip =~ /^\D/i
26
+ candidate = identifier.to_s.downcase.gsub(/\W+/, "_")
27
+ semitones = NAMES.index(candidate) || identifier.to_i
28
+ end
29
+ @semitones = semitones || identifier.to_i
30
+ set_name
31
+ end
32
+
33
+ def set_name
34
+ candidate = semitones
35
+ while name.nil? && candidate > 0
36
+ self.name = NAMES[candidate]
37
+ candidate -= 12
38
+ end
26
39
  end
27
40
 
28
41
  def simple
@@ -22,10 +22,12 @@
22
22
  - :pitch: G3
23
23
  :line: 2
24
24
  :modern: true
25
- :name_key: choral_tenor_clef
25
+ :name_key: vocal_tenor_clef
26
26
  :alias_name_keys:
27
27
  - tenor_clef
28
28
  - tenor_g_clef
29
+ - g_clef_ottava_bassa
30
+ - octave_treble_clef
29
31
  :symbols:
30
32
  - :unicode: "\U0001D120"
31
33
  :html_entity: "𝄠"
@@ -0,0 +1,229 @@
1
+ ---
2
+ accordian:
3
+ classification_keys:
4
+ - reed
5
+ - free-reed
6
+ - aerophone
7
+ - keyboard
8
+ - wind
9
+ orchestra_section_key: keyboard
10
+ bagpipe:
11
+ classification_keys:
12
+ - aerophone
13
+ - reed
14
+ - wind
15
+ - woodwind
16
+ orchestra_section_key: woodwind
17
+ bassoon:
18
+ classification_keys:
19
+ - aerophone
20
+ - reed
21
+ - double_reed
22
+ - wind
23
+ - woodwind
24
+ orchestra_section_key: woodwind
25
+ clarinet:
26
+ classification_keys:
27
+ - aerophone
28
+ - reed
29
+ - single_reed
30
+ - wind
31
+ - woodwind
32
+ orchestra_section_key: woodwind
33
+ clavichord:
34
+ classification_keys:
35
+ - chordophone
36
+ - keyboard
37
+ - percussion
38
+ - string
39
+ orchestra_section_key: keyboard
40
+ cornet:
41
+ classification_keys:
42
+ - aerophone
43
+ - brass
44
+ - wind
45
+ orchestra_section_key: brass
46
+ cymbal:
47
+ classification_keys:
48
+ - percussion
49
+ - idiophone
50
+ orchestra_section_key: percussion
51
+ double_bass:
52
+ classification_keys:
53
+ - bowed
54
+ - chordophone
55
+ - string
56
+ orchestra_section_key: string
57
+ flute:
58
+ classification_keys:
59
+ - aerophone
60
+ - edge-blown aerophone
61
+ - wind
62
+ - woodwind
63
+ orchestra_section_key: woodwind
64
+ glockenspiel:
65
+ classification_keys:
66
+ - percussion
67
+ - idiophone
68
+ - keyboard
69
+ - struck
70
+ - metal
71
+ - mallet
72
+ orchestra_section_key: percussion
73
+ gong:
74
+ classification_keys:
75
+ - percussion
76
+ - idiophone
77
+ orchestra_section_key: percussion
78
+ guitar:
79
+ classification_keys:
80
+ - chordophone
81
+ - plucked
82
+ - string
83
+ orchestra_section_key: string
84
+ harp:
85
+ classification_keys:
86
+ - chordophone
87
+ - plucked
88
+ - string
89
+ orchestra_section_key: string
90
+ harpsichord:
91
+ classification_keys:
92
+ - chordophone
93
+ - keyboard
94
+ - percussion
95
+ - string
96
+ orchestra_section_key: keyboard
97
+ horn:
98
+ classification_keys:
99
+ - aerophone
100
+ - brass
101
+ - wind
102
+ orchestra_section_key: brass
103
+ kettledrum:
104
+ classification_keys:
105
+ - percussion
106
+ - membranophone
107
+ orchestra_section_key: percussion
108
+ lute:
109
+ classification_keys:
110
+ - chordophone
111
+ - plucked
112
+ - string
113
+ orchestra_section_key: string
114
+ mandolin:
115
+ classification_keys:
116
+ - chordophone
117
+ - plucked
118
+ - string
119
+ orchestra_section_key: string
120
+ marimba:
121
+ classification_keys:
122
+ - idiophone
123
+ - keyboard
124
+ - percussion
125
+ - struck
126
+ - wood
127
+ - mallet
128
+ orchestra_section_key: percussion
129
+ oboe:
130
+ classification_keys:
131
+ - aerophone
132
+ - reed
133
+ - double_reed
134
+ - wind
135
+ - woodwind
136
+ orchestra_section_key: woodwind
137
+ organ:
138
+ classification_keys:
139
+ - aerophone
140
+ - keyboard
141
+ orchestra_section_key: keyboard
142
+ piano:
143
+ classification_keys:
144
+ - chordophone
145
+ - keyboard
146
+ - percussion
147
+ - string
148
+ orchestra_section_key: keyboard
149
+ recorder:
150
+ classification_keys:
151
+ - aerophone
152
+ - wind
153
+ - woodwind
154
+ orchestra_section_key: woodwind
155
+ saxhorn:
156
+ classification_keys:
157
+ - aerophone
158
+ - brass
159
+ - wind
160
+ orchestra_section_key: brass
161
+ saxophone:
162
+ classification_keys:
163
+ - aerophone
164
+ - reed
165
+ - single_reed
166
+ - wind
167
+ - woodwind
168
+ snare_drum:
169
+ classification_keys:
170
+ - percussion
171
+ - membranophone
172
+ orchestra_section_key: percussion
173
+ synthesizer:
174
+ classification_keys:
175
+ - electronic
176
+ - keyboard
177
+ orchestra_section_key: keyboard
178
+ trombone:
179
+ classification_keys:
180
+ - aerophone
181
+ - brass
182
+ - wind
183
+ orchestra_section_key: brass
184
+ trumpet:
185
+ classification_keys:
186
+ - aerophone
187
+ - brass
188
+ - wind
189
+ orchestra_section_key: brass
190
+ tuba:
191
+ classification_keys:
192
+ - aerophone
193
+ - brass
194
+ - wind
195
+ orchestra_section_key: brass
196
+ vibraphone:
197
+ classification_keys:
198
+ - percussion
199
+ - struck
200
+ - idiophone
201
+ - keyboard
202
+ - mallet
203
+ - metal
204
+ orchestra_section_key: percussion
205
+ violin:
206
+ classification_keys:
207
+ - bowed
208
+ - chordophone
209
+ - string
210
+ orchestra_section_key: string
211
+ voice:
212
+ classification_keys:
213
+ - voice
214
+ orchestra_section_key: voice
215
+ woodblock:
216
+ classification_keys:
217
+ - percussion
218
+ - struck
219
+ - idiophone
220
+ orchestra_section_key: percussion
221
+ xylophone:
222
+ classification_keys:
223
+ - percussion
224
+ - struck
225
+ - idiophone
226
+ - keyboard
227
+ - mallet
228
+ - wood
229
+ orchestra_section_key: percussion