csound-expression-dynamic-0.0.2: dynamic core for csound-expression library

Safe HaskellSafe-Inferred




class CsdSco f whereSource

A class that represents Csound scores. All functions that use score are defined in terms of this class. If you want to use your own score representation, just define two methods of the class.

The properties:

 forall a . toCsdEventList (singleCsdEvent a) === CsdEventList 1 [(0, 1, a)]


toCsdEventList :: f a -> CsdEventList aSource

Converts a given score representation to the canonical one.

singleCsdEvent :: CsdEvent a -> f aSource

Constructs a scores that contains only one event. The event happens immediately and lasts for 1 second.


type CsdEvent a = (Double, Double, a)Source

The Csound note. It's a triple of

 (startTime, duration, parameters)

data CsdEventList a Source

CsdEventList is a canonical representation of the Csound scores. A scores is a list of events and we should know the total duration of the scores. It's not meant to be used directly. We can use a better alternative. More convenient type that belongs to CsdSco type class (see temporal-csound package).