hsc3-lang-0.12: Haskell SuperCollider Language

Safe HaskellSafe-Inferred

Sound.SC3.Lang.Control.Duration

Description

The SC3 duration model.

Synopsis

Documentation

data Duration a Source

The SC3 Duration model.

Constructors

Duration 

Fields

tempo :: a

Tempo (in pulses per minute)

dur :: a

Duration (in pulses)

stretch :: a

Stretch multiplier

legato :: a

Legato multipler

sustain_f :: Duration a -> a

Sustain time calculation

delta_f :: Duration a -> a

Delta time calculation

lag :: a

Lag value

fwd' :: Maybe a

Possible non-sequential delta time field

delta :: Duration a -> aSource

Run delta_f for Duration. This is the interval from the start of the current event to the start of the next event.

 delta (defaultDuration {dur = 2,stretch = 2}) == 4

sustain :: Duration a -> aSource

Run sustain_f for Duration. This is the sounding duration of the event.

 sustain defaultDuration == 0.8

fwd :: Num a => Duration a -> aSource

If fwd' field is set at Duration extract value and multiply by stretch, else calculate delta.

 fwd (defaultDuration {fwd' = Just 0}) == 0

default_delta_f :: (Num a, Fractional a) => Duration a -> aSource

The default delta_f field for Duration. Equal to dur * stretch * (60 / tempo).

 default_delta_f (defaultDuration {legato = 1.2}) == 1.0

default_sustain_f :: (Num a, Fractional a) => Duration a -> aSource

The default sustain_f field for Duration. This is equal to delta * legato.

 default_sustain_f (defaultDuration {legato = 1.2}) == 1.2

defaultDuration :: (Num a, Fractional a) => Duration aSource

Default Duration value, equal to one second.

 delta defaultDuration == 1