Sha256: 11b63ad913ad64a1dce164fb386ec2f433638eecafa1efae0b9fd0ea6f5becd6

Contents?: true

Size: 1017 Bytes

Versions: 2

Compression:

Stored size: 1017 Bytes

Contents

# frozen_string_literal: true

# Module for rulesets
module HeadMusic::Style::Rulesets; end

# Rules for first species melodies
class HeadMusic::Style::Rulesets::FirstSpeciesMelody
  RULESET = [
    HeadMusic::Style::Annotations::ConsonantClimax,
    HeadMusic::Style::Annotations::Diatonic,
    HeadMusic::Style::Annotations::EndOnTonic,
    HeadMusic::Style::Annotations::FrequentDirectionChanges,
    HeadMusic::Style::Annotations::LimitOctaveLeaps,
    HeadMusic::Style::Annotations::MostlyConjunct,
    HeadMusic::Style::Annotations::NoRests,
    HeadMusic::Style::Annotations::NotesSameLength,
    HeadMusic::Style::Annotations::PrepareOctaveLeaps,
    HeadMusic::Style::Annotations::SingableIntervals,
    HeadMusic::Style::Annotations::SingableRange,
    HeadMusic::Style::Annotations::StartOnPerfectConsonance,
    HeadMusic::Style::Annotations::StepOutOfUnison,
    HeadMusic::Style::Annotations::StepUpToFinalNote,
  ].freeze

  def self.analyze(voice)
    RULESET.map { |rule| rule.new(voice) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
head_music-0.19.0 lib/head_music/style/rulesets/first_species_melody.rb
head_music-0.18.0 lib/head_music/style/rulesets/first_species_melody.rb