hsc3-lang-0.15: Haskell SuperCollider Language

Safe HaskellSafe-Inferred
LanguageHaskell98

Sound.SC3.Lang.Control.Duration

Contents

Description

The SC3 duration model.

Synopsis

Duration

class Duration d where Source

There are three parts to a duration:

delta is the logical or notated duration.

occ is the sounding duration, the interval that a value actually occupies in time. If occ < delta there will be a hole, if occ > delta there will be an overlap.

fwd is the forward duration, the interval to the start time of the next value in the sequence, which may be parallel to the current value. Ordinarily fwd is either delta or 0.

Minimal complete definition

delta

Methods

delta :: d -> Double Source

occ :: d -> Double Source

fwd :: d -> Double Source

duration :: Duration d => d -> (Double, Double, Double) Source

Composite of delta, occ, and fwd.

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 :: Dur Source

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 -> Dur Source

Translate OptDur to Dur.