Sunday, May 10, 2009

Mullein

Copperbox revision 589.

Work on getting LilyPond output from the Haskore example - ChildSong6.

This example is a lot more challenging for Mullein than Stars and Stripes Forever. Currently Mullein generates LilyPond with syntax errors - the bracketing code is putting grace notes inside beam groups which is a problem for LilyPond.

Saturday, May 9, 2009

Mullein

Copperbox revision 588.

Ssf.lhs now has rewrite rules that eliminate the trills. It now outputs "good" LilyPond.

Mullein

Copperbox revision 587.

Ssf.lhs - Stars and Stripes Forever, now uses the latest Haskore translation. The output still cannot be rendered by LilyPond unfortunately - I haven't written the string rewrite rules to change the duration of the trills.

Friday, May 8, 2009

Mullein

Copperbox revision 586.

Preliminary work on a new Haskore translation module. The previous translation builds a system (a finite map between instrument names and tunes) from the whole score then the system is queried for a tune which is further processed to turn it into LilyPond or ABC.

The new version avoids building a system and starts by extracting an instrument's tune. This should support a more of a pipeline approach where each step refines the tune.

Thursday, May 7, 2009

Mullein

Copperbox revision 585.

Work towards adding string rewriting to the Haskore conversion process.

Mullein

Copperbox revision 584.

Last week I got Mullein to print score for the examples in the Haskore distribution. Unfortunately the output was garbage - the LilyPond output looked more like a graphic score than conventional notation.

This is a problem due to Haskore representing durations as absolute times and scores doing arithmetic on them - this is correct for Midi where the duration of an appogiatura is taken from the next next note, but it doesn't work for LilyPond or Abc. Also I found that the metrical splitting code in Mullein isn't perfect - there is a bug somewhere that allows it to make empty beam groups.

I tried to get Mullein to reconstitute durations - its superficially easy to recognize trills and appogiatura in Haskore output. Unfortunately if you also want to consider triplets and n-plets then it becomes very difficult to recognize what an irregular duration might indicate. So that path got abandoned.

After a few false starts, I think I have a solution in string rewriting. If the notes are considered a list it is easy to traverse pairwise looking for combinations where an appogiatura is subtracted from its following note and rewrite them to be a grace and an note with regular duration. The actual implementation is more expressive as you can do traversal with arbitrary depth rather than just pairwise, so other transformations can be implemented. I've written the string rewriting implementation, but I haven't hooked it into the Haskore output yet.

This means that a Haskore score will need both a template doc to control the textual output to LilyPond and a set of rewrite rules to massage the score into something that is metrically digestible - this is quite a user burden. However, I really can't see a viable way of doing the metrical reconstitution automatically.

Friday, May 1, 2009

Mullein

Copperbox revision 583.

Working with more examples from the Haskore-vintage package. Neither NewResolutions or ChildSong6 will render, the first problem is that Mullein cannot handle combined durations (e.g. hn + en, half note plus eighth note). I'll have to extended the metrical splitting code to accommodate this.

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.