Some backends (notably musicxml2) does not automatically replace flags with beams for eight notes and below. An algorithm to generate beams would look something like
import Music.Score.Rhythm
class Beamable a where
beginBeam :: True -> a -> a
endBeam :: True -> a -> a
addBeams :: Beamable a => TimeSignature -> Rhythm a -> Rhythm a
addBeams = ...
Some backends (notably musicxml2) does not automatically replace flags with beams for eight notes and below. An algorithm to generate beams would look something like
For example
It is probably a good idea to start implementing the most common time signatures (2/4, 3/4, 6/8, 4/4 etc) and add the more uncommon cases later.