Sha256: ace439dfc1ee0e1b647183575e312ba792a7491ca4cf6ca348d248da1ba86208

Contents?: true

Size: 408 Bytes

Versions: 8

Compression:

Stored size: 408 Bytes

Contents

module HeadMusic::Style::Annotations
end

class HeadMusic::Style::Annotations::LimitOctaveLeaps < HeadMusic::Style::Annotation
  MESSAGE = "Use a maximum of one octave skip."

  def marks
    if octave_leaps.length > 1
      octave_leaps.map do |leap|
        HeadMusic::Style::Mark.for_all(leap.notes)
      end
    end
  end

  private

  def octave_leaps
    melodic_intervals.select(&:octave?)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
head_music-0.16.0 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.14.8 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.14.7 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.14.5 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.14.4 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.14.2 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.14.1 lib/head_music/style/annotations/limit_octave_leaps.rb
head_music-0.13.2 lib/head_music/style/annotations/limit_octave_leaps.rb