Sha256: 437db8f645abf1d7d066ffd7b97c50f71f82a5935c6b4bed4988a0d6b3754386
Contents?: true
Size: 526 Bytes
Versions: 18
Compression:
Stored size: 526 Bytes
Contents
# frozen_string_literal: true # Module for style guidelines. module HeadMusic::Style::Guidelines; end # A counterpoint guideline: Use a maximum of one octave leap. class HeadMusic::Style::Guidelines::LimitOctaveLeaps < HeadMusic::Style::Annotation MESSAGE = 'Use a maximum of one octave leap.' def marks return if octave_leaps.length <= 1 octave_leaps.map do |leap| HeadMusic::Style::Mark.for_all(leap.notes) end end private def octave_leaps melodic_intervals.select(&:octave?) end end
Version data entries
18 entries across 18 versions & 1 rubygems