Class: HeadMusic::Style::Guidelines::SingableIntervals

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

Overview

A counterpoint guideline

Constant Summary collapse

PERMITTED_ASCENDING =
%w[PU m2 M2 m3 M3 P4 P5 m6 P8].freeze
PERMITTED_DESCENDING =
%w[PU m2 M2 m3 M3 P4 P5 P8].freeze
MESSAGE =
"Use only PU, m2, M2, m3, M3, P4, P5, m6 (ascending), P8 in the melodic line."

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



11
12
13
14
15
# File 'lib/head_music/style/guidelines/singable_intervals.rb', line 11

def marks
  melodic_note_pairs.reject { |note_pair| permitted?(note_pair) }.map do |pair_with_unpermitted_interval|
    HeadMusic::Style::Mark.for_all(pair_with_unpermitted_interval.notes)
  end
end