Tuesday, December 2, 2008

HNotate

Copperbox revision 364.

I've implemented the LilyPond relative traversal* as a focused shape-contents traversal. The code size is about the same as the WrappedMonad version of this traversal. The code seems an improvement (in terms of clarity, readability, ...). However this may solely be 'second attempt advantage' - if I had done another WrappedMonad version that would no doubt be an improvement. So for the time being both versions are in the code base.

Traversals are still HNotate's weak point, as the last post and commit fixing a tuplet bug highlighted. A large part of this is due to the main containers / data structures not being directly functorial - where list [a] is a one layer container over its element type, HNotate often has two layer containers Seq (Seq a) and also carries around extra information (e.g. bar numbers) that can't be accessed functorially (i.e. bar numbers are invisible to fmap, foldable or traverse).


* The traversal changes both pitch and duration to be relative to the preceding note

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.