Sha256: 70104223c1af4428bd960c1b0085afe1a2f768bb470d37d4f6af115cfbedee81

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

module HeadMusic::Style::Annotations
end

class HeadMusic::Style::Annotations::ConsonantClimax < HeadMusic::Style::Annotation
  MESSAGE = "Peak on a consonant high note one time."

  def marks
    if notes
      improper_climaxes = highest_notes.select.with_index do |note, i|
        tonic_pitch = HeadMusic::Pitch.get(tonic_spelling)
        interval = HeadMusic::FunctionalInterval.new(tonic_pitch, note.pitch)
        interval.consonance(:melodic).dissonant? || i > 0
      end
      HeadMusic::Style::Mark.for_each(improper_climaxes)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
head_music-0.14.2 lib/head_music/style/annotations/consonant_climax.rb
head_music-0.14.1 lib/head_music/style/annotations/consonant_climax.rb
head_music-0.13.2 lib/head_music/style/annotations/consonant_climax.rb