class HeadMusic::Style::Guidelines::AtLeastEightNotes
A counterpoint guideline
Constants
- MESSAGE
- MINIMUM_NOTES
Public Instance Methods
marks()
click to toggle source
# File lib/head_music/style/guidelines/at_least_eight_notes.rb, line 12 def marks placements.empty? ? no_placements_mark : deficiency_mark end
Private Instance Methods
deficiency_mark()
click to toggle source
# File lib/head_music/style/guidelines/at_least_eight_notes.rb, line 26 def deficiency_mark return unless notes.length < MINIMUM_NOTES HeadMusic::Style::Mark.for_all(placements, fitness: notes.length.to_f / MINIMUM_NOTES) end
no_placements_mark()
click to toggle source
# File lib/head_music/style/guidelines/at_least_eight_notes.rb, line 18 def no_placements_mark HeadMusic::Style::Mark.new( HeadMusic::Position.new(composition, '1:1'), HeadMusic::Position.new(composition, '2:1'), fitness: 0 ) end