head_music 6.0.1 → 7.0.0
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/instruments.yml +118 -127
- 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 +1 -14
- 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: 5329e3d4233738556d545c62cf0c721f42f8736aa483f58b80a6812318af0aa7
|
4
|
+
data.tar.gz: 5267548a7f4be05a8a3cbd76354ac1d6cc501475c235b0b5626a725be7f136a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d90ef9a5432dc7fe68584f6ecccf7b2441aaaf756f5c19555fed48e8bb1f68a5bf0bf124500189f7f4366d62b0901e8910f07e3ed2a7ba43a47e6dddbf9df61
|
7
|
+
data.tar.gz: c9787b84e779684e2a807ff9af4bdc4bc98a7eafda0512c1d1beb0c0ab9034a7c28b551983ca914f2b6b364ba968b696086762777c3d58682f76577f811daee0
|
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} voice
|
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
|
|