Class: HeadMusic::Style::Guidelines::EndOnTonic
- Inherits:
-
Annotation
- Object
- Annotation
- HeadMusic::Style::Guidelines::EndOnTonic
show all
- Defined in:
- lib/head_music/style/guidelines/end_on_tonic.rb
Overview
Constant Summary
collapse
- MESSAGE =
"End on the first scale degree."
Instance Method Summary
collapse
Instance Method Details
#ends_on_tonic? ⇒ Boolean
14
15
16
|
# File 'lib/head_music/style/guidelines/end_on_tonic.rb', line 14
def ends_on_tonic?
tonic_spelling == last_note_spelling
end
|
#last_note_spelling ⇒ Object
18
19
20
|
# File 'lib/head_music/style/guidelines/end_on_tonic.rb', line 18
def last_note_spelling
last_note&.spelling
end
|
#marks ⇒ Object
8
9
10
|
# File 'lib/head_music/style/guidelines/end_on_tonic.rb', line 8
def marks
HeadMusic::Style::Mark.for(last_note) if notes.any? && !ends_on_tonic?
end
|