Class: HeadMusic::Style::Guidelines::FloridDissonanceTreatment
- Inherits:
-
HeadMusic::Style::Guideline
- Object
- HeadMusic::Style::Guideline
- HeadMusic::Style::Guidelines::FloridDissonanceTreatment
- Includes:
- DissonanceFigureDetection
- Defined in:
- lib/head_music/style/guidelines/florid_dissonance_treatment.rb
Overview
Unified dissonance handling for mixed-species (florid) contexts. Judges each note at its attack: a dissonance attacked on a strong beat is a fault, and a weak-beat dissonance must be a passing tone, neighbor tone, nota cambiata, or double neighbor figure. A note held over into a dissonance starts on a weak beat and is consonant there, so it is never this guideline's concern; the suspension rule judges it.
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
- #consonant_with_cantus?(note) ⇒ Boolean included from DissonanceFigureDetection private
- #dissonant_with_cantus?(note) ⇒ Boolean included from DissonanceFigureDetection private
-
#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
- #improperly_treated_notes ⇒ Object private
- #marks ⇒ Object
- #melodic_interval_between(note1, note2) ⇒ Object included from DissonanceFigureDetection private
- #neighbor_tone?(note) ⇒ Boolean included from DissonanceFigureDetection private
- #on_strong_beat?(note) ⇒ Boolean private
- #passing_tone?(note) ⇒ Boolean included from DissonanceFigureDetection private
- #properly_treated?(note) ⇒ Boolean private
- #steps_back_from?(leap, step_back_1, step_back_2) ⇒ Boolean included from DissonanceFigureDetection private
- #stepwise_figure?(note, same_direction:) ⇒ Boolean included from DissonanceFigureDetection private
Constructor Details
This class inherits a constructor from HeadMusic::Style::Guideline
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
#consonant_with_cantus?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#dissonant_with_cantus?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#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
#improperly_treated_notes ⇒ Object (private)
21 22 23 |
# File 'lib/head_music/style/guidelines/florid_dissonance_treatment.rb', line 21 def improperly_treated_notes notes.select { |note| dissonant_with_cantus?(note) && !properly_treated?(note) } end |
#marks ⇒ Object
13 14 15 16 17 |
# File 'lib/head_music/style/guidelines/florid_dissonance_treatment.rb', line 13 def marks return [] unless cantus_firmus&.notes&.any? HeadMusic::Style::Mark.for_each(improperly_treated_notes) end |
#melodic_interval_between(note1, note2) ⇒ Object (private) Originally defined in module DissonanceFigureDetection
#neighbor_tone?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#on_strong_beat?(note) ⇒ Boolean (private)
32 33 34 |
# File 'lib/head_music/style/guidelines/florid_dissonance_treatment.rb', line 32 def on_strong_beat?(note) cantus_firmus_positions.include?(note.position.to_s) end |
#passing_tone?(note) ⇒ Boolean (private) Originally defined in module DissonanceFigureDetection
#properly_treated?(note) ⇒ Boolean (private)
25 26 27 28 29 30 |
# File 'lib/head_music/style/guidelines/florid_dissonance_treatment.rb', line 25 def properly_treated?(note) return false if on_strong_beat?(note) passing_tone?(note) || neighbor_tone?(note) || cambiata_dissonance?(note) || double_neighbor_member?(note) end |