Sha256: f2f2d7318254ebd8db4edba4c599b169310dc01b96b1de7a5b09eac5d4fe136b

Contents?: true

Size: 736 Bytes

Versions: 18

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

# 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

18 entries across 18 versions & 1 rubygems

Version Path
head_music-0.27.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.26.3 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.26.2 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.26.1 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.26.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.25.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.24.5 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.24.4 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.24.3 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.24.2 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.24.1 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.24.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.23.4 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.23.3 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.23.2 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.23.1 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.23.0 lib/head_music/style/guidelines/single_large_leaps.rb
head_music-0.22.0 lib/head_music/style/guidelines/single_large_leaps.rb