Class: HeadMusic::Style::Guides::DiatonicMelody

Inherits:
SpeciesMelody show all
Defined in:
lib/head_music/style/guides/diatonic_melody.rb

Overview

Guidelines for a free diatonic melody (not bound to cantus firmus start/end constraints).

Constant Summary collapse

SINGABLE_INTERVALS =

Modern interpretation: major sixths are singable; sevenths are not.

%w[P1 m2 M2 m3 M3 P4 P5 m6 M6 P8].freeze
RULESET =
[
  *(MELODIC_CORE - [HeadMusic::Style::Guidelines::SingableIntervals]),
  HeadMusic::Style::Guidelines::SingableIntervals.with(
    ascending: SINGABLE_INTERVALS,
    descending: SINGABLE_INTERVALS
  ),
  HeadMusic::Style::Guidelines::ModerateDirectionChanges,
  HeadMusic::Style::Guidelines::PrepareOctaveLeaps,
  HeadMusic::Style::Guidelines::LargeLeaps.with(
    minimum: :perfect_fourth,
    recovery: %i[consonant_triad any_step repetition opposite_leap_within]
  ),
  HeadMusic::Style::Guidelines::MinimumNotes.with(5),
  HeadMusic::Style::Guidelines::MaximumNotes.with(32)
].freeze