Sunday, June 15, 2008

Bala

Copperbox revisions 140 & 141.

Revision 141 adds changes to SymBase that were missed in 140 (140 will note compile).

The final tagless versions (SymLilyPond and SymAbc) can now generate output for their respective formats - the files DemoSymLy.hs and DemoSymabc.hs have tentative examples. There is still a lot of work to do, but to me this feels like a milestone.

I've added a datatype MeterFraction that represents fractions that shouldn't be normalized. Previously meters were represented by the Rational datatype from the standard libraries , but this normalizes fractions - 4/4 automatically becomes 1/1. This is not the required behavior for time signatures.

Saturday, June 14, 2008

Bala

Copperbox revision 139.

I've moved common code from SymAbc and SymLilyPond into a common module SymBase. Also more updates to both SymAbc and SymLilyPond.

Friday, June 13, 2008

Bala

Copperbox revision 138.

Some updates to SymAbc to handle mid-tune fields, plus more substantial updates to SymLilyPond.

Rather than use optional fields in the datatype constructors (using the SymMaybe wrapper), SymLilyPond now uses attributes like SymAbc.

Attributes a really just functions attr -> val -> val but wrapped up in the final tagless style, plus the reverse application operator to make them postix. So a note 'c_' with a duration attribute of 4 becomes:

note c_ # dur 4

Thursday, June 12, 2008

Bala

Copperbox revision 137.

I've added a version of Abc format in the 'final tagless' style. As Abc has a smaller grammar than LilyPond it has been easier to experiment with this version. Notably I've worked out fitting together different elements of the grammar with three operators inspired by Text.Html in the standard libraries.

(+++) concatenates elements at the same 'level' in the grammar.

(#) is reversed function composition (.) and it is used to add optional attributes to elements. For instance a note may have an optional octave specification and accidental.

(<<) is ($) but with higher precedence, so that elements that are n-ary functions can be applied to their sub-elements without needed extraneous parentheses.

Thursday, June 5, 2008

Bala

Copperbox revision 136.

Some updates to SymLilyPond. I think have sorted out a context scheme to make LilyPond output well-formed (or at least better-formed), so I'm checking in SymLilyPond before I make significant changes to it.

Monday, June 2, 2008

Bala

Copperbox revision 135.

Added an alternative implementation of the LilyPond format library.

The new version is in the 'Finally tagless' style, which should give me modular syntax (important because the LilyPond grammar is pretty big). I've been working for the last month on experiments to get modular syntax and the 'Finally tagless' approach seems the most appropriate one. There is still quite a bit of work to do - both to add the missing parts of the grammar that are in the previous version and to add 'contexts' to the grammar so that ill-formed output cannot be produced.

Thursday, May 1, 2008

Bala

Copperbox revision 134.

Minor updates:

The LilyPond parser and pretty printer now handle more syntax, added an ascii art fretboard to AsciiGuitar.

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.