Module

WAGS.Graph.Parameter

Package
purescript-wags
Repository
mikesol/purescript-wags

#uop Source

uop :: forall a b. (a -> b) -> AudioParameter_ a -> AudioParameter_ b

#bop Source

bop :: forall a b c. (a -> b -> c) -> AudioParameter_ a -> AudioParameter_ b -> AudioParameter_ c

#AudioParameter_' Source

type AudioParameter_' a = { param :: Maybe a, timeOffset :: Number, transition :: AudioParameterTransition }

A control-rate audio parameter.

param: The parameter as a floating-point value or an instruction to cancel all future parameters. timeOffset: How far ahead of the current playhead to set the parameter. This can be used in conjunction with the headroom parameter in run to execute precisely-timed events. For example, if the headroom is 20ms and an attack should happen in 10ms, use timeOffset: 10.0 to make sure that the taret parameter happens exactly at the point of attack. transition: Transition between two points in time.

#AudioParameterTransition Source

data AudioParameterTransition

A transition between two points in time.

  • NoRamp is a discrete step.
  • LinearRamp is linear interpolation between two values.
  • ExponentialRamp is exponential interpolation between two values.
  • Immediately erases the current value and replaces it with this one. Different than NoRamp in that it does not take into account scheduling and executes immediately. Useful for responsive instruments.

Constructors

Instances

#modTime Source

#modParam Source

modParam :: forall a. (a -> a) -> AudioParameter_ a -> AudioParameter_ a

#noRamp Source

#linearRamp Source

#exponentialRamp Source

#immediately Source

#defaultParam Source

defaultParam :: AudioParameter'

A default audio parameter.

defaultParam = { param: 0.0, timeOffset: 0.0, transition: LinearRamp }

#MM Source

class MM a b | a -> b where

Members

  • mm :: a -> b

Instances