>
> > and library for music composition. It will contain combinators for score
> > composition and microsound music support (it tries to be small, general
> and
> > not so western-music-tradition oriented). It makes no sound yet, but
> defines
> > how to compose things. Main target is csound-expression library. I'm
> > planning to add simple midi support as demo. I've made first version and
> > need to write docs and examples.
>
> Interesting. Any links to music produced with it, even if it was just
> for testing?
>
Current examples are written with old api, I hope to release next week.
Library contains combinators for score composition and basic types for pitch
and
volume. Score combinators are just functions from temporal-media [1] package
but with musical names.
For 'Scale' i've come to this
There are two types 'Tone' and `Scale`
'Tone' is 2d integer + bend values as double. And Scale is base tone
frequency
(that corresponds to tone == (0, 0)), length of 'octave' interval and vector
of
multipliers for each tone in one cycle.
To construct tone value i need to know number of tones in one cycle.
It's encoded in tone's type
type Frequency = Double
data NaturalNumber n => Tone n = Tone
{ toneBend :: Double
, toneOctave :: Int
, toneStep :: Int
}
data NaturalNumber n => Scale n = Scale
{ scaleBase :: Frequency
, scaleOctave :: Frequency
, scaleSteps :: Vector Frequency
}
frequency :: NaturalNumber n => Scale n -> Tone n -> Frequency
In scale 'octave' means length of one cycle (not restricted to 2).
[1] http://hackage.haskell.org/package/temporal-media
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art