Wednesday, June 30, 2010

wumpus-microprint

Copperbox revision 1469.

Microprint is now working for simple drawings.

wumpus-microprint

Copperbox revision 1468.

I've started an new (hopefully small) project to draw "microprints" of text - microprints are pictures of text where the formatting is preserved but the actual characters are greeked to coloured rectangles.

The intention is to hook it up with the Cabal file code in Precis to print microprints of Haskell projects.

Tuesday, June 29, 2010

precis-0.5.0

Copperbox revision 1467.

A new release of Precis, although this version isn't a compelling improvement on version 0.4.0 and it is very much an interim release as the next version is likely to introduce substantial changes.

On balance though, I think it is worth releasing this one.

Precis

Copperbox revision 1466.

Main.hs is back working at last - the new resolve code is finally doing its job correctly.

Version 0.5.0 is now functionally equivalent to version 0.4.0.

Monday, June 28, 2010

Precis

Copperbox revision 1465.

All the reporting code is now re-integrated and all the undefined's have been removed, so Precis is now functionally equivalent to version 0.4.0. The new module resolving code isn't working though...

Precis

Copperbox revision 1464.

Work integrating the new resolving code... Currently the FilePath building is wrong.

Precis

Copperbox revision 1463.

The Haddock docs build again for Precis...

Hopefully this is the last serious change to the module / file path resolving, and I can start adding back the functionality that is currently stubbed out.

Sunday, June 27, 2010

Precis

Copperbox revision 1462.

I've started a new scheme to resolve the module files described by a package. As in Precis 0.4.0, modules will be resolved before the "Package" data type is delivered to the API client.

Towards this end, I've split the data types into two modules to represent final and interim types and I've started work adapting the ResolveM monad to accumulate resolved modules as the cabal file is processed.

Precis

Copperbox revision 1461.

More work extracting module lists from Cabal files. The new CabalPrecis datatype is now looking inadequate for the task though. A client using the Precis.Cabal modules has to do an awful lot of post-processing to get a list of private and public modules. Although the old datatype from version 0.4.0 had problems - the construction code in the presence of conditions wasn't right - it's starting to look a better choice than the current revision.

Saturday, June 26, 2010

Precis

Copperbox revision 1460.

More work extracting the module list from the cabal file. Although I don't represent it in my datatypes, I think I'm more respectful of the condition tree now (the code isn't tested yet).

Before I was simply flattening the condition tree, now I'm checking for duplicates and extracting files with regard to a local set of source paths and not a global set.

Friday, June 25, 2010

Precis

Copperbox revision 1459.

More work resolving module file paths.

Precis

Copperbox revision 1458.

I've improved the data types for summarizing Cabal files, and made their extraction from the GenericPackageDescription type simpler.

I still need to consider how modules are determined from the CondTree/Condition structure - Cabal lets modules exist multiple times it seems.

Thursday, June 24, 2010

Precis

Copperbox revision 1457.

I've made a major re-organization of the directory structure, so that the modules that will hopefully soon be generally useful (i.e. the ones that work with Cabal files) are distinguished.

I've also started changing a lot of the types that were previously aliases to concrete but opaque types. As a number of these types represented file paths or fragments of file paths, I want to keep track of them more effectively e.g. whether or not the path is separated, normalized...

Wednesday, June 23, 2010

Precis

Copperbox revision 1456.

Work on Precis. This set of changes is not an improvement, as quite a lot of code is now broken that worked before. Ideally I should have made a fork of the code, but as I'm the only person working on it, it's more convenient not to.

Tuesday, June 22, 2010

Precis

Copperbox revision 1455.

I'm looking at Precis again, with the aim of turning the base code into a viable library for working with Cabal files.

Initially, I've added qualified imports for where code is imported from the Cabal / Distribution library. This was because I couldn't keep track of which were my own functions / types and which were Cabal's. Also a lot of the code is of very rough quality so I'll have to look at doing something about that.

Furthermore, some of the modules won't be generally useful, so I'll have to change the module name-space a bit to separate the general modules from Precis specific ones.

neume-extra

Copperbox revision 1454.

I've updated neume-extra so that it works with the latest neume-core.

neume-core

Copperbox revision 1453.

I've moved a couple of functions from neume-extra to neume-core and added some Haddock docs to Core.Pitch.

Neume-core is now out-of-step with neume-extra and might be for the next few revisions. The last good version where they were instep and all the examples worked was 1452.

Monday, June 21, 2010

neume-extra

Copperbox revision 1452.

The overlay example now works for LilyPond. Unlike the example in the original Neume, I don't try to generate output in the parallelMusic form. This means I didn't need to add any new code to get overlays working.

Now that all the examples work, the two packages neume-core and neume-extra are functionally equivalent to the original Neume (only a week's work...).

neume-extra

Copperbox revision 1451.

Initial support for printing voice-overlays. So far, ABC is supported, LilyPond is outstanding.

neume-extra

Copperbox revision 1450.

I've added in the string number code from the original Neume, so now neume-extra can output tab scores.

neume-extra

Copperbox revision 1449.

I've recoded the ABC bar printing for repeats and repeats with alternative endings.

Most of the work is delegated to a very specialized buffer that tracks punctuation - i.e repeat symbols: "|:", "[1", ":|" - as well as accumulating the bars.

neume-extra

Copperbox revision 1448.

Work on ABC score output. Linear sections and repeats done, alternative repeats to do. The code is an improvement on the original in Neume. Unfortunately it still isn't very neat, with special cases regarding indices / positions adding clutter, e.g. a special case to avoid printing repeat start for the first bar.

Sunday, June 20, 2010

neume-extra

Copperbox revision 1447.

Initial work on printing ABC scores. Printing repeats and alternatives is a lot more involved for ABC than with LilyPond, as ABC must also deal with line continuations, and not print a repeat start on the first bar etc. The previous algorithm I had in the original Neume isn't good enough to keep, so I'll have to work out a new one.

neume-extra

Copperbox revision 1446.

The fret diagram example - FretDiagrams.hs - now works. Also I've chained the 'back-end' processing steps into a structure - LilyPondImageAlg - which has made the examples a bit tidier.

neume-extra

Copperbox revision 1445.

Initial work on importing the guitar chord / fret diagram code from the original Neume. Currently the example GuitarChords.hs doesn't compile.

neume-extra

Copperbox revision 1444.

The Percussion01 example is now working with proper bar line punctuation.

neume-extra

Copperbox revision 1443.

The Bulgarian6 example now generates a working LilyPond score.

Saturday, June 19, 2010

neume-extra

Copperbox revision 1442.

I've added the Bulgarian6 example from the original Neume, and done some preliminary work on it. Currently it can't generate output and I've disabled output from the Percussion01 example as the Score module it depended on has changed.

neume-core and neume-extra

Copperbox revision 1441.

The Percussion01 example in neume-extra now generates output.

As neume-core now longer has the Score GADT (which handles repeats, alternative repeats, etc.), I've moved the pretty printers for repeat, repeatvolta, barline ... into neume-extra.

Friday, June 18, 2010

neume-core and neume-extra

Copperbox revision 1439.

Work on neume-core - added a makeFull function to Core.Bracket to process a note list segmenting into both bars and beam groups. Other functions need to follow for makeUndiv and makeUnmetered.


Copperbox revision 1440.

Work on redoing the percussion code from the original Neume.

ZWav

Copperbox revision 1438.

I've fixed a bug with toInt in Syn.Output16 that wasn't accounting for negative numbers properly, so now the oscil and wave unit generators appear to be be working.

Thursday, June 17, 2010

ZWav

Copperbox revision 1437.

ZWav - a new project to read and write WAV audio files, plus modules for digital synthesis following Jerzy Karczmrczuk's Clarion described in the paper - Functional Framework for Sound Synthesis.

neume-extra

Copperbox revision 1436.

I've started a new project neume-extra for the rest of the code from the old version of Neume.

neume-core

Copperbox revision 1435.

I've renamed the ModularSyntax module to Syntax and the TraceT module to SnocTraceT.

Also I've started to look at replacing the default instances of Show for the syntax data types. The default instances are simply to verbose to be useful.

Wednesday, June 16, 2010

neume-core

Copperbox revision 1434.

I've coded a new implementation of beam splitting and bar grouping - one that's hopefully more flexible when the note list has an anacrusis or represents unmetered music, or if bars alternate between different meters.

The code needs quite a bit of polish though.

Tuesday, June 15, 2010

neume-core

Copperbox revision 1433.

I've added code to beam or not a metrical pulse. I'd forgotten how complicated this is - e.g. accounting for beams cannot start or end on rests. The new function dividePulse is quite clean though it needs a lot of machinery - trace monad, a special buffer data structure...

It also needs some cleaning up from its current state, before it moves into Core.Bracket from Temp01.hs.

neume-core

Copperbox revision 1432.

Work towards re-implementing bracket - i.e. bar and beam group splitting.

I've been here before of course - each time I go back to this I can't understand the algorithm I came up with last time.

Monday, June 14, 2010

neume-core

Copperbox revision 1431.

I've removed the name tagging from the Phrase data types. Name tagging is useful for LilyPond scores so tunes can be composed from named fragments (defined separately), but name tagging in Neume will be delegated to neume-extra.

neume-core

Copperbox revision 1430.

The B6 example now produces valid output. There are a lot of convenience functions missing from neume-core (compared to the original Neume), so the B6 example has to do quite a bit with the wl-pprint combinators directly to produce valid scores. However, I'm not going to add the missing functions to neume-core; instead I'll make a neume-extra package for them.

Putting the extra functionality into a new package, means I should actually be able to "finish" neume-core this time. Reworking the bracket functionality is the main thing left to do.

neume-core

Copperbox revisions 1428 and 1429.

I've renamed the 2L_Neume fork to neume-core (revision 1428). I've also added the B6.hs example, although it doesn't generate output yet (revision 1429).

Sunday, June 13, 2010

Neume

Copperbox revision 1426.

I've added the Bracket module to the Neume fork. At some point I'll recode it as it won't work with the various phrase formats.

Also in wumpus-clave - one of the source files ClaveMonad.hs was missing (but in my local repo), I've now added it.


Copperbox revision 1427.

Updates to Neume/Core/ModularSyntax.hs that should have gone in the last commit.

Neume

Copperbox revision 1425.

I've re-implemented the ABC transformations on the Neume fork.

Neume

Copperbox revision 1424.

I've implemented the relative pitch and relative duration transformations for LilyPond over the new syntax.

Saturday, June 12, 2010

Neume

Copperbox revision 1423.

I've started a new fork of Neume with modified data types for the syntax - 2L_Neume. In one place I'm using two-level types, though the instance is simplistic and might not be worth it - when I started out I was expecting to use two level types more but there actually isn't much recursion in Neume's syntax. In other places I've unified the syntax which definitely seems worthwhile.

I'm also looking to avoid some of the wildness in the previous revision (tri-functors, StateMap) and use more prosaic coding techniques.

Friday, June 11, 2010

wumpus-clave

Copperbox revision 1422.

I've added dedicated monad transformers for turtle drawing (or at least turtle movement) and tracing - collecting a trace like a writer monad but without the restriction to a monoidal collector.

Thursday, June 10, 2010

wumpus-clave

Copperbox revision 1421.

I've added a monad that tracks coordinate position - as per turtle drawing with Logo. This gives a fairly nice syntax for beat patterns:

beat >> rest >> rest >> beat >> endLine

I should be able to add other command e.g. to change background colour for the next n boxes, or change the beat symbol.

Poor small chart and wumpus-clave

Copperbox revision 1420.

Minor corrections to PSC - including a bug fix on rectHeight that was making labelled Y-axes draw incorrectly.

Also, I've started a new project wumpus-clave to draw percussion notation in box notation (often seen in Godfried Toussaint's papers on clave rhythms and in Simha Arom's African Polyphony & Polyrhythm book).

Chart drawing with PSC had become a very frustrating way of working out how to make drawings with wumpus-core. Charts are too various with too many configurations, so drawing them distracted from finding out good "mid-level" abstractions above the low-level primitives of wumpus-core. Clave patterns are much simpler, so should be less distracting.

Wednesday, June 9, 2010

PSC

Copperbox revision 1419.

I've renamed the original Scatter1.hs example to IrisMultiPlot.hs. The file Scatter1.hs now implements a simpler scatter plot.

Tuesday, June 8, 2010

PSC

Copperbox revision 1418.

I've now recreated the Wikipedia iris data multi-scatter plot quite well.

http://www.flickr.com/photos/44929957@N03/4683545276/

PSC

Copperbox revision 1417.

I've added new axis labelling functions that draw ticks down from the x-axis or left from the y-axis to the value label.

PSC

Copperbox revision 1416.

I'm working on the scatter plot example to reconstruct the multi-scatter plot drawing from Wikipedia:

http://en.wikipedia.org/wiki/Iris_flower_data_set

My version is here - currently without axis labels:

http://www.flickr.com/photos/44929957@N03/4681803588/

Monday, June 7, 2010

PSC

Copperbox revision 1415.

For drawing scatter plots, I've coalesced axis and grid drawing into one operation labelling. As both axis and grid drawing are functions, it is easy to combine them both into one operation with a composition operator - here `cc` (contextual composition).

cc f g = \ctx -> f ctx . g ctx

PSC

Copperbox revision 1414.

I've made the DrawingContext a type synonym and changed both scatter plot and spark line to use the it more uniformly.

Sunday, June 6, 2010

PSC

Copperbox revision 1413.

I've updated spark line to use the ScaleCtx type synonym.

PSC

Copperbox revision 1412.

The axis and grid code now uses higher-order functions for all drawing, the AxisLabelConfig and GridConfig data types are no longer used and have been removed.

PSC

Copperbox revision 1411.

I've tidied up the axis and grid code some more by putting the "scaling parameters" together into a type synonym ScaleCtx. This has unified all the functions as they now have consistent argument orders.

PSC

Copperbox revision 1410.

Some work on updating the axis and grid code, though more work needs doing.

PSC

Copperbox revision 1409.

A minor round of tidying up.

PSC

Copperbox revision 1408.

I've removed some drawing style data types - LineConfig, DashStyle - as drawing is now delegated to higher-order functions that know how to draw themselves.

Some work on legends.

Saturday, June 5, 2010

PSC

Copperbox revision 1407.

Some work simplifying drawing axes, more can be done and a couple of the data types can be removed.

PSC

Copperbox revision 1406.

I've added the type synonym -

type Graphic = H (Primitive Double)

So (sub) pictures have a composable, efficient type.

PSC

Copperbox revision 1405.

I've changed the representation of RangeBand in the spark line module so it is a higher order function.

In this case the function type isn't as obvious as say the DotF type in scatter plot. It seems wise to specify the range in terms of the input data and its respective Y-unit, but this gives RangeBandF a convoluted type.

PSC

Copperbox revision 1404.

I've changed SparkLine to make drawing higher-order - i.e. drawing a spark line is now a function: [Point] -> HPrim.

Again this should make things more flexible and allow different drawing styles.

Friday, June 4, 2010

PSC

Copperbox revision 1403.

Dots are now a function: Point2 -> HPrim in ScatterPlot. This makes it much easier to customize them, e.g. draw a hairline border etc.

PSC

Copperbox revision 1402.

I've reworked the axis and grid code to be more configurable, axes are now built with a function:
u -> Point -> HPrim

where u is the original 'unit' and it can be printed to make a label e.g. "1.0" ...

Using this, I'll also be able to added labels with ticks or just ticks.

PSC

Copperbox revision 1401.

I've changed some of the drawing construction to use Hughes lists and more will follow. Using Hughes lists of primitives rather than single primitives means I'll be able to make axis labels with both ticks and labels rather than axis labels with ticks or axis labels with labels.

Poor small chart and wumpus-core

Copperbox revision 1400.

Some more work on scatter plots, though again, not yet any significant improvements.

Wumpus-core - I've added a function capHeight to get the height of a upper case letter - no ascenders or descenders.

Thursday, June 3, 2010

PSC

Copperbox revision 1399.

Some work towards making scatter plot configurations easier to construct, although the current work isn't really an improvement.

Wednesday, June 2, 2010

PSC

Copperbox revision 1398.

Initial work on drawing legends - the result isn't very aesthetic at the moment, but the code is in place.

PSC

Copperbox revision 1397.

Some minor updates before I look at adding legends.

PSC

Copperbox revision 1396.

I've improved the placement of axis labels - they can now be placed at positions of the text labels bounding box (e.g east, north) rather than always at the bottom left (south-west).

PSC

Copperbox revision 1395.

I've re-implemented axis labels, caveat - currently the size of the label isn't accounted for, so they are drawn in the wrong place.

PSC

Copperbox revision 1394.

Minor tidying up - some name changes, improvements to the axis code, making the cabal file work again.

PSC

Copperbox revision 1393.

I've removed the RenderMonad and replaced the modules that used it with the new, alternative modules that had the _TWO suffix.

Poor small chart and wumpus-core

Copperbox revision 1392.

I've improved handling of optional pictures (i.e. background grids, soon X-Y axes) in PSC, so next I'll replace the modules that use the RenderMonad code with the new "TWO" code.

Wumpus-core had a bug in picOver where it was actually drawing as pic-under. This has been fixed.

Tuesday, June 1, 2010

PSC

Copperbox revision 1391.

I've made some slight but important changes to the grid code from the last commit. The code quality has not improved much but I've changed some of the function names and calculations so that it does now work as expected.

PSC

Copperbox revision 1390.

Some unsatisfactory work on background grids. The grid geometry doesn't work but I'd rather have the code check pointed in the repository before I scrap it.

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.