Class: HeadMusic::Style::Guidelines::OneToOne

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

Overview

A counterpoint guideline

Constant Summary collapse

MESSAGE =
"Place a note for each note in the other 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



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

def marks
  return unless cantus_firmus&.notes
  return if cantus_firmus.notes.empty?

  HeadMusic::Style::Mark.for_each(
    notes_without_match(voice, cantus_firmus) + notes_without_match(cantus_firmus, voice)
  )
end