class HeadMusic::Style::Guidelines::SingableRange
A voice shouldn't expend the range of a 10th.
Constants
- MAXIMUM_RANGE
- MESSAGE
Public Instance Methods
marks()
click to toggle source
# File lib/head_music/style/guidelines/singable_range.rb, line 12 def marks HeadMusic::Style::Mark.for_each(extremes, fitness: HeadMusic::PENALTY_FACTOR**overage) if overage.positive? end
Private Instance Methods
extremes()
click to toggle source
# File lib/head_music/style/guidelines/singable_range.rb, line 22 def extremes (highest_notes + lowest_notes).sort end
overage()
click to toggle source
# File lib/head_music/style/guidelines/singable_range.rb, line 18 def overage notes.any? ? [range.number - MAXIMUM_RANGE, 0].max : 0 end