Safe Haskell | Safe-Inferred |
---|
- class Functor f => CsdSco f where
- toCsdEventList :: f a -> CsdEventList a
- singleCsdEvent :: CsdEvent a -> f a
- type CsdEvent a = (Double, Double, a)
- csdEventStart :: CsdEvent a -> Double
- csdEventDur :: CsdEvent a -> Double
- csdEventContent :: CsdEvent a -> a
- data CsdEventList a = CsdEventList {
- csdEventListDur :: Double
- csdEventListNotes :: [CsdEvent a]
- delayCsdEventList :: Double -> CsdEventList a -> CsdEventList a
- rescaleCsdEventList :: Double -> CsdEventList a -> CsdEventList a
Documentation
class Functor f => 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)
csdEventStart :: CsdEvent a -> DoubleSource
csdEventDur :: CsdEvent a -> DoubleSource
csdEventContent :: CsdEvent a -> aSource
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).
Functor CsdEventList | |
Foldable CsdEventList | |
Traversable CsdEventList | |
CsdSco CsdEventList | |
Eq a => Eq (CsdEventList a) | |
Show a => Show (CsdEventList a) |
delayCsdEventList :: Double -> CsdEventList a -> CsdEventList aSource
rescaleCsdEventList :: Double -> CsdEventList a -> CsdEventList aSource