Copperbox revision 276.
I've removed the the out-of-date code from the Abc and LilyPond parsers.
Also sorted out an error where the Abc 'template hole' parser (abcTextChunks) consumed the linefeed at the end of a meta-comment.
Wednesday, October 15, 2008
HNotate
Copperbox revision 275.
Apropos the last commit, I've rewritten the other parsers now as well. Again they are more idiomatic - they look like other Parsec parsers and don't carry around extra state.
The conversion to HOAS is now done after parsing - this means that the parsed syntax will be available for printing out (debugging). Because so much has been changed a lot of the debugging has been dropped but the useful stuff will be put back in soon. Also a few off the examples don't currently work.
Apropos the last commit, I've rewritten the other parsers now as well. Again they are more idiomatic - they look like other Parsec parsers and don't carry around extra state.
The conversion to HOAS is now done after parsing - this means that the parsed syntax will be available for printing out (debugging). Because so much has been changed a lot of the debugging has been dropped but the useful stuff will be put back in soon. Also a few off the examples don't currently work.
Tuesday, October 14, 2008
Sunday, October 12, 2008
HNotate
Copperbox revision 272.
Changes to the Ratio to Duration conversion functions.
The function approximateDuration should now always produce a result (which may be an approximation - hence its name). The function it replaced representableDuration wasn't guaranteed to.
However I now think that HNotate duration representation should simply be the library Rational type. Previously HNotate was a trying to be a library for building for building music (like PPrint is for Docs). When it was a library, I thought it was important to have a dot function that would add half a duration to a duration. With the current type dot is composable
dot $ dot quarter gives a double dotted quarter (7%16).
This isn't possible if I change to using Rational - dot $ dot quarter would be dot $ (3%8) = (9%16) for an obvious definition of dot.
I'll change to Rational on the next commit, the advantages are no expensive conversion routines just to perform Num functions and a properly debugged base type - but will I miss dot?
Changes to the Ratio to Duration conversion functions.
The function approximateDuration should now always produce a result (which may be an approximation - hence its name). The function it replaced representableDuration wasn't guaranteed to.
However I now think that HNotate duration representation should simply be the library Rational type. Previously HNotate was a trying to be a library for building for building music (like PPrint is for Docs). When it was a library, I thought it was important to have a dot function that would add half a duration to a duration. With the current type dot is composable
dot $ dot quarter gives a double dotted quarter (7%16).
This isn't possible if I change to using Rational - dot $ dot quarter would be dot $ (3%8) = (9%16) for an obvious definition of dot.
I'll change to Rational on the next commit, the advantages are no expensive conversion routines just to perform Num functions and a properly debugged base type - but will I miss dot?
HNotate
Copperbox revision 271.
Beaming has been re-implemented for Abc. After my two weeks practice with recursion schemes beam grouping can be done quite nicely with an unfold - if you unfold a list to a list you effectively have lookahead (just like pattern matching and direct recursion of course).
Bar splitting - to get metric subdivisions - is done with an apomorphism which makes it quite short though I can't say the code is very clear.
Beaming has been re-implemented for Abc. After my two weeks practice with recursion schemes beam grouping can be done quite nicely with an unfold - if you unfold a list to a list you effectively have lookahead (just like pattern matching and direct recursion of course).
Bar splitting - to get metric subdivisions - is done with an apomorphism which makes it quite short though I can't say the code is very clear.
Saturday, October 11, 2008
HNotate
Copperbox revision 270.
I've added a general mechanism to handle pitch renaming for Abc output. Pitch spellings for all the modes are handled, but supplementary accidentals are still to do.
Supplementary accidentals permit modes with sharps and flats like Klezmer (Ahavoh Rabboh).
I've added a general mechanism to handle pitch renaming for Abc output. Pitch spellings for all the modes are handled, but supplementary accidentals are still to do.
Supplementary accidentals permit modes with sharps and flats like Klezmer (Ahavoh Rabboh).
Subscribe to:
Posts (Atom)
Blog Archive
About Me
- Stephen Tetley
- 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.