Module

WAGS.Change.Optionals

Package
purescript-wags
Repository
mikesol/purescript-wags

This module provides functions for the construction of audio units that more closely resemble the overloaded constructors of the Web Audio API.

#AllpassOptional Source

#AllpassCtor Source

class AllpassCtor i allpass | i -> allpass where

Members

  • allpass :: i -> allpass

    Change an allpass filter

    allpass { freq: 440.0 }
    allpass { freq: 440.0, q: 1.0 }
    allpass 440.0
    

Instances

#BandpassOptional Source

#BandpassCtor Source

class BandpassCtor i bandpass | i -> bandpass where

Members

  • bandpass :: i -> bandpass

    Create a bandpass filter, connecting it to another unit

    bandpass { freq: 440.0 } { sinOsc: unit }
    bandpass { freq: 440.0, q: 1.0 } { sinOsc: unit }
    bandpass 440.0 { sinOsc: unit }
    

Instances

#ConstantOptional Source

type ConstantOptional = (onOff :: APOnOff)

#ConstantAll Source

#ConstantCtor Source

class ConstantCtor i o | i -> o where

Members

  • constant :: i -> o

    Change a constant value

    constant 0.5
    

Instances

#delay Source

delay :: forall a b. Paramable b => MM a (Maybe b) => a -> Delay (Maybe AudioParameter)

Change a delay unit.

delay 0.5 (playBuf "track")

#DynamicsCompressorOptional Source

#DynamicsCompressorCtor Source

class DynamicsCompressorCtor i compressor | i -> compressor where

Members

  • compressor :: i -> compressor

    Change a compressor.

    compressor { threshold: -10.0 } { buf: playBuf "track" }
    compressor { knee: 20.0, ratio: 10.0 } { buf: playBuf "track" }
    compressor { attack: 0.01, release: 0.3 } { buf: playBuf "track" }
    

Instances

#gain Source

gain :: forall a b. Paramable b => MM a (Maybe b) => a -> Gain (Maybe AudioParameter)

#HighpassOptional Source

#HighpassCtor Source

class HighpassCtor i highpass | i -> highpass where

Members

  • highpass :: i -> highpass

    Change a highpass filter

    highpass { freq: 440.0 }
    highpass { freq: 440.0, q: 1.0 }
    highpass 440.0
    

Instances

#HighshelfOptional Source

#HighshelfCtor Source

class HighshelfCtor i highshelf | i -> highshelf where

Members

  • highshelf :: i -> highshelf

    Change a highshelf filter

    highshelf { freq: 440.0 }
    highshelf { freq: 440.0, gain: 1.0 }
    highshelf 440.0
    

Instances

#LoopBufOptional Source

type LoopBufOptional = (buffer :: Maybe String, loopEnd :: Maybe Number, loopStart :: Maybe Number, onOff :: Maybe APOnOff, playbackRate :: Maybe AudioParameter)

#LoopBufCtor Source

class LoopBufCtor i loopBuf | i -> loopBuf where

Members

  • loopBuf :: i -> loopBuf

    Change a looping buffer.

    loopBuf { playbackRate: 1.0 } "track"
    loopBuf { playbackRate: 1.0, loopStart: 0.5 } "track"
    loopBuf "track"
    

Instances

#LowpassOptional Source

#LowpassCtor Source

class LowpassCtor i lowpass | i -> lowpass where

Members

  • lowpass :: i -> lowpass

    Change a lowpass filter

    lowpass { freq: 440.0 }
    lowpass { freq: 440.0, q: 1.0 }
    lowpass 440.0
    

Instances

#LowshelfOptional Source

#LowshelfCtor Source

class LowshelfCtor i lowshelf | i -> lowshelf where

Members

  • lowshelf :: i -> lowshelf

    Change a lowshelf filter

    lowshelf { freq: 440.0 }
    lowshelf { freq: 440.0, gain: 1.0 }
    lowshelf 440.0
    

Instances

#NotchOptional Source

#NotchCtor Source

class NotchCtor i notch | i -> notch where

Members

  • notch :: i -> notch

    Change a notch (band-reject) filter

    notch { freq: 440.0 }
    notch { freq: 440.0, gain: 1.0 }
    notch 440.0
    

Instances

#PeakingOptional Source

#PeakingCtor Source

class PeakingCtor i peaking | i -> peaking where

Members

  • peaking :: i -> peaking

    Change a peaking filter

    peaking { freq: 440.0 }
    peaking { freq: 440.0, gain: 1.0 }
    peaking 440.0
    

Instances

#CanBeCoercedToPeriodicOsc Source

#PeriodicOscOptional Source

type PeriodicOscOptional wave = (freq :: Maybe AudioParameter, onOff :: Maybe APOnOff, wave :: Maybe wave)

#PeriodicOscAll Source

#defaultPeriodicOsc Source

#PeriodicOscCtor Source

class PeriodicOscCtor i o | i -> o where

Members

  • periodicOsc :: i -> o

    Change a periodicOsc value

    periodicOsc "my-osc" 0.5
    

Instances

#DPeriodicOsc Source

type DPeriodicOsc periodicOsc = PeriodicOsc periodicOsc APOnOff AudioParameter

#PlayBufOptional Source

type PlayBufOptional = (buffer :: Maybe String, bufferOffset :: Maybe Number, onOff :: Maybe APOnOff, playbackRate :: Maybe AudioParameter)

#PlayBufCtor Source

class PlayBufCtor i playBuf | i -> playBuf where

Members

  • playBuf :: i -> playBuf

    Change a unit that plays from a buffer.

    playBuf { playbackRate: 1.0 } "track"
    playBuf { playbackRate: 1.0, bufferOffset: 0.5 } "track"
    playBuf "track"
    

Instances

#SawtoothOscCtor Source

class SawtoothOscCtor i o | i -> o where

Members

  • sawtoothOsc :: i -> o

    Change a sawtooth oscillator

    sawtoothOsc 440.0
    sawtoothOsc On 440.0
    

Instances

#SinOscOptional Source

type SinOscOptional = (onOff :: APOnOff)

#SinOscAll Source

#SinOscCtor Source

class SinOscCtor i o | i -> o where

Members

  • sinOsc :: i -> o

    Change a sinOsc value

    sinOsc 0.5
    

Instances

#SquareOscOptional Source

type SquareOscOptional = (onOff :: APOnOff)

#SquareOscAll Source

#SquareOscCtor Source

class SquareOscCtor i o | i -> o where

Members

  • squareOsc :: i -> o

    Change a squareOsc value

    squareOsc 0.5
    

Instances

#pan Source

pan :: forall a b. Paramable b => MM a (Maybe b) => a -> StereoPanner (Maybe AudioParameter)

Pan audio.

pan 0.5 { buf: playBuf "my-track" }

#TriangleOscOptional Source

type TriangleOscOptional = (onOff :: APOnOff)

#TriangleOscAll Source

#TriangleOscCtor Source

class TriangleOscCtor i o | i -> o where

Members

  • triangleOsc :: i -> o

    Change a triangleOsc value

    triangleOsc 0.5
    

Instances