Class: HeadMusic::Style::Guidelines::TripleMeterDissonanceTreatment

Inherits:
WeakBeatDissonanceTreatment show all
Defined in:
lib/head_music/style/guidelines/triple_meter_dissonance_treatment.rb

Overview

A counterpoint guideline for triple-meter dissonance treatment. Every dissonant note on beats 2 or 3 must be treated as a passing tone or neighbor tone.

Constant Summary collapse

MESSAGE =
"Treat dissonances as passing tones or neighbor tones."

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from HeadMusic::Style::Annotation

Instance Method Details

#neighbor_tone?(note) ⇒ Boolean (private)

Neighbor tone: approached by step, left by step in the opposite direction.

Returns:

  • (Boolean)


16
17
18
19
20
21
22
23
24
25
# File 'lib/head_music/style/guidelines/triple_meter_dissonance_treatment.rb', line 16

def neighbor_tone?(note)
  prev = preceding_note(note)
  foll = following_note(note)
  return false unless prev && foll

  approach = melodic_interval_between(prev, note)
  departure = melodic_interval_between(note, foll)

  approach.step? && departure.step? && approach.direction != departure.direction
end

#recognized_figure?(note) ⇒ Boolean (private)

Returns:

  • (Boolean)


11
12
13
# File 'lib/head_music/style/guidelines/triple_meter_dissonance_treatment.rb', line 11

def recognized_figure?(note)
  super || neighbor_tone?(note)
end