Hi,

I'm glad to announce first release of temporal-music-notation
library [1]. It provides composable score representation,
microsound tunings, flexible pitch and volume control.

This library provides two kinds of musical structures.
First is general Score representation. It tells how to
combine musical things together and how they can be
transformed. Second is just the opposite side of first one,
it stands for very basic musical structures like Pitch,
Scale, Tone, Volume.

What's interesting about library?

Score composition

Score is rendered to list of events with fixed
time and duration (it's value that happens and lasts
for some time).

This module is built on top of 'temporal-media' package [2].
Basic api is borrowed from haskore but rendering is
different. All structure functions (like line, chord, stretch)
are rendered as linear transformations of note's
time and duration attributes. It allows to compose
transformations on notes while descending along
the branches of Score tree. fmap's are composed too,
so something like fusion is going on.

Basic types (Pitch, Tone, Scale, Volume, Level)

Tone is 2d integer with bend double value. Scale
allows Tone to Frequency conversion. Scale is vector
of multipliers, octave interval, and frequency of base
tone (some tone specified as anchor on frequency domain).
Tone is parameterised with type level natural number,
which tells how many tones are packed in one octave.
Another candidate for this is Enum + Bounded but then
you have to specify names for each note. Maybe it's
better solution.

With this I've run into problem and need help.
ghc-7 on hackage rejects my library with this error.

Context reduction stack overflow; size = 21
Use -fcontext-stack=N to increase stack size to N

And produces long list of NaturalNumber deduction.
It builds on ghc-6.12.3 though.

Scales

I've translated many scales from 'music and math' book.
It includes scales by Pythagoras, Paul Hindemith, Wendy Carlos,
Bohlen-Pierce, Sruti scale (rejected by ghc-7 though).

Western music tradition

This library tries to be general so I've collected
names specific to western music in another package
'temporal-music-notation-western'[3]. It depends on
this library and it's rejected by hackage's ghc-7 too.

Examples

Library is general but only one sound producing
front-end is available for now. It's csound code
generator 'csound-expression'[4]. Examples can be
found in source package of 'temporal-music-notation'
package.

Performance

It's slow. I've come to first solution week before and it
was slower. I've changed score rendering mechanism, I've
noticed that I'm doing a lot of 'fmap f . fmap g' things
and decided to try GADTs fusion. It's faster now but
slow still. It was faster without general tones and scales.
Can extensive usage of type level natural numbers be the
source of inefficiency?

[1] http://hackage.haskell.org/package/temporal-music-notation
[2] http://hackage.haskell.org/package/temporal-media
[3] http://hackage.haskell.org/package/temporal-music-notation-western
[4] http://hackage.haskell.org/package/csound-expression
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to