hsc3-lang-0.14: Haskell SuperCollider Language

Safe HaskellSafe-Inferred

Sound.SC3.Lang.Control.Duration

Contents

Description

The SC3 duration model.

Synopsis

Durational

class Durational d whereSource

Values that have duration.

occ is the interval from the start through to the end of the current event, ie. the time span the event occupies.

delta is the interval from the start of the current event to the start of the next sequential event.

fwd is the interval from the start of the current event to the start of the next parallel event.

Methods

occ :: d -> DoubleSource

delta :: d -> DoubleSource

fwd :: d -> DoubleSource

Instances

Dur

data Dur Source

Variant of the SC3 Duration model.

 delta (defaultDur {dur = 2,stretch = 2}) == 4
 occ defaultDur == 0.8
 let d = defaultDur {fwd' = Just 0} in (delta d,fwd d) == (1,0)

Constructors

Dur 

Fields

tempo :: Double

Tempo (in pulses per minute)

dur :: Double

Duration (in pulses)

stretch :: Double

Stretch multiplier

legato :: Double

Legato multipler

sustain' :: Maybe Double

Sustain time

delta' :: Maybe Double

Delta time

lag :: Double

Lag value

fwd' :: Maybe Double

Possible non-sequential delta time field

Instances

defaultDur :: DurSource

Default Dur value, equal to one second.

 delta defaultDur == 1

OptDur

type T8 n = (n, n, n, n, n, n, n, n)Source

Eight tuple.

type OptDur = T8 (Maybe Double)Source

Dur represented as an eight-tuple of optional values.

optDur :: OptDur -> DurSource

Translate OptDur to Dur.