Greetings everyone. This is my first mailing list post, so apologies if
I'm unwittingly off-topic etc.

I've recently been working on a little project to aid my own
explorations into computer-aided composition & music
representation. I've (rather blandly) named it 'AbstractMusic', and it
can be found on Github[1].

It's designed around the idea of separating the process of producing
music into different layers of abstraction; each layer of abstraction
having its own idea of what a pitch, interval and duration is; and a
triple of (pitch, interval, duration) types can be used to create a
'note' type.

For example, among the pitch types there are:
- AbstractPitch1, which represents scale degrees
- AbstractPitch2, ordinary pitches (derived from AbstractPitch1 by
  applying a scale)
- AbstractPitch3, a frequency in Hertz (derived from AbstractPitch2 by
  applying a tuning system)

Each type makes as few assumptions as possible about what it might be
transformed into -- in particular, AbstractPitch2 does not assume
12-equal temperament, so C-sharps are distinct from D-flats -- it's up
to the tuning system to determine how to deal with
accidentals/augmentation/diminution etc.

See the file Tuning.hs for implementations of some common syntonic
(meantone) and equal temperaments. The internal representation of
pitches and intervals is as a free Abelian group -- i.e. a pair of
integers representing that interval in a particular basis. This means
that most common tuning systems can be implemented quite succinctly as
some linear transformation of that internal representation.

I've produced one major example so far, which a piece of keyboard music
by Guillaume Costeley which uses 19-equal temperament. See the file
Costeley.lhs, or this[2] page for synthesised (Csound) and typeset
(Lilypond) output. Please see the files Examples.hs and Canon.hs for
more examples, e.g. a fragment of Pachelbel's canon.

(You may notice that I'm no expert in Csound -- both the Csound and the
Lilypond output are rather primitive at the moment)


Edward Lilley



[1]: https://github.com/ejlilley/AbstractMusic
[2]: http://www.ugnus.uk.eu.org/~edward/costeley/

_______________________________________________
haskell-art mailing list
haskell-art@lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to