head_music 0.11.3 → 0.11.4

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
  SHA1:
3
- metadata.gz: 03869ec780a5f1b54b6be26c77cd32facd6c1523
4
- data.tar.gz: 45524a9dbd2a3c7180e46111d4c1745a0fab09ab
3
+ metadata.gz: e49d98777ab35cb1fb73e08560b941c40eefbc45
4
+ data.tar.gz: e1c5b3542807efa7c960cd0d73462e375565ce2e
5
5
  SHA512:
6
- metadata.gz: 5a1ccb581870aa01cedb8b51f5d98d56758df353ef44f8740d212d4935d5d5e972f2d93d5250da1ec0bfde556d9f86983e770ff513a2b636dae4039c40c5d928
7
- data.tar.gz: 26dcdc503e9c25718ce0d6c1fd24a53bcd86847f9a443be2d27161087e675ebf54defcaa9cbe5b83f2cc6e2ef4089ecfc3d9db0f165215ff8f46d0eb3c1215c9
6
+ metadata.gz: c0b1d9f719e62749bab0ad44de6a34dbb65ecdb0e7dde65500e21485fb28de70db49058865aab1e16a9849ba8a7887b0e5148b3dfc5ed61d034670096ebf14f9
7
+ data.tar.gz: 5fdbd811aa2474fb2aecaf50cd8414ba8ee09565d5143027572774bf2cc98c7086922523dbcf8b0538411e68719f095af0472bd25bfe27e39c6956a847c56d18
@@ -17,7 +17,7 @@ class HeadMusic::Chord
17
17
 
18
18
  def intervals
19
19
  pitches.drop(1).map.with_index do |pitch, i|
20
- FunctionalInterval.new(pitches[i], pitch)
20
+ HeadMusic::FunctionalInterval.new(pitches[i], pitch)
21
21
  end
22
22
  end
23
23
 
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module HeadMusic
2
- VERSION = "0.11.3"
2
+ VERSION = "0.11.4"
3
3
  end
@@ -5,7 +5,7 @@ class HeadMusic::Voice
5
5
  delegate :key_signature, to: :composition
6
6
 
7
7
  def initialize(composition: nil, role: nil)
8
- @composition = composition || Composition.new
8
+ @composition = composition || HeadMusic::Composition.new
9
9
  @role = role
10
10
  @placements = []
11
11
  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.11.3
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-03-16 00:00:00.000000000 Z
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.5.1
190
+ rubygems_version: 2.6.8
191
191
  signing_key:
192
192
  specification_version: 4
193
193
  summary: The rudiments of western music theory.