Class: HeadMusic::Style::Guidelines::RecoverLargeLeaps

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

Overview

Ok, so a rule might be that after the first leap (after previous steps) one should normally move by step in the opposite direction unless another leap (in either direction) creates a consonant triad.

  • Brian

Direct Known Subclasses

SingleLargeLeaps

Constant Summary collapse

MESSAGE =
"Recover large leaps by step in the opposite direction."

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



13
14
15
16
17
18
19
# File 'lib/head_music/style/guidelines/recover_large_leaps.rb', line 13

def marks
  melodic_intervals.each_cons(3).map do |intervals|
    if unrecovered_leap?(intervals[0], intervals[1], intervals[2])
      HeadMusic::Style::Mark.for_all(notes_in_intervals(intervals))
    end
  end.compact
end