head_music 6.0.1 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/lib/head_music/consonance.rb +1 -1
- data/lib/head_music/content/composition.rb +3 -2
- data/lib/head_music/content/position.rb +0 -4
- data/lib/head_music/data/instrument_families.yml +1 -0
- data/lib/head_music/data/instruments.yml +411 -132
- data/lib/head_music/diatonic_interval/category.rb +24 -0
- data/lib/head_music/diatonic_interval/naming.rb +73 -0
- data/lib/head_music/diatonic_interval/parser.rb +47 -0
- data/lib/head_music/diatonic_interval/semitones.rb +36 -0
- data/lib/head_music/diatonic_interval/size.rb +50 -0
- data/lib/head_music/diatonic_interval.rb +1 -229
- data/lib/head_music/instrument/staff_scheme.rb +3 -3
- data/lib/head_music/instrument/{pitch_variant.rb → variant.rb} +6 -6
- data/lib/head_music/instrument.rb +9 -9
- data/lib/head_music/key_signature/enharmonic_equivalence.rb +2 -6
- data/lib/head_music/key_signature.rb +0 -1
- data/lib/head_music/locales/en.yml +77 -17
- data/lib/head_music/locales/fr.yml +0 -1
- data/lib/head_music/named.rb +0 -4
- data/lib/head_music/scale_degree.rb +9 -4
- data/lib/head_music/style/guidelines/notes_same_length.rb +0 -4
- data/lib/head_music/style/mark.rb +1 -4
- data/lib/head_music/version.rb +1 -1
- data/lib/head_music.rb +6 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 389a01e3f1ee98f5fed32a8fc0ade9c62d0ac3b8e19862bceed574939a2fd9c4
|
4
|
+
data.tar.gz: 639b5a1a4626e5aa00344933a2933bb3d9f50af4c23b64a406a348a80e7d4095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 613ba46bebdb8072897e7512820a2faa89aff68e38f6a4dc5473432279556e6791fd4820a958ee139f9c11637d22d5523c0feee911588b08550b1fb284bd78b4
|
7
|
+
data.tar.gz: e49101f5776171b68725e0004bbe6f4026e46b896f1dedd20c9b02219493f6f7ad57dfbcc84546489595b0db3a8294234f36ed71c37b41adc14ce33f903ff355
|
data/.rubocop.yml
CHANGED
@@ -46,7 +46,7 @@ class HeadMusic::Content::Composition
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def latest_bar_number
|
49
|
-
[voices.map(&:
|
49
|
+
[voices.map(&:latest_bar_number), 1].flatten.max
|
50
50
|
end
|
51
51
|
|
52
52
|
def cantus_firmus_voice
|
@@ -58,7 +58,7 @@ class HeadMusic::Content::Composition
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def to_s
|
61
|
-
"#{name} — #{voices.count}
|
61
|
+
"#{name} — #{voices.count} #{(voices.count == 1) ? "voice" : "voices"}"
|
62
62
|
end
|
63
63
|
|
64
64
|
private
|
@@ -71,6 +71,7 @@ class HeadMusic::Content::Composition
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def last_meter_change(bar_number)
|
74
|
+
bar_number = [bar_number, earliest_bar_number].max
|
74
75
|
bars(bar_number)[earliest_bar_number..bar_number].reverse.detect(&:meter)
|
75
76
|
end
|
76
77
|
|