Class: HeadMusic::Style::Guidelines::StartOnPerfectConsonance

Inherits:
Annotation
  • Object
show all
Defined in:
lib/head_music/style/guidelines/start_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 =
"Start on the tonic or a perfect consonance above the tonic (unless bass voice)."

Instance Attribute Summary

Attributes inherited from Annotation

#voice

Instance Method Summary collapse

Methods inherited from Annotation

#adherent?, #end_position, #fitness, #initialize, #message, #notes?, #start_position

Constructor Details

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

Instance Method Details

#marksObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/head_music/style/guidelines/start_on_perfect_consonance.rb', line 8

def marks
  return unless first_note

  needs_marking = if bass_voice?
    !starts_on_tonic?
  else
    !starts_on_perfect_consonance?
  end

  HeadMusic::Style::Mark.for(first_note) if needs_marking
end