Monday, August 25, 2008

HNotate

Copperbox revision 236.

HNotate alt - more work on the Score datatypes to support traversals and I've added a new module Bifunctor to abstract over Glyphs which have two type arguments - pitch and duration.

Outputting LilyPond and Abc score files from note lists has been far tougher than I expected. When I started I imagined the only big problem would be adding extra information - for instance score files generally need time and key signatures which aren't in note lists.

This is still a problem which I haven't really resolved (although the pretty print combinators let you overcome it in a rough and ready way), but there have been other significant ones that have made the project work rather than fun. The big one has been a good representation of sheet music, which seems so simple on the face of it - essentially lines (staves) and glyphs (notes, rests, chords, grace notes...). This has been particularly dispiriting as each revision of the score representation over the last couple of months has allowed me to get a little bit further, but then derailed leaving the LilyPond and Abc backends with duplicated copy-paste-edit code that impervious to factoring.

Maybe the new revision will work better - it's nice that it can support fmap, Foldable and Traversable on the structure of the score and bimap (analogous to fmap) on the glyphs. The glyphs are terminals if you envisage the score as a grammar. If it doesn't then its time to abandon Bala and HNotate and go onto something else.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.