Copperbox revision 3147.
I've integrated the Lexer into the Parser. With the current design, this means the Parser no longer needs to be a monad. Whilst this simplifies the design I think there might still be reasons to turn Parser back into a monad (vis dropping fields, or using a different separator to comma). Certainly the organization / naming of the modules is likely to change.
Tuesday, May 20, 2014
zcsv
Copperbox revisions 3145 and 3146.
Initial work on a lexer that should be able to decode fields during parsing (rather than parsing to a string and using read [1]). The lexer is a "standard" two continuation parser monad, but it is quite stripped down (no source position tracking, no error messages) so hopefully it should be quite fast.
Currently the lexer isn't hooked up to the main CSV parser.
[1] Because strings are expected to be short, it's moot whether it will turn out to be faster than read. However, read is specialized to Haskell values so it still seems worthwhile to have my own implementation.
Initial work on a lexer that should be able to decode fields during parsing (rather than parsing to a string and using read [1]). The lexer is a "standard" two continuation parser monad, but it is quite stripped down (no source position tracking, no error messages) so hopefully it should be quite fast.
Currently the lexer isn't hooked up to the main CSV parser.
[1] Because strings are expected to be short, it's moot whether it will turn out to be faster than read. However, read is specialized to Haskell values so it still seems worthwhile to have my own implementation.
Sunday, May 18, 2014
zcsv
Copperbox revision 3144.
I'm writing a small library to read CSV files. While Cassava is a fine library, I'm not so keen on its API; so I'm having a go at a CSV library myself.
At the moment it doesn't handle escape characters which prevents it from being any way useful but I think I'm happy with the API.
I'm writing a small library to read CSV files. While Cassava is a fine library, I'm not so keen on its API; so I'm having a go at a CSV library myself.
At the moment it doesn't handle escape characters which prevents it from being any way useful but I think I'm happy with the API.
Wednesday, May 14, 2014
orca-ix
Copperbox revision 3143.
This is a prototype looking at Yahama style digital synthesizers - Yamaha synthesizers like the DX7 had sets of algorithms (specific wiring configurations of the synthesizer units) and an interface to modify the signals going in and out of the units (enveloping them, changing their amplitude, etc).
This is a prototype looking at Yahama style digital synthesizers - Yamaha synthesizers like the DX7 had sets of algorithms (specific wiring configurations of the synthesizer units) and an interface to modify the signals going in and out of the units (enveloping them, changing their amplitude, etc).
Tuesday, May 13, 2014
majalan
Copperbox revision 3142.
I've changed Base.NoteList to use Seconds for tellNote and advanceCursor rather than Beat which is interpreted wrt. the context. Using Seconds makes for a more flexible API.
Also I've added a simple module of symbolic duration names to Majalan.Symbolic.
I've changed Base.NoteList to use Seconds for tellNote and advanceCursor rather than Beat which is interpreted wrt. the context. Using Seconds makes for a more flexible API.
Also I've added a simple module of symbolic duration names to Majalan.Symbolic.
Monday, May 12, 2014
majalan
Copperbox revision 3141.
Initial work on a more expressive note list - so far this one has notes, chords and rests.
I've also modified the first two demos - they were playing the Csound instrument wgbowedbar at a pitch outside its natural range. For what its worth, wgbowedbar is very sensitive to amplitude and should only be played with a near maximum amplitude (0.9 or higher if the orchestra uses 0dbfs, 32000 or so otherwise)
Initial work on a more expressive note list - so far this one has notes, chords and rests.
I've also modified the first two demos - they were playing the Csound instrument wgbowedbar at a pitch outside its natural range. For what its worth, wgbowedbar is very sensitive to amplitude and should only be played with a near maximum amplitude (0.9 or higher if the orchestra uses 0dbfs, 32000 or so otherwise)
Sunday, May 11, 2014
majalan
Copperbox revisions 3137, 3138, 3139, 3140.
I've reorganized the module hierarchy for Majalan:
Majalan.EventList is now Majalan.Base, Manjalan.NoteList is now Majalan.Symbolic.
Initially I tried to do this with one Subversion commit but I borked my repository, so I did it with four piecemeal commits. Horrible I know, one of these days I'll have to learn Subversion (or move to Git like everyone else).
I've reorganized the module hierarchy for Majalan:
Majalan.EventList is now Majalan.Base, Manjalan.NoteList is now Majalan.Symbolic.
Initially I tried to do this with one Subversion commit but I borked my repository, so I did it with four piecemeal commits. Horrible I know, one of these days I'll have to learn Subversion (or move to Git like everyone else).
majalan
Copperbox revision 3136.
I've moved the Majalan.NoteList.NoteList module to Majalan.EventList.NoteList and moved Majalan.EventList.Internal.Context to Majalan.EventList.Context.
These are better positions for these modules although Majalan.EventList is now misnamed - it should probably be called Majalan.Base or something like that.
I've moved the Majalan.NoteList.NoteList module to Majalan.EventList.NoteList and moved Majalan.EventList.Internal.Context to Majalan.EventList.Context.
These are better positions for these modules although Majalan.EventList is now misnamed - it should probably be called Majalan.Base or something like that.
majalan
Copperbox revisions 3134 and 3135.
I've fixed the bug in the accumulator for Events - it was the famous mempty bug for Hughes Lists / DLists. mempty for Hughes lists is id whereas the predefined mempty for functions is const mempty.
Demo02 which uses symbolic note lists is now working again.
Revision 3135 adds changes that should have gone in with 3134 but I forgot to copy the relevant file.
I've fixed the bug in the accumulator for Events - it was the famous mempty bug for Hughes Lists / DLists. mempty for Hughes lists is id whereas the predefined mempty for functions is const mempty.
Demo02 which uses symbolic note lists is now working again.
Revision 3135 adds changes that should have gone in with 3134 but I forgot to copy the relevant file.
majalan
Copperbox revision 3133.
Second round of simplifications.
I've removed JoinList as I can now make do with just a Hughes List. Additionally I've simplified building ImpulseMaps. Together with the last commit these are all the simplifications I was expecting, I've now got to re-implement symbolic note-lists which are currently broken. Plus I've got to find a bug introduced here, where events are being lost when event lists are lifted to scores.
Second round of simplifications.
I've removed JoinList as I can now make do with just a Hughes List. Additionally I've simplified building ImpulseMaps. Together with the last commit these are all the simplifications I was expecting, I've now got to re-implement symbolic note-lists which are currently broken. Plus I've got to find a bug introduced here, where events are being lost when event lists are lifted to scores.
Saturday, May 10, 2014
majalan
Copperbox revision 3132.
This is the first round of simplification permitted by changes to the Score object. I've removed both the ScoreTree data type and module (concat is no longer needed for scores) and the monoidal time span - MTimeSpan. Time spans are now always instantiated at known positions (although they might have a duration of zero) so we don't need to represent mempty.
This is the first round of simplification permitted by changes to the Score object. I've removed both the ScoreTree data type and module (concat is no longer needed for scores) and the monoidal time span - MTimeSpan. Time spans are now always instantiated at known positions (although they might have a duration of zero) so we don't need to represent mempty.
majalan
Copperbox revision 3131.
I've had a major rethink of the Score object. Rather than make it compositional (as per Doc in a pretty print library that supports horizontal and vertical concat), I've made it a finite map of systems. A score is now built by adding (elementary) systems to it - Score is expected to be a singleton within a program.
This greatly simplifies the design of the Score object. It also reduces conceptual overlap between Score and EventList which previously had similar concatenation operations [*]. Now only EventList will have concatenation.
The simplifications to Score should ripple out and lead to simplifications in the rest of the code.
[*] but confusingly different in the details...
I've had a major rethink of the Score object. Rather than make it compositional (as per Doc in a pretty print library that supports horizontal and vertical concat), I've made it a finite map of systems. A score is now built by adding (elementary) systems to it - Score is expected to be a singleton within a program.
This greatly simplifies the design of the Score object. It also reduces conceptual overlap between Score and EventList which previously had similar concatenation operations [*]. Now only EventList will have concatenation.
The simplifications to Score should ripple out and lead to simplifications in the rest of the code.
[*] but confusingly different in the details...
Thursday, May 8, 2014
majalan
Copperbox revision 3130.
I've added Context (bpm, tuning frequency...) to the Score object. This is so a score with various note lists can take the same context to evaluate them rather than use the same context at every call to evalNoteList, although I haven't yet changed to API to take advantage of this.
I haven't rushed to change the API because the module hierarchy isn't looking right any more. Improving the latter is pencilled in as the work for the weekend.
I've added Context (bpm, tuning frequency...) to the Score object. This is so a score with various note lists can take the same context to evaluate them rather than use the same context at every call to evalNoteList, although I haven't yet changed to API to take advantage of this.
I haven't rushed to change the API because the module hierarchy isn't looking right any more. Improving the latter is pencilled in as the work for the weekend.
Wednesday, May 7, 2014
majalan
Copperbox revision 3129.
I've made a rough implementation of a Note List with a "symbolic" Note type. Note-lists in this formulation are meant to resemble strings in PostScript and their evaluation with the show command (in Majalan phrase is the analogue of show).
In this formulation, retrograde transformation is simply applying reverse to the note-list / phrase.
I've made a rough implementation of a Note List with a "symbolic" Note type. Note-lists in this formulation are meant to resemble strings in PostScript and their evaluation with the show command (in Majalan phrase is the analogue of show).
In this formulation, retrograde transformation is simply applying reverse to the note-list / phrase.
Monday, May 5, 2014
majalan
Copperbox revision 3128.
Some work on NoteList - the main addition is "musically useful" horizontal concatenation. That is, the concatenation is in respect to the symbolic lengths of the phrases (length in beats) so it works sensibly vis staccato or sostenueto notes.
Some work on NoteList - the main addition is "musically useful" horizontal concatenation. That is, the concatenation is in respect to the symbolic lengths of the phrases (length in beats) so it works sensibly vis staccato or sostenueto notes.
Sunday, May 4, 2014
Saturday, May 3, 2014
majalan
Copperbox revision 3124.
I've worked up the Score and EventList structures - I think they now have most of the functionality they need in place.
Hopefully there are some simplifications of the code that I can exercise, some of internal stuff brought in when I forked mainline Majalan might not be necessary.
I've worked up the Score and EventList structures - I think they now have most of the functionality they need in place.
Hopefully there are some simplifications of the code that I can exercise, some of internal stuff brought in when I forked mainline Majalan might not be necessary.
Thursday, May 1, 2014
majalan
Copperbox revision 3123.
Work on a Score object that interprets note-lists and allows some concatenation.
Due to simplifications in majalan3 the Score object has a very simplistic notion of horizontal concatenation that might not be musically useful (as it doesn't account for symbolic note lengths vis staccato and legato notes), higher level "note lists" are obliged to define horizontal concatenation for themselves.
Work on a Score object that interprets note-lists and allows some concatenation.
Due to simplifications in majalan3 the Score object has a very simplistic notion of horizontal concatenation that might not be musically useful (as it doesn't account for symbolic note lengths vis staccato and legato notes), higher level "note lists" are obliged to define horizontal concatenation for themselves.
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.