Sha256: 1a9c12af2a742e3cad62218a6f32bce661e11e459326d2691dfde640d6c658dc

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 Bytes

Contents

# frozen_string_literal: true

# Module for Annotations.
module HeadMusic::Style::Annotations; end

# A counterpoint guideline
class HeadMusic::Style::Annotations::SingleLargeLeaps < HeadMusic::Style::Annotations::RecoverLargeLeaps
  MESSAGE = 'Recover leaps by step, repetition, opposite direction, or spelling triad.'

  private

  def unrecovered_leap?(first_interval, second_interval, third_interval)
    return false unless first_interval.large_leap?
    return false if spelling_consonant_triad?(first_interval, second_interval, third_interval)
    return false if second_interval.step?
    return false if second_interval.repetition?
    !direction_changed?(first_interval, second_interval) && second_interval.leap?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
head_music-0.19.0 lib/head_music/style/annotations/single_large_leaps.rb
head_music-0.18.0 lib/head_music/style/annotations/single_large_leaps.rb