Saturday, June 30, 2012

wumpus-lite

Copperbox revision 2795.

Initial work on a new AFM parser.

This time round it doesn't seem necessary to define my own parser combinators - I did this for Wumpus-Basic as the platform shipped with Parsec 2 at the time. Now it ships with Parsec 3, I don't mind the dependency.

Friday, June 29, 2012

wumpus-lite

Copperbox revision 2794.

I've added the BoundingBox module from Wumpus-Core.

Thursday, June 28, 2012

lirio

Copperbox revision 2793.

I've added a demo that generates percussion notation. It uses an experimental way of simulating LilyPond's variable def and use that perhaps is not worth the trouble.

Wednesday, June 27, 2012

lirio

Copperbox revision 2792.

I've removed the parametric user state from the Score and note-list monads. Previously I'd thought this generality would be worthwhile to add bar numbering for example, but simplifying the type signatures seems a better plan.

Tuesday, June 26, 2012

lirio

Copperbox revision 2791.

Work towards implementing note list operations and marks like the \times command. This has meant some rethinking of the primitive doc code, which now use a more comprehensive naming scheme to avoid needing qualified import.


Monday, June 25, 2012

lirio

Copperbox revision 2790.

I've added a full set of pitch names and changed the naming scheme so that clashes with Haskell variables in user code are less likely.


Sunday, June 24, 2012

lirio

Copperbox revision 2789.

I've reworked the note lists to use more overloading and changed their internals so they wrap one of two primitive note lists - one for relative duration and the other for absolute duration. By wrapping one of these, note lists can get most of their type class instances from lifting the appropriate operations on the primitive note list, usually only NoteM and ChordM need implementing "longhand".

Quite a bit of code still needs tidying up...

Saturday, June 23, 2012

lirio

Copperbox revision 2788.

Initial work adding overloading for the "doc builder" primitives of note lists. Easy things like spacer and rest have been implemented, note and chord should be doable with type families (or fundeps).

Friday, June 22, 2012

lirio

Copperbox revision 2787.

I've added a directory Base for the primitive data types and functions. This makes the organization a bit more manageable before I look at type classes for the various note lists.

Thursday, June 21, 2012

lirio

Copperbox revision 2786.

Initial work on lyrics in the lyricmode style - i.e. syllables with duration annotations.

When I have more time, I'll have to look at overloading for the note list representations - I need quite a few different note list types and qualified imports aren't adequate.

Wednesday, June 20, 2012

lirio

Copperbox revision 2785.

I've simplified the internal Glyph / Doc type so everything supports suffixing (suffixing is necessary for beams and slurs). Whilst this means Lirio performs less checking - there is more opportunity to make bad syntax, the implementation is now more obvious. There is no longer a mystery about what is a note and what is a glyph.


Tuesday, June 19, 2012

lirio

Copperbox revision 2784.

I've defined the full set of drum pitch names and the short versions. Again this was rote work, so it was quite easy to keep the "a commit every day" momentum.


Monday, June 18, 2012

ochre

Copperbox revision 2783.

Work on signal IO opcodes. I've also done a small amount of work on making the phantom layer more polymorphic - though I'll have to postpone this until I can work on it at a weekend when I have more time. I've managed a commit a day over the last week, for the first time in ages; if I tackle something that needs "design" this will lose my momentum.

Sunday, June 17, 2012

ochre

Copperbox revision 2782.

I've started work on wrapping the signal input and output opcodes and added a top level shim module to make importing the phantom layer more convenient.

ochre

Copperbox revision 2781.

All the signal modifier opcodes are now wrapped in the phantom layer.

Saturday, June 16, 2012

ochre

Copperbox revision 2780.

I've added List to the type representation and made tuples heterogeneous so I can model Csound's C-style arg lists - the calling convention for Csound opcodes is like C but Ochre can now encodes variadic functions as lists. As nothing really uses source language types within Ochre (save temporary variable generation), having polymorphic lists and tuples doesn't add complexity.

Also I've made a start on signal modifiers.

Friday, June 15, 2012

ochre

Copperbox revision 2779.

I've completed the signal modifier opcodes and filled out the monomorphic tuple types in Phantom.Prim.

Thursday, June 14, 2012

ochre

Copperbox revision 2778.

I've solved yesterday's problem with typing Ints that represent table nums etc. by differentiating between initialization time Floats and Ints in the phantom type layer. I should have done this all along...

Wednesday, June 13, 2012

ochre

Copperbox revision 2777.

First round of work coding the signal modifier built-ins.

Another nit with the type system - I don't properly handle that Ints could be actually ints or variables / pfields representing ints. This is another bit where embedding in Haskell has allowed me to shirk some duty I have to developing a sound type system. If I had designed a closed DSL, I would have been forced to address this short-coming much sooner.

Tuesday, June 12, 2012

ochre

Copperbox revision 2776.

I've implemented the base opcodes - base is an arbitrary grouping that I happened to use for Ochre's predecessor Orchsyn, basically they are the Math opertations on pages 704 and 705 of the Csound book.

Implementing these opcodes has flagged up some problems in Ochre's type system. Ochre should really be monomorphic, though it is a bit tricksy as it doesn't have a type dictionary - opcodes can cheat and have different typings according to how they are used in the host language Haskell (as the embedding of Ochre borrows some of Haskell's polymorphism).

Ideally I should give opcodes concrete monomorphic types and probably recover Csound's limited polymorphism by duplicating opcodes for different types.

Monday, June 11, 2012

ochre

Copperbox revision 2775.

I've switched to the monadic phantom layer, removing the tagless phantom code. Also I've started adding "prim-ops" for the Csound built-in opcodes and functions.

Sunday, June 10, 2012

ochre

Copperbox revision 2774.

I've re-implemented the tagless phantom typed layer with a state monad instead. The types are much simpler, so I've included the all important Num and Fractional instances for signals.

The new monadic layer is in a style I've never used before - previously I've had code generators that could collect statements using a monoid so the user code would use the do-notation with a Writer as the underlying monad. Here the monad builds a single expression (usually nested) - the expression has no mempty or mappend so it is built with a library of combinators that model the syntax faithfully, user code does not use the do-notation.

ochre

Copperbox revision 2773.

I've added a tagless, phantom typed layer, but it is too complicated - I'll have to rethink and possibly use a monad instead.

Friday, June 8, 2012

ochre

Copperbox revision 2772.

I've renamed the cast constructors and made the ref type monomorphic - Ochre can now only have KSig and ASig refs (possibly global).

Thursday, June 7, 2012

ochre

Copperbox revision 2771.

I think I've designed a type system for Ochre. I struggled with this before ("my first type system") but really it is the same as designing a typed library, plus cribbing some type signatures from SML as I have effects (ref cells and output) within the language rather than stratified as monadic effects.

Revision 2770 forgot to add the new file Typing.hs which is the mock-up of type system in use.

Wednesday, June 6, 2012

swidgets

Copperbox revision 2769.

I've added metronome style tempo setting to the SWDisplayWords widget.

Tempo is important for this widget as it is supposed to animate counting patterns like "one-e-and-ah, two-e-and-ah".

Tuesday, June 5, 2012

swidgets

Copperbox revision 2768.

Surprising development - first Java commit to Copperbox... (swidgets = Stephen's widgets)

I've started developing the Processing GUI widgets a bit more seriously. It turns out that advanced "Processing" is actually Java - Processing (the environment / compiler, whatever...) has no concept of shared libraries written in Processing (the language) so you have to write libraries in Java. This isn't a huge difference - Processing (the language) seems to be Java less some bits and with other bits implicit to save typing.


Sunday, June 3, 2012

lirio

Copperbox revision 2767.

I've implemented an example that generates a full score (only two bars). The result is printable LilyPond.

Friday, June 1, 2012

lirio

Copperbox revision 2766.

More work on score pretty printers. Score now exports equivalents of the wl-pprint combinators (in monadic guise), ScoreDoc builds LilyPond syntax with them.

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.