class HeadMusic::Style::Guidelines::EndOnTonic

A counterpoint guideline

Constants

MESSAGE

Public Instance Methods

marks() click to toggle source
# File lib/head_music/style/guidelines/end_on_tonic.rb, line 10
def marks
  HeadMusic::Style::Mark.for(notes.last) if notes.any? && !ends_on_tonic?
end

Private Instance Methods

ends_on_tonic?() click to toggle source
# File lib/head_music/style/guidelines/end_on_tonic.rb, line 16
def ends_on_tonic?
  tonic_spelling == last_note_spelling
end
last_note_spelling() click to toggle source
# File lib/head_music/style/guidelines/end_on_tonic.rb, line 20
def last_note_spelling
  last_note&.spelling
end