Copperbox revision 119.
More work on Chords - again this work is partial so is currently comment out. However it revealed another problem with intervals - I couldn't count up from one pitch to another with an arithmetic distance. So I've added a new function, to do this:
arithmeticStep :: Pitch -> Int -> Pitch
This has shown up a problem with the Pitch instance of`addSemi` whereby the pitch spelling goes wrong. I haven't correct this at the moment as I'm not sure if my obvious fix is correct (the obvious fix is to keep the pitch letter the same and simply alter the accidental).
Sunday, March 30, 2008
Saturday, March 29, 2008
Monday, March 24, 2008
Bala
Copperbox revision 113.
Some more work on intervals - a new function extr (which needs renaming) it generates the suceeding pitch by adding an interval.
extr :: Pitch -> Interval -> Pitch
Also a bit of work on pitch spelling, and some work on a new chord representation. The chord representation is just a sketch and currently hidden inside comments.
Some more work on intervals - a new function extr (which needs renaming) it generates the suceeding pitch by adding an interval.
extr :: Pitch -> Interval -> Pitch
Also a bit of work on pitch spelling, and some work on a new chord representation. The chord representation is just a sketch and currently hidden inside comments.
Bala
Copperbox revisions 111 & 112.
Revision 112 - Reinstated the interval naming functions in the module Interval.
(Note they could do with better names).
Revision 111 - Some tidying up of the Pitch code - the redundant type class SemiToneCount has been removed (it is replaced by the class Semitones).
New functions added to the interval Interval module to find the arithmetic distance between two pitches and to build an interval from two pitches (arithmeticDistance and buildInterval).
Revision 112 - Reinstated the interval naming functions in the module Interval.
(Note they could do with better names).
Revision 111 - Some tidying up of the Pitch code - the redundant type class SemiToneCount has been removed (it is replaced by the class Semitones).
New functions added to the interval Interval module to find the arithmetic distance between two pitches and to build an interval from two pitches (arithmeticDistance and buildInterval).
Sunday, March 23, 2008
Bala
Copperbox revision 110.
Intervals are now represented by natural numbers. Trying to account for negative numbers made the previous Num instance complicated and buggy.
I think addition and subtraction on intervals can be adequately represented as with just natural numbers for semitone count and and arithmetic distance, but I'll have to work out some QuickCheck properties to test this idea.
Intervals are now represented by natural numbers. Trying to account for negative numbers made the previous Num instance complicated and buggy.
I think addition and subtraction on intervals can be adequately represented as with just natural numbers for semitone count and and arithmetic distance, but I'll have to work out some QuickCheck properties to test this idea.
Saturday, March 22, 2008
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).
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.
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.
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.
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 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).
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.
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.
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.