Thursday, April 30, 2009

Mullein

Copperbox revision 582.

Transposition is now interpreted when Mullein translates Haskore scores.

Mullein

Copperbox revision 581.

Work on another Haskore example - SelfSim. This one doesn't print well at the moment - it looks like I'll have to add handling for Haskore's Trans in the Mullein-Haskore interface and sort out printing unmetered music in Mullein.

Mullein

Copperbox revision 580.

I've fixed the bug in LilyPond relative octave output.

Mullein

Copperbox revision 579.

I've added LilyPond output code to the Ssf.lhs example from the Haskore-vintage package. Unfortunately there are two problems. Trills generate erroneous output, so I've had to comment them out. Also Mullein wrongly calculates relative pitch, so the score is printed a octave too high.

The second problem has taken more investigation than I would have expected. The only real progress so far is I've changed Mullein to have middle c at C5 to match Haskore. For usability it is no doubt wise for them both to match.

Wednesday, April 29, 2009

Mullein

Copperbox revision 578.

The Mullein interface to Haskore can now output LilyPond.

Mullein

Copperbox revision 577.

I've added a new module ABC that tidies up and simplifies the interface to Haskore for ABC generation. LilyPond generation will need a similar module, then I can check if overlays are actually working (the code for them is untested).

Mullein

Copperbox revision 576.

The code is very rough, but I've got ABC output from a Haskore score (i.e. an interpretation of the Music data type) rather than a performance (an interpretation of the Perfomance datatype).

HNotate only ever interpreted the Performance data type, which was problemmatic (though I can't quite remember why). Also I've decided not to try to reconstruct structure (e.g. chords) in the output. Chords should still be printed by virtue of their notes being over layed at the same time, but they won't be explicit in the generated score.

Mullein

Copperbox revision 575.

I've changed the LilyPond conversion code so it is more obvious how it handles converting to absolute or relative pitch. Relative pitch is now a Maybe type inside the conversion state - if the translation needs absolute pitch its value is nothing and the pitch rewrite function just returns its supplied value. If the translation needs relative pitch then the value will be Just something and the rewrite function can look inside the Just.

Mullein

Copperbox revision 574.

I've removed the code that was supposed to handle extended key signatures (e.g. klezmer keys with sharps and flats) as it didn't work properly.

Tuesday, April 28, 2009

Mullein

Copperbox revision 573.

I've improved LilyPond output of bars with repeats and barlines, with the help of some rather baroque unfolds.

Monday, April 27, 2009

Mullein

Copperbox revision 572.

I've made the output post-processing common to LilyPond and ABC so that the LilyPond output can render bars and repeats more effectively.

Currently the LilyPond post-processing is not satisfactory - I'll have to look at how the function printLine uses its accumulator.

Mullein

Copperbox revision 571.

More work on LilyPond output, though essentially this is a checkpoint commit as I'm going to have to rework the LilyPond rendering code to add bar lines.

Some of this work has been started the AbcFragment datatype have been generalized and moved to CoreTypes module (and renamed OutputFragment) so it can be used by both the ABC and LilyPond rendering modules.

Mullein

Copperbox revision 570.

More work on the ABC output pretty printers and a new module started for LilyPond pretty printers.

For both formats I'm only going for a small subset of output combinators - ABC really only needs fields and only a subset of the available ones. LilyPond needs quite a lot more, but it seems likely that the most appropriate way of generating all but the simplest LilyPond tune is to generate named melodies with Mullein and include them in a handwritten top level .ly file.

Sunday, April 26, 2009

Mullein

Copperbox revision 569.

Work on assembling ABC output into something renderable with abcm2ps.

This is essentially adding a layer of pretty print combinators to print tune number, key and meter fields. About this time last year, I wrote a lot of these pretty printers before I realized that ABC and LilyPond output would need internal processing (such as bracketing, relative pitch rewriting etc.), so I have a lot this work half-done already.

Mullein

Copperbox revision 568.

More work giving Mullein a Haskore-like API. This has had the benefit of improving the type classes that are used during conversion and rendering to ABC and LilyPond.

Saturday, April 25, 2009

Mullein

Copperbox revision 567.

As the last couple of days work on interfacing Haskore and Mullein wasn't satisfactory, I'm considering a different approach - make Mullein scores more like Haskore.

This has the obvious disadvantage that a composition in Haskore will need porting to Mullein, but the alternative where I try to reconstruct structure (such as chords) from Haskore to build a Mullein score programmatically seems like a dead-end.

Friday, April 24, 2009

Mullein

Copperbox revision 566.

Some more work on the Haskore interface, where I've tried to work from the Music type rather than the Performance type.

But... I'm not sure this is a valid direction. Haskore doesn't carry around information that is very useful for notation output. For instance, there is no representation of chords within Haskore's data structures - chord's are notes joined with the parallel combinator. I've tried to reconstruct chords by searching for notes with the same onset and duration, but the code to do this is very convoluted.

Thursday, April 23, 2009

Mullein

Copperbox revision 565.

First attempt at an interface to Haskore.

Wednesday, April 22, 2009

Mullein

Copperbox revision 564.

Some work on printing uncommon key signatures (e.g. signatures with both sharps and flats). However this work is not very good and incomplete - the implement has partial functions that throw errors (which is unsatisfactory as a general rule) and missing functionality. It might be better simply to provide a user hook so that someone wanting an unusual key signature can simply supply it as literal LilyPond snippet.

Tuesday, April 21, 2009

Mullein

Copperbox revision 563.

I've implemented chord and grace notes output - they had been stubbed for a long time. Plus quite a bit of tidying up with this commit.

Mullein

Copperbox revision 562.

I've removed the stateful shorthand from all the examples.

Mullein

Copperbox revision 561.

The stateful shorthand that I've been using to build note lists (i.e. having a unit note length) stopped seeming useful - I expect Mullein's real utility to be programmatically generating note lists, and the stateful shorthand seemed to complicate things.

I've removed the shorthand from note lists, I'll have to look at removing the rest of it in building phrases and motifs.

Mullein

Copperbox revision 560.

Mullein can now produce LilyPond percussion output - example Drums.hs.

The type classes to do this are rather hackish and will change shortly.

Mullein

Copperbox revision 559.

Some work towards accommodating LilyPond percussion notation.

With yesterdays commits where I had decided that adding different notations (e.g. LilyPond percussion) was going to be easier by generalizing pitch (an attribute of note) rather than generalizing elements (notes, rests, chords). This commit changes some type classes to focus on pitch rather than elements.

Monday, April 20, 2009

Mullein

Copperbox revision 558.

With the previous commit, the type names were pretty chaotic but I wanted to commit that version to checkpoint the changes. I've tidied up the type names in this revision.

Mullein

Copperbox revision 557.

I've changed the parameter in the score data types to make Pitch the hole rather than Element - Pitch is an attribute of Element, Element constructors include Note, Rest etc.

This simplifies things if I want to do LilyPond percussion notation for example. Percussion has the same elements (notes, rest, and chords - where chords are just different drums played simultaneously), but percussion pitches have the names of drums rather than regular pitch names like c4 (c in octave 4).

Sunday, April 19, 2009

Mullein

Copperbox revision 556.

I've added a cabal file. This is so I can build Haddock docs easily, although Mullein seems to be going well I don't think release is imminent.

Mullein

Copperbox revision 555.

Scores are now built with monadic syntax. This allows different motifs to share properties (e.g key and meter) that they inherit from their parent tune.

On a positive note, although the code needs some polishing, Mullein is capable of generating good quality Abc (that's to say output that looks like it might have been hand written), whilst having a fairly simple implementation and a comprehensible interface. This is a significant improvement on HNotate where the code quickly sky-rocketed into ultra-complexity.

Mullein's main deficit is it cannot generate exotic LilyPond (percussion notation, plain song) that HNotate can.

Mullein

Copperbox revision 554.

Minor changes where the RS monad is used. I'm looking to build more of the input than just note lists within a monad (so properties such as key and meter can be inherited from the environment), this commit is the first step to changing the interface.

Saturday, April 18, 2009

Mullein

Copperbox revision 553.

Better handling of line continuations in Abc output.

Repeats and mid tune fields should now be output following Abc conventions i.e mid tune fields on a separate line, but with line continuations when appropriate.

Mullein

Copperbox revision 552.

LilyPond output is now monadic as well.

Mullein

Copperbox revision 551.

I've changed the Abc output code to use a monad. This is so it can handle key and meter changes (though this is not yet implemented).

Also I've deleted the HNotate2 and HNotate3 branches as all the work is now going into Mullein.

Friday, April 17, 2009

Mullein

Copperbox revision 550.

Test code for LabelSet which it fails. It also indicated to me that makeLabelSet function is partial and should be wrapped in a Maybe.

Mullein

Copperbox revision 549.

I've put the label set code into its own module.

Thursday, April 16, 2009

Mullein

Copperbox revision 548.

Mullein no longer uses uuag. I've re-implemented the translations to Abc and LilyPond and the pretty printers directly in Haskell. This should make managing the syntax trees easier.

Mullein

Copperbox revision 547.

I've removed some old code from the Pitch and Duration modules. Both these modules came from Bala where the aim was to be more exhaustive.

Wednesday, April 15, 2009

Mullein

Copperbox revision 546.

Initial support for organizing motifs - sequencing them, repeated motifs. I can't handle key changes at the moment so the implementation will change in due course.

Mullein

Copperbox revision 545.

Time signatures are now cached with the Motif data type. Motif's need time signature and meter pattern when the are constructed from note lists. It makes sense to store the time signature in the data type so it can be used later for printing.

Tuesday, April 14, 2009

Mullein

Copperbox revision 544.

Work on overlays. Overlays are now implemented in the Bracket module, and there is better syntax (i.e. functions in the notelist DSL) to construct them.

Mullein

Copperbox revision 543.

Mullein's main code now uses the note list shorthand from the last commit.

Five hundred posts to vsf & code, it would certainly be nice to have something more substantial to show for it. The only released code is the OpenVG binding which was fairly mechanical to produce. HNotate / Mullein really has been a difficult, dispiriting project. Some of the others I'd like to pick up again after this round of work on Mullein (bitmaps and HMinCaml). I can't see myself working on the font stuff again, though.

Mullein

Copperbox revision 542.

An experiment with a different input notation for notes.

Monday, April 13, 2009

Mullein

Copperbox revision 541.

Name changes to the metrical types.

Sunday, April 12, 2009

Mullein

Copperbox revision 540.

More work on LilyPond and zipping overlays.

Unlike Haskore (and earlier attempts in HNotate), Mullein doesn't have a direct parallel operator e.g. :+:. Instead sections (groups of notes of one or more bars) are specified separately then zipped together to make overlays.

Saturday, April 11, 2009

Mullein

Copperbox revision 539.

More work on Mullein - the LilyPond pretty printer now emits notes.

Mullein

Copperbox revision 538.

More work on the attribute grammars for Mullein. There are now modules for converting to and outputing LilyPond though both are some way off being useful.

Friday, April 10, 2009

Mullein

Copperbox revision 537.

I've switched to uuag for output, as it makes (mostly) top down traversal pretty comprehensible. Along side this I've also made the data types for bars etc. much more literal.

Thursday, April 9, 2009

Mullein

Copperbox revision 536.

Minor updates to Mullein as I work towards enabling ABC rendering.

Wednesday, April 8, 2009

NHotate / Mullein

Copperbox revision 535.

Yet another variant of HNotate.

I've had second thoughts about the stateful document combinators that the recent HNotate variants were using. Particularly, they get rid of type safety making composition somewhat unsafe. Mullein is another HNotate version that aims for a more typeful style.

Tuesday, April 7, 2009

HNotate

Copperbox revision 534.

Prototype implementation of repeats in ABC output.

The 'structural layer' above note lists might be conveniently implemented as functions, rather a manipulatable data type. In this revision repeated is just a function that encloses its body with the ABC repeat marks |: and :|.

HNotate

Copperbox revision 533.

(Stateful) Document construction is now done with a state monad rather than CPS plus state. This is probably more idiomatic and the code is slightly shorter.

Documents have to be stateful as they represent not just the document being constructed by also the evaluation context in which note lists are rendered.

HNotate

Copperbox revision 532.

Working on a structural layer above note lists - this would allow repeated sections, for example.

Monday, April 6, 2009

HNotate

Copperbox revision 531.

I spent the weekend going down blind alleys working on taming overlays in HNotate branch 3. This commit is hopefully the first step away from them and towards a useful simplification of overlays.

Friday, April 3, 2009

HNotate

Copperbox revision 530.

I've now forked HNotate2 to make HNotate3 (HNotate2 was a fork itself).

HNotate3 is a experiment to see if it is useful to get rid of parallelism - in HNotate this is the poly combinator which corresponds to Haskore's :=: operator.

Thursday, April 2, 2009

HNotate

Copperbox revision 529.

HNotate2 branch - a bit of tidying up now that something is working again.

HNotate

Copperbox revision 528.

Abc generation now works for the HNotate2 branch with a new simple interface. I've added the usual Bulgarian 6 example, which is described by this:


bulgarian6 :: AbcOutput
bulgarian6 = tune $ tune_number 1
<$> title "Bulgarian (?) 6"
<$> composer "Unknown"
<$> key a_major
<$> meter 2 4
<$> current (stdInterp bars1_4)


bars1_4 is the usual note list.

HNotate

Copperbox revision 527.

Abc output is possible again, though the interface to do so is unfriendly.

HNotate

Copperbox revision 526.

Added a translation to AbcForm which respells pitches according to the scale and changes duration according to the unit not length.

Wednesday, April 1, 2009

HNotate

Copperbox revision 525.

Trees (note lists with parallelism - for instance bass melodies) can now be flatten to a linear sequence of possibly overlayed bars. This is the ABC way of handling parallel melodies.

HNotate

Copperbox revision 524.

All the new metrical code is now integrated into the HNotate2 branch.

HNotate

Copperbox revision 523.

Metrical splitting for bars and beam grouping are now integrated in HNotate2 - the current branch of HNotate.

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.