head_music 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2535794cd693b001994fe5a74a815c48e6390d98b89ced86ae7102893017e62
4
- data.tar.gz: ca961916aa2fd55b1ad8b4ed4cc63aa73e16c28c8ac7affa8670a2eaf4056116
3
+ metadata.gz: c2b4bf3672dec05430ee66153014df39ebd585bdfe683d1269d31f32fb2b6c13
4
+ data.tar.gz: 4516d7312a57ff182e33620dfb1169761f0d2fe2030979379ecf2412144ca101
5
5
  SHA512:
6
- metadata.gz: bec7c67bcdb2f5e7181a3d84d54365ec905e604cde2e3653198a65121cd457f6df79162e2db63499f93e6b02b4e18d34eefa89642b91cea66ea075cd6bc20b82
7
- data.tar.gz: a09572d7bee318937385ecbda3b9a5fd98b3713b7bec57dccd4c8d969ed3c7e710446ea4a5490cb632284e3626948849bee8e5a6a710fba6d74ddb53e2f4b781
6
+ metadata.gz: 6219c398ddbdf7245fee263e916d299ae518b158883761fb7e89894808fa91142008f66c883007d715625d150806b520cab3e3418d87b955e02d4862c03ad3c8
7
+ data.tar.gz: 6c67afe62906e12ea8b4c91e2ef27ed99d41b3c501d2999369ed6cd5df9430c9ac5fec4fa1c33d9d1e4b2399930ca0fadcdac4bcbd4842ec433aa1477aaf824d
data/TODO.md CHANGED
@@ -49,6 +49,7 @@ Orchestral Score Order
49
49
  # strings
50
50
 
51
51
  (Notice the different placement of percussion in orchestra and band scores)
52
+
52
53
  Flutes (Fl or Fls)
53
54
  Oboes (Ob or Obs)
54
55
  Clarinets (Cl or Cls)
@@ -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
@@ -114,6 +114,13 @@ de:
114
114
  voice: Stimme
115
115
  xylophone: Xylophon
116
116
  zither: Zither
117
+ locales:
118
+ de: Deutsch
119
+ en: Englisch
120
+ es: Spanisch
121
+ fr: Französisch
122
+ it: Italienisch
123
+ ru: Russisch
117
124
  reference_pitches:
118
125
  chamber_tone: Kammerton
119
126
  choir_tone: Chorton
@@ -1,4 +1,18 @@
1
1
  en:
2
+ chromatic_intervals:
3
+ perfect_unison: perfect unison
4
+ minor_second: minor second
5
+ major_second: major second
6
+ minor_third: minor third
7
+ major_third: major third
8
+ perfect_fourth: perfect fourth
9
+ tritone: tritone
10
+ perfect_fifth: perfect fifth
11
+ minor_sixth: minor sixth
12
+ major_sixth: major sixth
13
+ minor_seventh: minor seventh
14
+ major_seventh: major seventh
15
+ perfect_octave: perfect octave
2
16
  clefs:
3
17
  alto_clef: alto clef
4
18
  baritone_c_clef: baritone C-clef
@@ -162,6 +176,13 @@ en:
162
176
  woodblock: woodblock
163
177
  xylophone: xylophone
164
178
  zither: zither
179
+ locales:
180
+ de: German
181
+ en: English
182
+ es: Spanish
183
+ fr: French
184
+ it: Italian
185
+ ru: Russian
165
186
  reference_pitches:
166
187
  a440: A440
167
188
  baroque: Baroque pitch
@@ -108,6 +108,13 @@ es:
108
108
  voice: voz
109
109
  xylophone: xilofón
110
110
  zither: cítara
111
+ locales:
112
+ de: Alemán
113
+ en: Inglés
114
+ es: Español
115
+ fr: Francés
116
+ it: Italiano
117
+ ru: Ruso
111
118
  rudiments:
112
119
  clef: clave
113
120
  consonance: consonancia
@@ -120,5 +120,12 @@ fr:
120
120
  voice: voix
121
121
  xylophone: xylophone
122
122
  zither: cithare
123
+ locales:
124
+ de: allemand
125
+ en: anglais
126
+ es: espagnol
127
+ fr: français
128
+ it: italien
129
+ ru: russe
123
130
  rudiments:
124
131
  clef: clé
@@ -112,6 +112,13 @@ it:
112
112
  voice: voce
113
113
  xylophone: xilofono
114
114
  zither: cetra da tavolo
115
+ locales:
116
+ de: Tedesco
117
+ en: Inglese
118
+ es: Spagnolo
119
+ fr: Francese
120
+ it: Italiano
121
+ ru: Russo
115
122
  rudiments:
116
123
  clef: chiave
117
124
  consonance: consonanza
@@ -68,3 +68,10 @@ ru:
68
68
  voice: golos
69
69
  xylophone: ksilofon
70
70
  zither: tsitra
71
+ locales:
72
+ de: Немецкий
73
+ en: Английский
74
+ es: Испанский
75
+ fr: Французский
76
+ it: Итальянский
77
+ ru: Русский
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HeadMusic
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: head_music
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Head
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport