Copperbox revision 582.
Transposition is now interpreted when Mullein translates Haskore scores.
Thursday, April 30, 2009
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.
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 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).
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.
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.
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.
Tuesday, April 28, 2009
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.
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.
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.
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.
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.
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.
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.
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
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.
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 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.
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 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.
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 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).
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 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.
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.
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
Friday, April 17, 2009
Thursday, April 16, 2009
Wednesday, April 15, 2009
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.
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 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'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.
Monday, April 13, 2009
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.
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
Friday, April 10, 2009
Thursday, April 9, 2009
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.
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 :|.
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.
(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.
Monday, April 6, 2009
Friday, April 3, 2009
Thursday, April 2, 2009
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:
bars1_4 is the usual note list.
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.
Wednesday, April 1, 2009
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2009
(651)
-
▼
April
(60)
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- Mullein
- NHotate / Mullein
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
- HNotate
-
▼
April
(60)
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.