Sha256: d0fadc854e5ebac3da104a3363631d0c1cf3e5a8692553db5f145b69c481f778
Contents?: true
Size: 687 Bytes
Versions: 1
Compression:
Stored size: 687 Bytes
Contents
# frozen_string_literal: true # Module for style guidelines. module HeadMusic::Style::Guidelines; end # marks the voice if the first note is not the first or fifth scale degree of the key. class HeadMusic::Style::Guidelines::StartOnPerfectConsonance < HeadMusic::Style::Annotation MESSAGE = 'Start on the tonic or a perfect consonance above the tonic (unless bass voice).' def marks return unless first_note && ((bass_voice? && !starts_on_tonic?) || !starts_on_perfect_consonance?) HeadMusic::Style::Mark.for(first_note) end private def starts_on_perfect_consonance? functional_interval_from_tonic(first_note).perfect_consonance?(:two_part_harmony) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
head_music-0.22.0 | lib/head_music/style/guidelines/start_on_perfect_consonance.rb |