hsc3-0.20: Haskell SuperCollider
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Sc3.Common.Rate

Description

Operating rate definitions and utilities.

Synopsis

Documentation

data Rate Source #

Enumeration of operating rates of unit generators.

Instances

Instances details
Bounded Rate Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Enum Rate Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Methods

succ :: Rate -> Rate #

pred :: Rate -> Rate #

toEnum :: Int -> Rate #

fromEnum :: Rate -> Int #

enumFrom :: Rate -> [Rate] #

enumFromThen :: Rate -> Rate -> [Rate] #

enumFromTo :: Rate -> Rate -> [Rate] #

enumFromThenTo :: Rate -> Rate -> Rate -> [Rate] #

Read Rate Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Show Rate Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Methods

showsPrec :: Int -> Rate -> ShowS #

show :: Rate -> String #

showList :: [Rate] -> ShowS #

Eq Rate Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Methods

(==) :: Rate -> Rate -> Bool #

(/=) :: Rate -> Rate -> Bool #

Ord Rate Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Methods

compare :: Rate -> Rate -> Ordering #

(<) :: Rate -> Rate -> Bool #

(<=) :: Rate -> Rate -> Bool #

(>) :: Rate -> Rate -> Bool #

(>=) :: Rate -> Rate -> Bool #

max :: Rate -> Rate -> Rate #

min :: Rate -> Rate -> Rate #

ir :: Rate Source #

Standard abbreviations of Rate values. ir = initialisation, kr = control, ar = audio, dr = demand. dr sorts to the right of the fixed clock rates.

Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr]

kr :: Rate Source #

Standard abbreviations of Rate values. ir = initialisation, kr = control, ar = audio, dr = demand. dr sorts to the right of the fixed clock rates.

Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr]

ar :: Rate Source #

Standard abbreviations of Rate values. ir = initialisation, kr = control, ar = audio, dr = demand. dr sorts to the right of the fixed clock rates.

Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr]

dr :: Rate Source #

Standard abbreviations of Rate values. ir = initialisation, kr = control, ar = audio, dr = demand. dr sorts to the right of the fixed clock rates.

Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr]

rateAbbrev :: Rate -> String Source #

Standard SuperCollider rate abbreviations.

map rateAbbrev [minBound .. maxBound] == ["ir","kr","ar","dr"]

rateName :: Rate -> String Source #

Standard SuperCollider rate abbreviations.

map rateName [minBound .. maxBound] == ["scalar","control","audio","demand"]

rateId :: Rate -> Int Source #

Integer rate identifier, as required for scsynth bytecode.

rate_color :: Rate -> String Source #

Color identifiers for each Rate.

all_rates :: [Rate] Source #

Set of all Rate values.

rate_parse :: String -> Maybe Rate Source #

Case insensitive parser for rate.

Data.Maybe.mapMaybe rate_parse (words "ar kR IR Dr") == [AudioRate,ControlRate,InitialisationRate,DemandRate]

Control rates

data K_Type Source #

Enumeration of the four operating rates for controls. I = initialisation, K = control, T = trigger, A = audio.

Instances

Instances details
Show K_Type Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Eq K_Type Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

Methods

(==) :: K_Type -> K_Type -> Bool #

(/=) :: K_Type -> K_Type -> Bool #

Ord K_Type Source # 
Instance details

Defined in Sound.Sc3.Common.Rate

ktype :: Rate -> Bool -> K_Type Source #

Determine class of control given Rate and trigger status.