Friday, March 21, 2008

Bala

Copperbox revision 106.

Various bits of fixing on the pitch-rep branch.

Notably, I'm no longer using Read and Show for pretty instances, instead I'm using two new classes Affi and Deco. Its a pity there isn't a convention for prettier versions of Read & Show in Haskell, so currently I have my own. Also there are some new pretty-print combinators for ShowS rather than Doc (in BaseExtra).

Sunday, March 16, 2008

Bala

Copperbox revisions 103, 104 & 105.

Revision 103 - corrected an error in TextualMidi that was stopping MidiPrint compiling.

Revision 104 - created a branch for Bala to use a new pitch representation - branch bala-pitchrep2.

Revision 105 - added first tranche of changes on the branch bala-pitchrep2. The intention is that new pitch representation should make arithmetic operations on pitches easier (e.g. adding semitones , adding octaves) and should help with pitch spelling.

Sunday, March 9, 2008

Bala

Copperbox revisions 101 & 102.

102 - Deleted the JSON external format module for Bala. JSON is inherently unordered making it a poor choice for externalising music representations that in many cases are ordered.

101 - More work on intervals and chords. Added conversion for Bala.Base pitch representation to and from the ABC pitch representation so that pitches can be printed in ABC. Removed a name clash in the Midi lib that had probably been lurking for some time.

Saturday, March 8, 2008

Bala

Copperbox is 100.

Extended the Base.Chord module with labelled chords (e.g Cmaj7) . The Read instance for labelled chords is unfortunately rather messy as the chord names don't split nicely into sub-tokens.

At 100, it would be nice if bits of Copperbox were useful - unfortunately they aren't. The C front end and the ASDL tool seem like dead ends - while it would be nice to use Haskell to analyse C code (and get the great tools into the bargain e.g. Strafunski and its successors, UUAG...) the only game in town for analysing C is OCaml and CIL.

Bala is making slow progress. It doesn't feel very Haskell-like at the moment - the core data types don't have many operations other than Read and Show instances. While I don't mind this as the current focus - using data types and constructors natively in Haskell for music representation can be still be very verbose compared to say ABC format - I have some concerns that I'm not getting to the heart of the form of the data types and how they should work.

Monday, March 3, 2008

Bala

Copperbox revision 99.

Changes -

The Pitch instance of `addSemi` had an error - it wasn't accounting for octave displacement on PitchLetter changes.

The combinator zac was really scanl (+).

The PitchLetter constructors have been rotated so that C is the lowest.

Bala

Copperbox revision 98.

Minor updates to Korda & Base.Scale.

Korda - finger positions are represented as Maybe Int rather than a hand rolled datatype, this means I can use fmap and gain some uniformity.

Base.Scale - build scales from interval patterns, plus some common interval patterns (modes, pentatonic scales, raga scales).

Sunday, March 2, 2008

Bala

Copperbox revision 97.

I've added an example module Korda to display pitches from guitar chord fingerings.

While it is just a sketch it did point out that the PitchRep module needed some facility to perform limited calculations on pitches (i.e. add semitones or octaves to them). Two type classes have been added to PitchRep to add and subtract semitones and octaves.

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.