Class: HeadMusic::Style::Guidelines::AlwaysMove

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

Overview

A counterpoint guideline

Constant Summary collapse

MESSAGE =
"Always move to a different note."

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
# File 'lib/head_music/style/guidelines/always_move.rb', line 8

def marks
  melodic_intervals
    .select { |interval| interval.perfect? && interval.unison? }
    .map { |interval| HeadMusic::Style::Mark.for_all(interval.notes) }
end