Copperbox revision 2901.
I've made the parser error tolerant when it is out-of-step with Running Status data - yesterday it was throwing a fatal error at this point in the code. Some of the code has been tidied up, although the documentation needs improvement before it is released on Hackage.
Friday, November 30, 2012
Thursday, November 29, 2012
zmidi-core
Copperbox revision 2900.
Running Status support now appears to be implemented - a pattern match case that throws an error needs improving and the code needs proper testing.
Running Status support now appears to be implemented - a pattern match case that throws an error needs improving and the code needs proper testing.
Wednesday, November 28, 2012
zmidi-core
Copperbox revision 2899.
Initial work on supporting Running Status. This is mostly pertinent to the parser, though the syntax and writer have been modified. The parser doesn't work at the moment...
Initial work on supporting Running Status. This is mostly pertinent to the parser, though the syntax and writer have been modified. The parser doesn't work at the moment...
Tuesday, November 27, 2012
zmidi-core
Copperbox revision 2898.
I've added a hack to the pretty printer than stops high ASCII chars (164 and above) causing a runtime error when trying to print them to stdout. The hack simply rewrites the string changing chars greater than 163 to #.
I've added a hack to the pretty printer than stops high ASCII chars (164 and above) causing a runtime error when trying to print them to stdout. The hack simply rewrites the string changing chars greater than 163 to #.
Monday, November 26, 2012
ochre
Copperbox revisions 2896 and 2897.
I've changed the module hierarchy - the Phantom folder is now called Language. This is a more neutral name so code for building orchestras (which makes no use of phantom types) can go alongside the code for building instruments (which does use phantom types).
I've changed the module hierarchy - the Phantom folder is now called Language. This is a more neutral name so code for building orchestras (which makes no use of phantom types) can go alongside the code for building instruments (which does use phantom types).
Sunday, November 25, 2012
Saturday, November 24, 2012
ochre and om-shell
Copperbox revision 2893.
I've added functions in the style of the vector-space library to "scalar multiply" a signal by and I-rate constant (or add an I-rate constant, or divide by one). Using these new operators has increase the succinctness of the FM gong instrument.
I've added functions in the style of the vector-space library to "scalar multiply" a signal by and I-rate constant (or add an I-rate constant, or divide by one). Using these new operators has increase the succinctness of the FM gong instrument.
Friday, November 23, 2012
Thursday, November 22, 2012
Wednesday, November 21, 2012
Tuesday, November 20, 2012
Monday, November 19, 2012
ochre and om-shell
Copperbox revision 2888.
I've changed the letSig family of functions to lower case letsig. This is entirely cosmetic but having camel case keywords in the the embedded language seemed horrible when I thought about it. updateSig will need changing too, but I'm stuck for a better name...
I've changed the letSig family of functions to lower case letsig. This is entirely cosmetic but having camel case keywords in the the embedded language seemed horrible when I thought about it. updateSig will need changing too, but I'm stuck for a better name...
Sunday, November 18, 2012
new release - zmidi-core-0.5.0
Copperbox revision 2887.
I've made a new release of zmidi-core for Hackage. This improves the Haddock documentation, an reorders the constructors of the MidiVoiceEvent constructors so the follow the order of the tag bit in binary MIDI files.
I've made a new release of zmidi-core for Hackage. This improves the Haddock documentation, an reorders the constructors of the MidiVoiceEvent constructors so the follow the order of the tag bit in binary MIDI files.
zmidi-core
Copperbox revision 2886.
I've improved the Haddock docs for zmidi-core - when I last built them all modules reported 100% doc coverage.
I've improved the Haddock docs for zmidi-core - when I last built them all modules reported 100% doc coverage.
Saturday, November 17, 2012
zmidi-core
Copperbox revision 2885.
Work on improving the parser.
Some of the changes are a bit gratuitous so I will have to test them tomorrow, but they do make the code cleaner and they make it clear that MidiVoiceEvent, MidiSysCommonEvent and MidiSysRealTimeEvent don't need fallback constructors. MidiMetaEvent needs a fallback constructor (MetaOther) as not all possible meta events are enumerated; but MidiVoiceEvent etc. are fully enumerated - if the parser has a pattern match failure for these productions it means that the code is wrong elsewhere.
Work on improving the parser.
Some of the changes are a bit gratuitous so I will have to test them tomorrow, but they do make the code cleaner and they make it clear that MidiVoiceEvent, MidiSysCommonEvent and MidiSysRealTimeEvent don't need fallback constructors. MidiMetaEvent needs a fallback constructor (MetaOther) as not all possible meta events are enumerated; but MidiVoiceEvent etc. are fully enumerated - if the parser has a pattern match failure for these productions it means that the code is wrong elsewhere.
Wednesday, November 14, 2012
new release - zmidi-core-0.4.0
Copperbox revision 2884.
I've put a new release of zmidi-core on Hackage - version 0.4.0.
This has better handling of "unrecognised" Meta events in the parser, plus a new Meta Event MidiPort. I think VoiceEvent should probably have a similar "unrecognised" catch all constructor so there might be another release at the weekend.
I've put a new release of zmidi-core on Hackage - version 0.4.0.
This has better handling of "unrecognised" Meta events in the parser, plus a new Meta Event MidiPort. I think VoiceEvent should probably have a similar "unrecognised" catch all constructor so there might be another release at the weekend.
Tuesday, November 13, 2012
zmidi-core
Copperbox revision 2882.
I've reactivated zmidi-core to look at the robustness of the parser. Currently it throws errors in some places where it could easily recover. It would be nice if MIDI event "packets" carried their length "on the outside" - this would make it easy to tolerate errors (chunk the input as per size, parse the chucks, flag up what fails to parse); unfortunately packet size is dependent on knowing something about the event so I doubt I can make the current parser fully tolerant.
Copperbox revision 2883.
Added MidiPort meta event.
I've reactivated zmidi-core to look at the robustness of the parser. Currently it throws errors in some places where it could easily recover. It would be nice if MIDI event "packets" carried their length "on the outside" - this would make it easy to tolerate errors (chunk the input as per size, parse the chucks, flag up what fails to parse); unfortunately packet size is dependent on knowing something about the event so I doubt I can make the current parser fully tolerant.
Copperbox revision 2883.
Added MidiPort meta event.
Monday, November 12, 2012
om-shell and ochre
Copperbox revision 2881.
The FM gong example now works. It has signal update (reusing variables), envelopes and I-rate declarations - so this is quite an advance.
The FM gong example now works. It has signal update (reusing variables), envelopes and I-rate declarations - so this is quite an advance.
Sunday, November 11, 2012
ochre
Copperbox revision 2880.
I've implemented "top level" I-rate variable declaration to instruments. The syntax for this was added last week, but I forgot to implement it in the builder code. I've also started to look at encapsulating "envelopes" in a separate type, though this half-baked at the moment.
I've implemented "top level" I-rate variable declaration to instruments. The syntax for this was added last week, but I forgot to implement it in the builder code. I've also started to look at encapsulating "envelopes" in a separate type, though this half-baked at the moment.
Saturday, November 10, 2012
ochre
Copperbox revision 2878.
I've implemented safer casting for signals - signals can only be upsampled rather than downsampled. New shorthand operators for casting combination of signals (addition, multiplication...) have been added to alleviate some of the syntactic burden of typing signals with their rates (audio, control, init).
I've implemented safer casting for signals - signals can only be upsampled rather than downsampled. New shorthand operators for casting combination of signals (addition, multiplication...) have been added to alleviate some of the syntactic burden of typing signals with their rates (audio, control, init).
Wednesday, November 7, 2012
ochre
Copperbox revision 2877.
I've renamed PExpr to InstCode and removed the synonym M. This is to remove the emphasis that instrument bodies are expressions and to stop the association where effectful code was monad-like. As InstCode is not a functor let alone a monad, it seemed a bad idea to pun between monads and effects.
I've renamed PExpr to InstCode and removed the synonym M. This is to remove the emphasis that instrument bodies are expressions and to stop the association where effectful code was monad-like. As InstCode is not a functor let alone a monad, it seemed a bad idea to pun between monads and effects.
Tuesday, November 6, 2012
Monday, November 5, 2012
ochre
Copperbox revision 2875.
I've started simplifying the phantom type layer. Initially I'm making PValue simpler as it shouldn't need variable supply. When I've checked this I'll go back and look at the naming schemes.
Currently the DemoMon example doesn't compile - changing the phantom types cascades changes to dozens of opcode wrappers, which are outstanding.
I've started simplifying the phantom type layer. Initially I'm making PValue simpler as it shouldn't need variable supply. When I've checked this I'll go back and look at the naming schemes.
Currently the DemoMon example doesn't compile - changing the phantom types cascades changes to dozens of opcode wrappers, which are outstanding.
ochre
Copperbox revision 2874.
I've renamed the compiler monad from Mon to Compiler. This is a prelude to changing the phantom type layer where I may want a monad (if I do Mon will be a good name). I don't think values need name supply in the phantom layer, if so then I should be able to simplify it quite a bit.
I've renamed the compiler monad from Mon to Compiler. This is a prelude to changing the phantom type layer where I may want a monad (if I do Mon will be a good name). I don't think values need name supply in the phantom layer, if so then I should be able to simplify it quite a bit.
Sunday, November 4, 2012
ochre
Copperbox revision 2873.
I've added signal update and immutable top-level declarations that can't be let-eliminated or constant folded. The former allows the Csound optimization of minimizing variable declarations, the latter allows more readable generated code as i-rate declarations can be preserved.
Both implementations are hacks as I envisaged implementing them differently when I started designing Ochre. I'll probably have to rethink the Phantom layer somewhat as Signals now have a specific meaning to Ochre which the old code in the Phantom layer doesn't properly respect.
I've added signal update and immutable top-level declarations that can't be let-eliminated or constant folded. The former allows the Csound optimization of minimizing variable declarations, the latter allows more readable generated code as i-rate declarations can be preserved.
Both implementations are hacks as I envisaged implementing them differently when I started designing Ochre. I'll probably have to rethink the Phantom layer somewhat as Signals now have a specific meaning to Ochre which the old code in the Phantom layer doesn't properly respect.
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.