Class: HeadMusic::Style::Guidelines::EndOnPerfectConsonance

Inherits:
Annotation
  • Object
show all
Defined in:
lib/head_music/style/guidelines/end_on_perfect_consonance.rb

Overview

marks the voice if the first note is not the first or fifth scale degree of the key.

Constant Summary collapse

MESSAGE =
"End on the first or the fifth scale degree."

Instance Method Summary collapse

Constructor Details

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

Instance Method Details

#ends_on_perfect_consonance?Boolean (private)

Returns:

  • (Boolean)


14
15
16
# File 'lib/head_music/style/guidelines/end_on_perfect_consonance.rb', line 14

def ends_on_perfect_consonance?
  diatonic_interval_from_tonic(last_note).perfect_consonance?(:two_part_harmony)
end

#marksObject



8
9
10
# File 'lib/head_music/style/guidelines/end_on_perfect_consonance.rb', line 8

def marks
  HeadMusic::Style::Mark.for(last_note) if last_note && !ends_on_perfect_consonance?
end