head_music 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/head_music/chord.rb +1 -1
- data/lib/head_music/note.rb +4 -1
- data/lib/head_music/style/annotations/at_least_eight_notes.rb +2 -2
- data/lib/head_music/style/annotations/consonant_climax.rb +2 -2
- data/lib/head_music/version.rb +1 -1
- data/lib/head_music/voice.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e49d98777ab35cb1fb73e08560b941c40eefbc45
|
4
|
+
data.tar.gz: e1c5b3542807efa7c960cd0d73462e375565ce2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0b1d9f719e62749bab0ad44de6a34dbb65ecdb0e7dde65500e21485fb28de70db49058865aab1e16a9849ba8a7887b0e5148b3dfc5ed61d034670096ebf14f9
|
7
|
+
data.tar.gz: 5fdbd811aa2474fb2aecaf50cd8414ba8ee09565d5143027572774bf2cc98c7086922523dbcf8b0538411e68719f095af0472bd25bfe27e39c6956a847c56d18
|
data/lib/head_music/chord.rb
CHANGED
data/lib/head_music/note.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
|
+
# Note is like a placement, except:
|
2
|
+
# - always has a pitch
|
3
|
+
# - doesn't require voice and position
|
1
4
|
class HeadMusic::Note
|
2
5
|
attr_accessor :pitch, :rhythmic_value, :voice, :position
|
3
6
|
|
4
7
|
def initialize(pitch, rhythmic_value, voice = nil, position = nil)
|
5
8
|
@pitch = HeadMusic::Pitch.get(pitch)
|
6
9
|
@rhythmic_value = HeadMusic::RhythmicValue.get(rhythmic_value)
|
7
|
-
@voice = voice || Voice.new
|
10
|
+
@voice = voice || HeadMusic::Voice.new
|
8
11
|
@position = position || HeadMusic::Position.new(@voice.composition, '1:1')
|
9
12
|
end
|
10
13
|
|
@@ -16,8 +16,8 @@ class HeadMusic::Style::Annotations::AtLeastEightNotes < HeadMusic::Style::Annot
|
|
16
16
|
|
17
17
|
def no_placements_mark
|
18
18
|
return Style::Mark.new(
|
19
|
-
Position.new(composition, "1:1"),
|
20
|
-
Position.new(composition, "2:1"),
|
19
|
+
HeadMusic::Position.new(composition, "1:1"),
|
20
|
+
HeadMusic::Position.new(composition, "2:1"),
|
21
21
|
fitness: HeadMusic::PENALTY_FACTOR**MINIMUM_NOTES
|
22
22
|
)
|
23
23
|
end
|
@@ -9,8 +9,8 @@ class HeadMusic::Style::Annotations::ConsonantClimax < HeadMusic::Style::Annotat
|
|
9
9
|
def marks
|
10
10
|
if notes
|
11
11
|
improper_climaxes = highest_notes.select.with_index do |note, i|
|
12
|
-
tonic_pitch = Pitch.get(composition.key_signature.tonic_spelling)
|
13
|
-
interval = FunctionalInterval.new(tonic_pitch, note.pitch)
|
12
|
+
tonic_pitch = HeadMusic::Pitch.get(composition.key_signature.tonic_spelling)
|
13
|
+
interval = HeadMusic::FunctionalInterval.new(tonic_pitch, note.pitch)
|
14
14
|
interval.consonance.dissonant? || i > 0
|
15
15
|
end
|
16
16
|
HeadMusic::Style::Mark.for_each(improper_climaxes)
|
data/lib/head_music/version.rb
CHANGED
data/lib/head_music/voice.rb
CHANGED
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.11.
|
4
|
+
version: 0.11.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Head
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
189
|
rubyforge_project:
|
190
|
-
rubygems_version: 2.
|
190
|
+
rubygems_version: 2.6.8
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: The rudiments of western music theory.
|