head_music 0.24.1 → 0.25.0

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: 0abe4bcc9d5eda30350352723a69a500c1a072d08e39de64d9266a25953771fa
4
- data.tar.gz: 25a2b86a64a5c4f31cb75c5de988c59cad7e0a271a78adcde5e3cc2f040b88ef
3
+ metadata.gz: 59d262194fb0642a00c0f6a491f0225ac8e637fc1b81fb210e202bb71f38d37d
4
+ data.tar.gz: b28f1d54a1f51a8500e2448fd5e64a8fcd2a901ef085ca2a378add0277a65c9b
5
5
  SHA512:
6
- metadata.gz: 670ca78b363ae669a73e4159b46e5465439824f1e051f15f8846acce3a6790352ac64b33cd41e82d6a602e3ef3582a6e224b9fd4da0fb5fbc85263c82d3e26c7
7
- data.tar.gz: 1407f5414eb3842a61745c9943f50f14d866c1318d1a93d9c21ed296d57d5a61ba850f3c6b562c94ca20a9b23ada2098dc445af44184baed3969bfe3c29ab2bb
6
+ metadata.gz: 963a048a8b771cc8c3dd5d1a5735744bbed9ea1ba90028d1e152f8649aa4f08d37c4e9c91d87b07872fc9ea65557a4d7d124b2c1a1c62747279188b7ca64db13
7
+ data.tar.gz: 6b27b0330b5b8d9dbdb18934baa8b2e5e1b2992b580f8e930d9979f2da08be19ba1274c2eba1d251e57c9c026cd871d05cc9d6f5e58e0b52ce57ba49f7809d61
@@ -1,3 +1,7 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.5
4
+
1
5
  Layout/DotPosition:
2
6
  EnforcedStyle: trailing
3
7
 
@@ -34,8 +38,5 @@ Style/TrailingCommaInArrayLiteral:
34
38
  Style/TrailingCommaInHashLiteral:
35
39
  EnforcedStyleForMultiline: consistent_comma
36
40
 
37
- AllCops:
38
- TargetRubyVersion: 2.4
39
-
40
41
  Layout/EmptyLineAfterGuardClause:
41
42
  Enabled: false
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.required_ruby_version = '>= 2.4.0'
25
+ spec.required_ruby_version = '>= 2.5'
26
26
 
27
27
  spec.add_runtime_dependency 'activesupport', '> 5.0'
28
28
  spec.add_runtime_dependency 'humanize', '~> 1.3'
@@ -5,6 +5,7 @@ class HeadMusic::Placement
5
5
  include Comparable
6
6
 
7
7
  attr_reader :voice, :position, :rhythmic_value, :pitch
8
+
8
9
  delegate :composition, to: :voice
9
10
  delegate :spelling, to: :pitch, allow_nil: true
10
11
 
@@ -5,6 +5,7 @@ class HeadMusic::Position
5
5
  include Comparable
6
6
 
7
7
  attr_reader :composition, :bar_number, :count, :tick
8
+
8
9
  delegate :to_s, to: :code
9
10
 
10
11
  def initialize(composition, code_or_bar, count = nil, tick = nil)
@@ -6,6 +6,7 @@ class HeadMusic::Voice
6
6
  include Comparable
7
7
 
8
8
  attr_reader :composition, :placements, :role
9
+
9
10
  delegate :key_signature, to: :composition
10
11
 
11
12
  def initialize(composition: nil, role: nil)
@@ -1,36 +1,83 @@
1
1
  ---
2
- - name_key: alto_flute
3
- - name_key: guitar
2
+ guitar:
4
3
  family: string
5
4
  classifications:
6
- - string
7
- - chordophone
5
+ - string
6
+ - chordophone
8
7
  default_clefs:
9
- - treble_clef
10
- - name_key: piano
8
+ - treble_clef
9
+ voice: tenor
10
+ piano:
11
11
  family: string
12
12
  classifications:
13
- - string
14
- - chordophone
15
- - keyboard
13
+ - string
14
+ - chordophone
15
+ - keyboard
16
16
  default_clefs:
17
- - treble_clef
18
- - bass_clef
19
- - name_key: violin
17
+ - treble_clef
18
+ - bass_clef
19
+ violin:
20
+ family: string
20
21
  alias_name_keys:
21
- - fiddle
22
+ - fiddle
23
+ classifications:
24
+ - string
25
+ - chordophone
26
+ - bowed
27
+ default_clefs:
28
+ - treble_clef
29
+ voice: soprano
30
+ viola:
22
31
  family: string
23
32
  classifications:
24
- - string
25
- - chordophone
26
- - bowed
33
+ - string
34
+ - chordophone
35
+ - bowed
27
36
  default_clefs:
28
- - treble_clef
29
- - name_key: viola
37
+ - alto_clef
38
+ voice: alto
39
+ cello:
30
40
  family: string
31
41
  classifications:
32
- - string
33
- - chordophone
34
- - bowed
42
+ - string
43
+ - chordophone
44
+ - bowed
45
+ default_clefs:
46
+ - bass_clef
47
+ voice: tenor
48
+ double_bass:
49
+ family: string
50
+ classifications:
51
+ - string
52
+ - chordophone
53
+ - bowed
54
+ default_clefs:
55
+ - bass_clef
56
+ voice: bass
57
+ harp:
58
+ family: string
59
+ classifications:
60
+ - string
61
+ - chordophone
62
+ - plucked
63
+ default_clefs:
64
+ - treble_clef
65
+ - bass_clef
66
+ flute:
67
+ family: woodwind
68
+ classifications:
69
+ - woodwind
70
+ - wind
71
+ - aerophone
72
+ - edge-blown aerophone
73
+ default_clefs:
74
+ - treble_clef
75
+ voice: soprano
76
+ organ:
77
+ classifications:
78
+ - aerophone
79
+ - keyboard
35
80
  default_clefs:
36
- - alto_clef
81
+ - treble_clef
82
+ - bass_clef
83
+ - bass_clef
@@ -6,16 +6,16 @@ class HeadMusic::GrandStaff
6
6
  piano: {
7
7
  instrument: :piano,
8
8
  staves: [
9
- { clef: :treble_clef, instrument: :piano },
10
- { clef: :bass_clef, instrument: :piano },
9
+ { clef: :treble_clef, for: :right_hand },
10
+ { clef: :bass_clef, for: :left_hand },
11
11
  ],
12
12
  },
13
13
  organ: {
14
14
  instrument: :organ,
15
15
  staves: [
16
- { clef: :treble_clef, instrument: :organ },
17
- { clef: :bass_clef, instrument: :organ },
18
- { clef: :bass_clef, instrument: :pedals },
16
+ { clef: :treble_clef, for: :right_hand },
17
+ { clef: :bass_clef, for: :left_hand },
18
+ { clef: :bass_clef, for: :pedals },
19
19
  ],
20
20
  },
21
21
  }.freeze
@@ -42,10 +42,7 @@ class HeadMusic::GrandStaff
42
42
  def staves
43
43
  @staves ||=
44
44
  data[:staves].map do |staff|
45
- HeadMusic::Staff.new(
46
- staff[:clef],
47
- instrument: staff[:instrument] || instrument
48
- )
45
+ HeadMusic::Staff.new(staff[:clef], instrument: instrument)
49
46
  end
50
47
  end
51
48
 
@@ -13,12 +13,22 @@ class HeadMusic::Instrument
13
13
  new(name)
14
14
  end
15
15
 
16
- attr_reader :name_key, :family, :default_clefs
16
+ def self.all
17
+ INSTRUMENTS.map { |key, _data| get(key) }.sort_by(&:name)
18
+ end
19
+
20
+ attr_reader :name_key, :family, :default_clefs, :classifications, :voice
17
21
 
18
22
  def ==(other)
19
23
  to_s == other.to_s
20
24
  end
21
25
 
26
+ def translation(locale = :en)
27
+ return name unless name_key
28
+
29
+ I18n.translate(name_key, scope: [:instruments], locale: locale)
30
+ end
31
+
22
32
  private_class_method :new
23
33
 
24
34
  private
@@ -28,33 +38,42 @@ class HeadMusic::Instrument
28
38
  if record
29
39
  initialize_data_from_record(record)
30
40
  else
31
- self.name = name
41
+ self.name = name.to_s
32
42
  end
33
43
  end
34
44
 
35
45
  def record_for_name(name)
36
- key = HeadMusic::Utilities::HashKey.for(name)
37
- record_for_key(key) || record_for_key(key_for_name(name))
46
+ record_for_key(HeadMusic::Utilities::HashKey.for(name)) ||
47
+ record_for_key(key_for_name(name))
38
48
  end
39
49
 
40
50
  def key_for_name(name)
41
- INSTRUMENTS.each do |instrument|
51
+ INSTRUMENTS.each do |key, _data|
42
52
  I18n.config.available_locales.each do |locale|
43
- translation = I18n.t("instruments.#{instrument['name_key']}", locale: locale)
44
- return instrument['name_key'] if translation.downcase == name.downcase
53
+ translation = I18n.t("instruments.#{key}", locale: locale)
54
+ return key if translation.downcase == name.downcase
45
55
  end
46
56
  end
47
57
  nil
48
58
  end
49
59
 
50
60
  def record_for_key(key)
51
- INSTRUMENTS.detect { |instrument| instrument['name_key'] == key }
61
+ INSTRUMENTS.each do |name_key, data|
62
+ return data.merge!('name_key' => name_key) if name_key.to_s == key.to_s
63
+ end
64
+ nil
52
65
  end
53
66
 
54
67
  def initialize_data_from_record(record)
55
- @family = record['family']
56
- @default_clefs = record['default_clefs']
57
68
  @name_key = record['name_key'].to_sym
58
- self.name = I18n.translate(name_key, scope: 'instruments', locale: 'en')
69
+ @family = record['family']
70
+ @default_clefs = record['default_clefs'] || []
71
+ @classifications = record['classifications'] || []
72
+ @voice = record['voice'].to_s
73
+ self.name = I18n.translate(name_key, scope: 'instruments', locale: 'en', default: inferred_name)
74
+ end
75
+
76
+ def inferred_name
77
+ name_key.to_s.gsub(/_/, ' ')
59
78
  end
60
79
  end
@@ -1,7 +1,4 @@
1
1
  de:
2
- rudiments:
3
- clef: Notenschlüssel
4
- consonance: Konsonanz
5
2
  clefs:
6
3
  alto_clef: Altschlüssel
7
4
  baritone_c_clef: Baritonschlüssel
@@ -40,24 +37,85 @@ de:
40
37
  treble_clef: Violinschlüssel
41
38
  viola_clef: Bratschenschlüssel
42
39
  violin_clef: Violinschlüssel
43
- reference_pitches:
44
- chamber_tone: Kammerton
45
- choir_tone: Chorton
40
+ instrument_classifications:
41
+ brass: Blechblas
42
+ brass_instrument: Blechblasinstrument
43
+ drum: Trommel
44
+ keyboard_instrument: Tasteninstrumente
45
+ percussion: Perkussions
46
+ percussion_instrument: Schlaginstrumente
47
+ plucked_instrument: Zupfinstrumente
48
+ strings: Streicher
49
+ stringed_instrument: Saiteninstrument
50
+ wind_instrument: Blasinstrument
51
+ woodwind_instrument: Holzblasinstrument
52
+ instrument_voices:
53
+ alto: Alt
54
+ baritone: Bariton
55
+ bass: Bass
46
56
  instruments:
47
57
  accordian: Akkordeon
48
58
  alto_flute: Altflöte
49
59
  alto_voice: Alt
50
60
  arpeggione: Arpeggione
51
61
  bagpipe: Dudelsack
62
+ baritone_horn: Baritonhorn
52
63
  baritone_voice: Bariton
53
64
  bass_voice: Bass
54
- bass_clarinet: clarinette basse
65
+ bass_clarinet: Bassklarinette
66
+ bass_drum: Grosse Trommel
67
+ bass_trombone: Bass Posaune
68
+ bassoon: Fagott
69
+ castanets: Kastagnetten
70
+ celesta: Celesta
71
+ cello: Cello
72
+ cimbalom: Zymbal
73
+ clarinet: Klarinette
74
+ clavichord: Klavichord
75
+ cornet: Kornett
76
+ cymbal: Becken
77
+ double_bass: Kontrabass
78
+ english_horn: Englischhorn
79
+ euphonium: Euphonium
55
80
  fiddle: Geige
81
+ flugel_horn: Flügelhorn
82
+ flute: Flöte
83
+ french_horn: Horn
84
+ glockenspiel: Glockenspiel
56
85
  guitar: Gitarre
86
+ hammered_dulcimer: Hackbrett
87
+ harp: Harfe
88
+ harpsichord: Cembalo
89
+ lute: Laute
90
+ mandolin: Mandoline
91
+ marimba: Marimbaphon
92
+ natural_horn: Waldhorn
93
+ oboe: Oboe
94
+ oboe_d_amore: Liebesoboe
95
+ organ: Orgel
57
96
  piano: Piano
97
+ piccolo: Pikkoloflöte
98
+ recorder: Blockflöte
99
+ saxophone: Saxophon
100
+ snare_drum: Leinentrommel
101
+ tambourine: Tamburin
102
+ tenor_drum: Tenortrommel
103
+ timpani: Pauken
104
+ trombone: Posaune
105
+ trumpet: Trompete
106
+ tuba: Tuba
107
+ tubular_bells: Rohrenglocke
58
108
  viola: Bratsche
109
+ viola_d_amore: Viola d'amore
110
+ viola_da_gamba: Viola da gamba
59
111
  violin: Violine
60
- instrument_voices:
61
- alto: Alt
62
- baritone: Bariton
63
- bass: Bass
112
+ violoncello: Violoncello
113
+ voice: Stimme
114
+ xylophone: Xylophon
115
+ zither: Zither
116
+ reference_pitches:
117
+ chamber_tone: Kammerton
118
+ choir_tone: Chorton
119
+ rudiments:
120
+ clef: Notenschlüssel
121
+ consonance: Konsonanz
@@ -1,38 +1,4 @@
1
1
  en:
2
- rudiments:
3
- chromatic_interval: chromatic interval
4
- circle: circle
5
- clef: clef
6
- consonance: consonance
7
- diatonic_interval: diatonic interval
8
- grand_staff: grand staff
9
- harmonic_interval: harmonic interval
10
- instrument: instrument
11
- interval_cycle: interval cycle
12
- key_signature: key signature
13
- letter_name: letter name
14
- melodic_interval: melodic interval
15
- meter: meter
16
- motion: motion
17
- musical_symbol: musical symbol
18
- octave: octave
19
- pitch: pitch
20
- pitch_class: pitch class
21
- pitch_class_set: pitch class set
22
- pitch_set: pitch set
23
- quality: quality
24
- reference_pitch: reference pitch
25
- rhythm: rhythm
26
- rhythmic_unit: rhythmic unit
27
- scale: scale
28
- scale_degree: scale degree
29
- scale_type: scale type
30
- sign: sign
31
- solmization: solmization
32
- sonority: sonority
33
- spelling: spelling
34
- staff: staff
35
- tuning: tuning
36
2
  clefs:
37
3
  alto_clef: alto clef
38
4
  baritone_c_clef: baritone C-clef
@@ -71,51 +37,74 @@ en:
71
37
  treble_clef: treble clef
72
38
  viola_clef: viola clef
73
39
  violin_clef: treble clef
74
- reference_pitches:
75
- a440: A440
76
- baroque: Baroque pitch
77
- berlin_philharmonic: Berlin Philharmonic
78
- boston_symphony_orchestra: Boston Symphony Orchestra
79
- chamber_tone: chamber tone
80
- choir: choir tone
81
- classical: classical pitch
82
- concert: concert pitch
83
- continental: continental pitch
84
- french: French pitch
85
- haydn: Haydn pitch
86
- high: high pitch
87
- international: international pitch
88
- iso_16: ISO 16
89
- low: low pitch
90
- mozart: Mozart pitch
91
- new_philharmonic: new philharmonic pitch
92
- new_york_philharmonic: New York Philharmonic
93
- old_philharmonic: old philharmonic pitch
94
- philosophical: philosophical pitch
95
- sauveur: Sauveur pitch
96
- scheibler: Scheibler pitch
97
- scientific: scientific pitch
98
- stuttgart: Stuttgart pitch
99
- sydney_symphony_orchestra: Sydney Symphony Orchestra
100
- verdi: Verdi tuning
40
+ instrument_abbreviations:
41
+ accordian:
42
+ - acc
43
+ alto_flute:
44
+ - afl
45
+ alto_voice:
46
+ - alt
47
+ bagpipe:
48
+ - bag
49
+ baritone_voice:
50
+ - bar
51
+ bass_voice:
52
+ - bass
53
+ bass_clarinet:
54
+ - bcl
55
+ instrument_classifications:
56
+ aerophone: aerophone
57
+ bowed: bowed
58
+ brass: brass
59
+ brass_instrument: brass instrument
60
+ double_reed: double-reed
61
+ drum: drum
62
+ keyboard: keyboard
63
+ keyboard_instrument: keyboard instrument
64
+ percussion: percussion
65
+ percussion_instrument: percussion instrument
66
+ plucked_instrument: plucked instrument
67
+ reed: reed
68
+ single_reed: single-reed
69
+ strings: strings
70
+ stringed_instrument: stringed instrument
71
+ wind: wind
72
+ wind_instrument: wind instrument
73
+ woodwind: woodwind
74
+ instrument_voices:
75
+ piccolo: piccolo
76
+ soprano: soprano
77
+ alto: alto
78
+ tenor: tenor
79
+ baritone: baritone
80
+ bass: bass
81
+ contrabass: contrabass
82
+ octobass: octobass
101
83
  instruments:
102
84
  accordian: accordian
103
85
  alto_flute: alto flute
104
86
  alto_voice: alto
105
87
  arpeggione: arpeggione
106
88
  bagpipe: bagpipe
89
+ baritone_horn: baritone horn
107
90
  baritone_voice: baritone
108
91
  bass_clarinet: bass clarinet
109
92
  bass_drum: bass drum
110
93
  bass_guitar: bass guitar
111
94
  bass_oboe: bass oboe
95
+ bass_drum: bass drum
112
96
  bass_trombone: bass trombone
113
97
  bass_tuba: bass tuba
114
98
  bass_voice: bass
115
99
  bassoon: bassoon
116
100
  castanets: castanets
101
+ celesta: celesta
102
+ cello: cello
117
103
  chimes: chimes
104
+ cimbalom: cimbalom
105
+ cowbell: cowbell
118
106
  clarinet: clarinet
107
+ clavichord: clavichord
119
108
  clash_cymbals: clash cymbals
120
109
  cornet: cornet
121
110
  contrabassoon: contrabassoon
@@ -132,17 +121,25 @@ en:
132
121
  french_horn: French horn
133
122
  glockenspiel: glockenspiel
134
123
  guitar: guitar
124
+ hammered_dulcimer: hammered dulcimer
135
125
  harp: harp
136
126
  harpsichord: harpsichord
127
+ lute: lute
137
128
  mandolin: mandolin
138
129
  maracas: maracas
139
130
  marimba: marimba
140
131
  metal_block: metal block
132
+ natural_horn: natural horn
141
133
  oboe: oboe
134
+ oboe_d_amore: oboe d'amore
135
+ organ: organ
142
136
  piano: piano
143
137
  piccolo: piccolo
144
138
  piccolo_trumpet: piccolo trumpet
139
+ recorder: recorder
140
+ saxophone: saxophone
145
141
  side_drum: side drum
142
+ snare_drum: snare drum
146
143
  suspended_cymbal: suspended cymbal
147
144
  synthesizer: synthesizer
148
145
  tam_tam: tam-tam
@@ -152,47 +149,79 @@ en:
152
149
  tenor_trombone: tenor trombone
153
150
  timpani: timpani
154
151
  triangle: triangle
152
+ trombone: trombone
155
153
  trumpet: trumpet
156
154
  tuba: tuba
157
155
  tubular_bells: tubular bells
158
156
  vibraphone: vibraphone
159
157
  viola: viola
158
+ viola_d_amore: viola d'amore
159
+ viola_da_gamba: viola da gamba
160
160
  violin: violin
161
- violincello: cello
161
+ violoncello: violoncello
162
+ voice: voice
162
163
  woodblock: woodblock
163
164
  xylophone: xylophone
164
- instrument_abbreviations:
165
- accordian:
166
- - acc
167
- alto_flute:
168
- - afl
169
- alto_voice:
170
- - alt
171
- bagpipe:
172
- - bag
173
- baritone_voice:
174
- - bar
175
- bass_voice:
176
- - bass
177
- bass_clarinet:
178
- - bcl
179
- instrument_classifications:
180
- aerophone: aerophone
181
- bowed: bowed
182
- brass: brass
183
- double_reed: double-reed
184
- keyboard: keyboard
185
- percussion: percussion
186
- single_reed: single-reed
187
- string: string
188
- wind: wind
189
- woodwind: woodwind
190
- instrument_voices:
191
- piccolo: piccolo
192
- soprano: soprano
193
- alto: alto
194
- tenor: tenor
195
- baritone: baritone
196
- bass: bass
197
- contrabass: contrabass
198
- octobass: octobass
165
+ zither: zither
166
+ reference_pitches:
167
+ a440: A440
168
+ baroque: Baroque pitch
169
+ berlin_philharmonic: Berlin Philharmonic
170
+ boston_symphony_orchestra: Boston Symphony Orchestra
171
+ chamber_tone: chamber tone
172
+ choir: choir tone
173
+ classical: classical pitch
174
+ concert: concert pitch
175
+ continental: continental pitch
176
+ french: French pitch
177
+ haydn: Haydn pitch
178
+ high: high pitch
179
+ international: international pitch
180
+ iso_16: ISO 16
181
+ low: low pitch
182
+ mozart: Mozart pitch
183
+ new_philharmonic: new philharmonic pitch
184
+ new_york_philharmonic: New York Philharmonic
185
+ old_philharmonic: old philharmonic pitch
186
+ philosophical: philosophical pitch
187
+ sauveur: Sauveur pitch
188
+ scheibler: Scheibler pitch
189
+ scientific: scientific pitch
190
+ stuttgart: Stuttgart pitch
191
+ sydney_symphony_orchestra: Sydney Symphony Orchestra
192
+ verdi: Verdi tuning
193
+ rudiments:
194
+ chromatic_interval: chromatic interval
195
+ circle: circle
196
+ clef: clef
197
+ consonance: consonance
198
+ diatonic_interval: diatonic interval
199
+ grand_staff: grand staff
200
+ harmonic_interval: harmonic interval
201
+ instrument: instrument
202
+ interval_cycle: interval cycle
203
+ key_signature: key signature
204
+ letter_name: letter name
205
+ melodic_interval: melodic interval
206
+ meter: meter
207
+ motion: motion
208
+ musical_symbol: musical symbol
209
+ octave: octave
210
+ pitch: pitch
211
+ pitch_class: pitch class
212
+ pitch_class_set: pitch class set
213
+ pitch_set: pitch set
214
+ quality: quality
215
+ reference_pitch: reference pitch
216
+ rhythm: rhythm
217
+ rhythmic_unit: rhythmic unit
218
+ scale: scale
219
+ scale_degree: scale degree
220
+ scale_type: scale type
221
+ sign: sign
222
+ solmization: solmization
223
+ sonority: sonority
224
+ spelling: spelling
225
+ staff: staff
226
+ tuba: tuba
227
+ tuning: tuning
@@ -1,7 +1,4 @@
1
1
  es:
2
- rudiments:
3
- clef: clave
4
- consonance: consonancia
5
2
  clefs:
6
3
  alto_clef: clave contralto
7
4
  baritone_c_clef: clave de barítono
@@ -40,14 +37,76 @@ es:
40
37
  treble_clef: clave de sol
41
38
  viola_clef: clave de do
42
39
  violin_clef: clave de sol
40
+ instrument_classifications:
41
+ brass: metal
42
+ brass_instrument: instrumento de metal
43
+ drum: tambor
44
+ keyboard_instrument: instrumento de tecla
45
+ percussion: percusión
46
+ percussion_instrument: instrumentos de percusión
47
+ plucked_instrument: instrumentos punteados
48
+ strings: cuerdas
49
+ stringed_instrument: instrumentos de cuerdas
50
+ wind: viento
51
+ wind_instruments: instrumentos de viento
52
+ woodwind_instruments: instrumentos de madera
43
53
  instruments:
44
- accordian: acordeóon
54
+ accordian: acordeón
45
55
  alto_flute: flauta alto
46
56
  alto_voice: contralto
47
57
  bagpipe: gaita
58
+ baritone_horn: bombardino barítono
48
59
  baritone_voice: baritono
60
+ bass_clarinet: clarinete bajo
61
+ bass_drum: bombo
62
+ bass_trombone: trombón bajo
49
63
  bass_voice: bajo
64
+ bassoon: fagot
65
+ castanets: castañuelas
66
+ celesta: celesta
67
+ cello: cello
68
+ clarinet: clarinete
69
+ clavichord: clavicordio
70
+ cornet: corneta
71
+ cymbal: cimbalo
72
+ double_bass: contrabajo
73
+ english_horn: Cuerno inglés
74
+ euphonium: euphonium
75
+ flugel_horn: fliscorno
76
+ flute: flauta
77
+ french_horn: corno
78
+ glockenspiel: campanólogo
50
79
  guitar: guitarra
80
+ hammered_dulcimer: dulcémele
81
+ harp: arpa
82
+ harpsichord: clavecémbalo
83
+ lute: laúd
84
+ mandolin: mandolina
85
+ marimba: marimba
86
+ natural_horn: trompa natural
87
+ oboe: oboe
88
+ oboe_d_amore: oboe de amor
89
+ organ: órgano
51
90
  piano: piano
91
+ piccolo: flautín
92
+ recorder: flauta recta
93
+ saxophone: saxofón
94
+ snare_drum: tambor afinable
95
+ tambourine: pandereta
96
+ tenor_drum: redoblante
97
+ timpani: timbal
98
+ trombone: trombón
99
+ trumpet: trompeta
100
+ tuba: tuba
101
+ tubular_bells: campanas tubulares
52
102
  viola: viola
103
+ viola_d_amore: viola d'amore
104
+ viola_da_gamba: viola de gamba
53
105
  violin: violín
106
+ violoncello: violoncelo
107
+ voice: voz
108
+ xylophone: xilofón
109
+ zither: cítara
110
+ rudiments:
111
+ clef: clave
112
+ consonance: consonancia
@@ -1,6 +1,4 @@
1
1
  fr:
2
- rudiments:
3
- clef: clé
4
2
  clefs:
5
3
  alto_clef: clé alto
6
4
  baritone_c_clef: clé de baryton
@@ -39,19 +37,87 @@ fr:
39
37
  treble_clef: clé de sol
40
38
  viola_clef: clé d'ut
41
39
  violin_clef: clé de sol
40
+ instrument_classifications:
41
+ brass: cuivres
42
+ brass_instrument: instruments à vent de cuivre
43
+ double_reed: anche double
44
+ drum: tambour
45
+ keyboard_instrument: instrument à clavier
46
+ percussion: percussion
47
+ percussion_instrument: instrument à percussion
48
+ plucked_instrument: instrument à cordes pincées
49
+ reed: anche
50
+ strings: cordes
51
+ stringed_instrument: instrument à cordes
52
+ wind_instrument: instrument à vent
53
+ woodwind: bois
54
+ woodwind_instrument: instrument à vent en bois
55
+ instrument_voices:
56
+ alto: alto
57
+ baritone: baryton
58
+ bass: basse
59
+ contralto: contralto
60
+ countertenor: contre-ténor
61
+ mezzo_soprano: mezzo-soprano
62
+ soprano: soprano
63
+ tenor: ténor
42
64
  instruments:
43
65
  accordian: accordéon
44
66
  alto_flute: flûte alto
45
67
  alto_voice: alto
46
68
  bagpipe: cornemuse
69
+ baritone_horn: corne de baryton
47
70
  baritone_voice: baryton
48
71
  bass_clarinet: clarinette basse
72
+ bass_drum: grosse caisse
73
+ bass_trombone: basse-trombone
49
74
  bass_voice: basse
75
+ bassoon: basson
76
+ castanets: castagnettes
77
+ celesta: célesta
78
+ cello: violoncelle
79
+ cimbalom: cymbalum
80
+ clarinet: clarinette
81
+ clavichord: clavicorde
82
+ cornet: cornet
83
+ cowbell: cloches à vache
84
+ cymbal: cymbale
85
+ double_bass: contrebasse
86
+ english_horn: cor anglais
87
+ euphonium: euphonium
88
+ flute: flûte
89
+ french_horn: cor
90
+ glockenspiel: glockenspiel
91
+ guitar: guitare
92
+ hammered_dulcimer: tympanon
93
+ harp: harpe
94
+ harpsichord: clavecin
95
+ lute: luth
96
+ mandolin: mandoline
97
+ marimba: marimba
98
+ natural_horn: cor simple
99
+ oboe: hautbois
100
+ oboe_d_amore: hautbois d'amore
101
+ organ: orgue
50
102
  piano: piano
103
+ piccolo: piccolo
104
+ recorder: flûte à bec
105
+ saxophone: saxophone
106
+ snare_drum: caisse claire
107
+ tambourine: tambourin
108
+ tenor_drum: caisse roulante
109
+ timpani: timbales
110
+ trombone: trombone
111
+ trumpet: trompette
112
+ tuba: tuba
113
+ tubular_bells: cloches tubulaires
51
114
  viola: alto
115
+ viola_d_amore: viole d'amour
116
+ viola_da_gamba: viole de gambe
52
117
  violin: violon
53
- instrument_voices:
54
- alto: alto
55
- baritone: baryton
56
- bass: basse
57
- guitar: guitare
118
+ violoncello: violoncelle
119
+ voice: voix
120
+ xylophone: xylophone
121
+ zither: cithare
122
+ rudiments:
123
+ clef: clé
@@ -1,7 +1,4 @@
1
1
  it:
2
- rudiments:
3
- clef: chiave
4
- consonance: consonanza
5
2
  clefs:
6
3
  alto_clef: chiave di contralto
7
4
  baritone_c_clef: chiave di baritono
@@ -40,19 +37,80 @@ it:
40
37
  treble_clef: chiave di violino
41
38
  viola_clef: chiave di viola
42
39
  violin_clef: chiave di violino
40
+ instrument_classifications:
41
+ brass: ottone
42
+ brass_instrument: ottone
43
+ drum: tamburo
44
+ keyboard_instrument: strumenti a tastiera
45
+ percussion: percussione
46
+ percussion_instrument: strumenti a percussione
47
+ plucked_instrument: strumenti a pizzico
48
+ strings: archi
49
+ stringed_instrument: strumenti a corda
50
+ wind: fiato
51
+ wind_instruments: strumenti a fiato
52
+ woodwind_instruments: legno
53
+ instrument_voices:
54
+ alto: contralto
55
+ baritone: baritono
56
+ bass: basso
43
57
  instruments:
44
58
  accordian: fisarmonica
45
59
  alto_flute: flauto contralto
46
60
  alto_voice: contralto
47
61
  bagpipe: cornamusa
62
+ baritone_horn: flicorno baritono
48
63
  baritone_voice: baritono
64
+ bass_clarinet: clarinetto basso
65
+ bass_drum: grancassa
66
+ bass_trombone: trombono basso
49
67
  bass_voice: basso
68
+ bassoon: fagotto
69
+ castanets: castagnette
70
+ celesta: celesta
71
+ cello: violoncello
72
+ clarinet: clarinetto
73
+ clavichord: clavicordo
74
+ cornet: cornetta
75
+ cymbal: piatto
76
+ double_bass: contrabasso
77
+ english_horn: corno inglese
78
+ euphonium: eufonio
79
+ flugel_horn: flicorno
80
+ flute: flauto
81
+ french_horn: corno
82
+ glockenspiel: glockenspiel
50
83
  guitar: chitarra
84
+ hammered_dulcimer: salterio
85
+ harp: arpa
86
+ harpsichord: clavicembalo
87
+ lute: liuto
88
+ mandolin: mandolino
89
+ marimba: marimba
90
+ natural_horn: corno naturale
91
+ oboe: oboe
92
+ oboe_d_amore: oboe d'amore
51
93
  piccolo: ottavino
94
+ organ: organo
52
95
  piano: piano
96
+ recorder: flauto dolce
97
+ saxophone: sassofono
98
+ snare_drum: tamburo rullante
99
+ tambourine: tamburello
100
+ tenor_drum: cassa rullante
101
+ timpani: timpano
102
+ trombone: trombone
103
+ trumpet: tromba
104
+ tuba: tuba
105
+ tubular_bells: campane tubolari
53
106
  viola: viola
107
+ viola_d_amore: viola d'amore
108
+ viola_da_gamba: viola da gamba
54
109
  violin: violino
55
- instrument_voices:
56
- alto: contralto
57
- baritone: baritono
58
- bass: basso
110
+ violoncello: violoncello
111
+ voice: voce
112
+ xylophone: xilofono
113
+ zither: cetra da tavolo
114
+ rudiments:
115
+ clef: chiave
116
+ consonance: consonanza
@@ -0,0 +1,69 @@
1
+ ru:
2
+ instrument_classifications:
3
+ brass: mednye dukhovye
4
+ brass_instrument: mednye dukhovye instrument
5
+ drum: baraban
6
+ keyboard_instrument: klavishnyi instrument
7
+ percussion: udarnye
8
+ percussion_instrument: udarnye instrument
9
+ plucked_instrument: shchipkovye instrumenty
10
+ reeds: trosti
11
+ strings: struny
12
+ stringed_instrument: strunnye instrument
13
+ wind: dukhovye
14
+ wind_instrument: dukhovye instrument
15
+ woodwind_instrument: dereviannye dukhovye instrumenty
16
+ instruments:
17
+ accordian: akkordeon
18
+ baritone_horn: bariton rog
19
+ baritone_voice: bariton
20
+ bass_clarinet: bass-klarnet
21
+ bass_drum: bol'shoi baraban
22
+ bass_trombone: bas trombon
23
+ bassoon: fagot
24
+ castanets: kastan'ety
25
+ celesta: chelesta
26
+ cello: violonchel'
27
+ clarinet: klarnet
28
+ clavichord: klavikord
29
+ cornet: kornet
30
+ cowbell: caubel
31
+ cymbal: tarelk
32
+ double_bass: kontrabas
33
+ english_horn: angliiskii rozhok
34
+ euphonium: evfonium
35
+ flugel_horn: fliugel'gorn
36
+ flute: fleita
37
+ french_horn: Gorn
38
+ glockenspiel: kolokol'chiki
39
+ guitar: gitara
40
+ hammered_dulcimer: tsimbaly
41
+ harp: arfa
42
+ harpsichord: klavesin
43
+ lute: liutnia
44
+ mandolin: mandolina
45
+ marimba: marimba
46
+ natural_horn: valtorna
47
+ oboe: goboi
48
+ oboe_d_amore: goboi d'amur
49
+ organ: organ
50
+ piano: fortep'iano
51
+ piccolo: pikkolo
52
+ recorder: blokfleita
53
+ saxophone: saksofon
54
+ snare_drum: frantsuzskii baraban
55
+ tambourine: buben
56
+ tenor_drum: tsilindricheskii baraban
57
+ timpani: litavra
58
+ trombone: trombon
59
+ trumpet: truba
60
+ tuba: tuba
61
+ tubular_bells: trubchatye kolokola
62
+ viola: viola
63
+ viola_d_amore: viola d'amur
64
+ viola_da_gamba: viola da gamba
65
+ violin: skripka
66
+ violoncello: violonchel'
67
+ voice: golos
68
+ xylophone: ksilofon
69
+ zither: tsitra
@@ -31,6 +31,7 @@ class HeadMusic::Octave
31
31
  end
32
32
 
33
33
  attr_reader :number
34
+
34
35
  delegate :to_i, :to_s, to: :number
35
36
 
36
37
  def initialize(number)
@@ -44,6 +44,7 @@ class HeadMusic::Quality
44
44
  end
45
45
 
46
46
  attr_reader :name
47
+
47
48
  delegate :to_s, to: :name
48
49
 
49
50
  def initialize(name)
@@ -8,6 +8,7 @@ class HeadMusic::ScaleDegree
8
8
  NAME_FOR_DIATONIC_DEGREE = [nil, 'tonic', 'supertonic', 'mediant', 'subdominant', 'dominant', 'submediant'].freeze
9
9
 
10
10
  attr_reader :key_signature, :spelling
11
+
11
12
  delegate :scale, to: :key_signature
12
13
  delegate :scale_type, to: :scale
13
14
 
@@ -4,7 +4,7 @@
4
4
  # Composite of a LetterName and an optional Sign.
5
5
  # Does not include the octave. See Pitch for that.
6
6
  class HeadMusic::Spelling
7
- MATCHER = /^\s*([A-G])(#{HeadMusic::Sign.matcher}?)(\-?\d+)?\s*$/i.freeze
7
+ MATCHER = /^\s*([A-G])(#{HeadMusic::Sign.matcher}?)(-?\d+)?\s*$/i.freeze
8
8
 
9
9
  attr_reader :pitch_class
10
10
  attr_reader :letter_name
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HeadMusic
4
- VERSION = '0.24.1'
4
+ VERSION = '0.25.0'
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: 0.24.1
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Head
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-08 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -160,6 +160,7 @@ files:
160
160
  - lib/head_music/locales/es.yml
161
161
  - lib/head_music/locales/fr.yml
162
162
  - lib/head_music/locales/it.yml
163
+ - lib/head_music/locales/ru.yml
163
164
  - lib/head_music/melodic_interval.rb
164
165
  - lib/head_music/meter.rb
165
166
  - lib/head_music/motion.rb
@@ -240,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
241
  requirements:
241
242
  - - ">="
242
243
  - !ruby/object:Gem::Version
243
- version: 2.4.0
244
+ version: '2.5'
244
245
  required_rubygems_version: !ruby/object:Gem::Requirement
245
246
  requirements:
246
247
  - - ">="