? max (beam_count_for_rhythmic_position (i + 1),
beam_count_for_length (remaining_length (i + 1)))
// ... except if there's only one trailing stem
: beam_count_for_rhythmic_position (i + 1)
? max (beam_count_for_rhythmic_position (i + 1),
beam_count_for_length (remaining_length (i + 1)))
// ... except if there's only one trailing stem
: beam_count_for_rhythmic_position (i + 1)