Class: HeadMusic::Style::Guidelines::EmbellishedSuspensionTreatment
- Inherits:
-
SuspensionTreatment
- Object
- HeadMusic::Style::Guideline
- SuspensionTreatment
- HeadMusic::Style::Guidelines::EmbellishedSuspensionTreatment
- Defined in:
- lib/head_music/style/guidelines/embellished_suspension_treatment.rb
Overview
Fifth species lets the space between a suspension and its resolution be decorated. The resolution is still the note sounding on the bar's second strong beat, as in fourth species: a step down from the suspended pitch and consonant there, whether attacked on that beat or anticipated and held. What is attacked in between is FloridDissonanceTreatment's to judge.
Instance Method Summary collapse
-
#resolution_position(cf_note) ⇒ Object
private
The slot presupposes a suspension over a downbeat that lasts to the bar's second strong beat.
- #resolved?(cp_note, cf_note) ⇒ Boolean private
Constructor Details
This class inherits a constructor from HeadMusic::Style::Guideline
Instance Method Details
#resolution_position(cf_note) ⇒ Object (private)
The slot presupposes a suspension over a downbeat that lasts to the bar's second strong beat. A cantus note attacked off the downbeat or gone before that beat (a cantus firmus graded against a florid line), and a meter with no second strong beat, all get the strict rule instead.
27 28 29 30 31 32 33 34 35 |
# File 'lib/head_music/style/guidelines/embellished_suspension_treatment.rb', line 27 def resolution_position(cf_note) position = cf_note.position return unless position.count == 1 && position.tick.zero? slot = (2..position.meter.) .map { |count| HeadMusic::Content::Position.new(flow, "#{position.bar_number}:#{count}") } .detect(&:strong?) slot if slot&.within_placement?(cf_note) end |
#resolved?(cp_note, cf_note) ⇒ Boolean (private)
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/head_music/style/guidelines/embellished_suspension_treatment.rb', line 12 def resolved?(cp_note, cf_note) position = resolution_position(cf_note) return super unless position resolution = voice.note_at(position) return false unless resolution melodic = HeadMusic::Analysis::MelodicInterval.new(cp_note, resolution) melodic.step? && melodic.descending? && consonant_at?(position) end |