Class: HeadMusic::Style::Guidelines::WeakBeatDissonanceTreatment
- Inherits:
-
Annotation
- Object
- Annotation
- HeadMusic::Style::Guidelines::WeakBeatDissonanceTreatment
- Includes:
- DissonanceFigureDetection
- Defined in:
- lib/head_music/style/guidelines/weak_beat_dissonance_treatment.rb
Overview
A counterpoint guideline
Direct Known Subclasses
SecondSpeciesBreak, ThirdSpeciesDissonanceTreatment, TripleMeterDissonanceTreatment
Constant Summary collapse
- MESSAGE =
"Use only passing tones for dissonances on the weak beat."
Instance Method Summary collapse
-
#all_consonant_with_cantus?(*checked_notes) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#cambiata_as_note_2?(index) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#cambiata_dissonance?(note) ⇒ Boolean
included
from DissonanceFigureDetection
private
Nota cambiata: a five-note figure where note 2 is dissonant, approached by step from note 1, leaps a third in the same direction to note 3, then notes 3-4-5 proceed stepwise in the opposite direction.
-
#cambiata_shape?(n1, n2, n3, n4, n5) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#cantus_firmus_positions ⇒ Object
included
from DissonanceFigureDetection
private
Positions where the cantus firmus sounds a note (the strong beats).
-
#consonant_with_cantus?(note) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#dissonant_weak_beat_notes ⇒ Object
private
-
#dissonant_with_cantus?(note) ⇒ Boolean
included
from DissonanceFigureDetection
private
A note whose pitch clashes with the cantus firmus in two-part harmony.
-
#double_neighbor_figure?(index, offset:) ⇒ Boolean
included
from DissonanceFigureDetection
private
Double neighbor: a four-note figure within one bar.
-
#double_neighbor_member?(note) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#double_neighbor_shape?(n1, n2, n3, n4) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#downbeat_position?(position) ⇒ Boolean
private
-
#marks ⇒ Object
-
#melodic_interval_between(note1, note2) ⇒ Object
included
from DissonanceFigureDetection
private
-
#neighbor_tone?(note) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#passing_tone?(note) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#recognized_figure?(note) ⇒ Boolean
private
-
#steps_back_from?(leap, step_back_1, step_back_2) ⇒ Boolean
included
from DissonanceFigureDetection
private
Notes 3-4-5 must both step in the direction opposite the leap.
-
#stepwise_figure?(note, same_direction:) ⇒ Boolean
included
from DissonanceFigureDetection
private
-
#weak_beat_notes ⇒ Object
private
Constructor Details
This class inherits a constructor from HeadMusic::Style::Annotation
Instance Method Details
#all_consonant_with_cantus?(*checked_notes) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#cambiata_as_note_2?(index) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#cambiata_dissonance?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
Nota cambiata: a five-note figure where note 2 is dissonant, approached by step from note 1, leaps a third in the same direction to note 3, then notes 3-4-5 proceed stepwise in the opposite direction. Notes 1, 3, and 5 must be consonant with the CF.
#cambiata_shape?(n1, n2, n3, n4, n5) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#cantus_firmus_positions ⇒ Object (private) Originally defined in module DissonanceFigureDetection
Positions where the cantus firmus sounds a note (the strong beats).
#consonant_with_cantus?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#dissonant_weak_beat_notes ⇒ Object (private)
24 25 26 |
# File 'lib/head_music/style/guidelines/weak_beat_dissonance_treatment.rb', line 24 def dissonant_weak_beat_notes weak_beat_notes.select { |note| dissonant_with_cantus?(note) } end |
#dissonant_with_cantus?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
A note whose pitch clashes with the cantus firmus in two-part harmony.
#double_neighbor_figure?(index, offset:) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
Double neighbor: a four-note figure within one bar. Beats 1 and 4 are the same pitch (consonant), beats 2 and 3 are upper and lower neighbors connected by a leap of a third.
#double_neighbor_member?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#double_neighbor_shape?(n1, n2, n3, n4) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#downbeat_position?(position) ⇒ Boolean (private)
32 33 34 |
# File 'lib/head_music/style/guidelines/weak_beat_dissonance_treatment.rb', line 32 def downbeat_position?(position) cantus_firmus_positions.include?(position.to_s) end |
#marks ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/head_music/style/guidelines/weak_beat_dissonance_treatment.rb', line 10 def marks return [] unless cantus_firmus&.notes&.any? dissonant_weak_beat_notes.reject { |note| recognized_figure?(note) }.map do |note| HeadMusic::Style::Mark.for(note) end end |
#melodic_interval_between(note1, note2) ⇒ Object (private) Originally defined in module DissonanceFigureDetection
#neighbor_tone?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#passing_tone?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#recognized_figure?(note) ⇒ Boolean (private)
20 21 22 |
# File 'lib/head_music/style/guidelines/weak_beat_dissonance_treatment.rb', line 20 def recognized_figure?(note) passing_tone?(note) end |
#steps_back_from?(leap, step_back_1, step_back_2) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
Notes 3-4-5 must both step in the direction opposite the leap.
#stepwise_figure?(note, same_direction:) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#weak_beat_notes ⇒ Object (private)
28 29 30 |
# File 'lib/head_music/style/guidelines/weak_beat_dissonance_treatment.rb', line 28 def weak_beat_notes notes.reject { |note| downbeat_position?(note.position) } end |