Sha256: 0b6181170124f4e12985ab90a8f2a2e7e8cdede210f0c549360a977d1c3b5cd2

Contents?: true

Size: 705 Bytes

Versions: 9

Compression:

Stored size: 705 Bytes

Contents

# Module for style guidelines.
module HeadMusic::Style::Guidelines; end

# A counterpoint guideline
class HeadMusic::Style::Guidelines::SingleLargeLeaps < HeadMusic::Style::Guidelines::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

9 entries across 9 versions & 1 rubygems

Version Path
head_music-7.0.5 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-7.0.4 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-7.0.3 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-7.0.2 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-7.0.1 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-7.0.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-6.0.1 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-6.0.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-5.0.0 lib/head_music/style/guidelines/single_large_leaps.rb