csound-expression-0.2.0: Csound combinator library

CsoundExpr.Base.Score

Contents

Synopsis

Types

type Score a = MediaUnit Dur () aSource

representing score

Constructors

rest :: Temporal Dur a => Dur -> aSource

pause

note :: Dur -> a -> Score aSource

constructor of score

toList :: Score a -> EventList Dur aSource

transform Score to EventList

Duration querry

dur :: Temporal Dur a => a -> DurSource

duration

Arrangers

class Arrangeable a where

composing structures in sequent and parallel ways

Methods

(+:+) :: a -> a -> a

(=:=) :: a -> a -> a

Instances

line :: Arrangeable a => [a] -> aSource

sequential composition

chord :: Arrangeable a => [a] -> aSource

parallel composition

loop :: Arrangeable a => Int -> a -> aSource

trill :: Arrangeable a => Int -> a -> a -> aSource

loop for two groups of notes

rondo :: Arrangeable a => a -> a -> a -> aSource

rondo form

rondo a b c = line [a, b, a, c, a]

reprise :: Arrangeable a => a -> a -> a -> aSource

reprise form

reprise a b1 b2 = line [a, b1, a, b2]

Transformers

In time domain

delay :: (Temporal Dur a, Arrangeable a) => Dur -> a -> aSource

stretch :: Stretchable Dur a => Dur -> a -> aSource

stretch in time domain

tstretch :: TemporalStretchable Dur a => (Time -> Dur) -> a -> aSource

stretch in time domain depndent on note's time

cut :: Dur -> Dur -> Score a -> Score aSource

extracting score parts in some time interval. it reverses output if t1 < t0.

takeS :: Dur -> Score a -> Score aSource

take sub-score from begining

dropS :: Dur -> Score a -> Score aSource

drop sub-score

reverseS :: Score a -> Score aSource

reverse score

pedal :: Dur -> Score a -> Score aSource

adds sustain, but total duration of score elements remains unchaged

notes are sustained within total duration interval. adds given amount of time to all notes.

pedalBy :: (Time -> Dur -> a -> (b, Dur)) -> Score a -> Score bSource

general "pedal"

total duration of score element remains unchanged. notes are sustained within total duration interval

sustain :: Dur -> Score a -> Score aSource

adds given amount of duration to all notes

sustainBy :: (Time -> Dur -> a -> (b, Dur)) -> Score a -> Score bSource

general sustain

Mappings

tmap :: (Time -> a -> b) -> Score a -> Score bSource

temporal functor tmap method for scores

map with time

dmap :: (Dur -> a -> b) -> Score a -> Score bSource

temporal functor dmap method for scores

map with duration

tdmap :: (Time -> Dur -> a -> b) -> Score a -> Score bSource

temporal functor tdmap method for scores

map with time and duration

Misc

tmapRel :: (Time -> a -> b) -> Score a -> Score bSource

relative tmap

map with time normalized by total duration value

dmapRel :: (Dur -> a -> b) -> Score a -> Score bSource

relative dmap

map with duration normalized by total duration value

tdmapRel :: (Time -> Dur -> a -> b) -> Score a -> Score bSource

relative tdmap

map with time and duration normalized by total duration value

tstretchRel :: TemporalStretchable Dur a => (Time -> Dur) -> a -> aSource

relative tstretch

time normalized by durtion of value

linseg :: (Num t, Ord t, Fractional t) => [t] -> t -> t

linear interpolation