Sha256: 51589f03b6b5d059ffc5e980796b22ce94d5b60764929481c0d400397c81e2b9
Contents?: true
Size: 582 Bytes
Versions: 10
Compression:
Stored size: 582 Bytes
Contents
module HeadMusic::Style::Annotations end class HeadMusic::Style::Annotations::OneToOne < HeadMusic::Style::Annotation MESSAGE = 'Place a note for each note in the other voice.' def marks if cantus_firmus && cantus_firmus.notes.length > 0 HeadMusic::Style::Mark.for_each( notes_without_match(voice, cantus_firmus) + notes_without_match(cantus_firmus, voice) ) end end private def notes_without_match(voice1, voice2) voice1.notes.reject do |voice1_note| voice2.notes.map(&:position).include?(voice1_note.position) end end end
Version data entries
10 entries across 10 versions & 1 rubygems