| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
| Extensions |
|
Vivid.SynthDef.Types
Description
Internal. Just use Vivid.SynthDef
- data Signal
- data CalculationRate
- data SynthDef args = SynthDef {}
- data SDName
- type SDBody' args = State ([Int], SynthDef args, VarSet args)
- zoomSDBody :: Subset inner outer => SDBody' inner a -> SDBody' outer a
- zoomSynthDef :: Subset a b => SynthDef a -> SynthDef b
- data UGen = UGen {}
- data UGenName
- data UnaryOp
- = Neg
- | Not
- | IsNil
- | NotNil
- | BitNot
- | Abs
- | AsFloat
- | AsInt
- | Ciel
- | Floor
- | Frac
- | Sign
- | Squared
- | Cubed
- | Sqrt
- | Exp
- | Recip
- | MIDICPS
- | CPSMIDI
- | MIDIRatio
- | RatioMIDI
- | DbAmp
- | AmpDb
- | OctCPS
- | CPSOct
- | Log
- | Log2
- | Log10
- | Sin
- | Cos
- | Tan
- | ArcSin
- | ArcCos
- | ArcTan
- | SinH
- | CosH
- | TanH
- | Rand
- | Rand2
- | LinRand
- | BiLinRand
- | Sum3Rand
- | Distort
- | SoftClip
- | Coin
- | DigitValue
- | Silence
- | Thru
- | RectWindow
- | HanWindow
- | WelchWindow
- | TriWindow
- | Ramp
- | SCurve
- | NumUnarySelectors
- data BinaryOp
- = Add
- | Sub
- | Mul
- | IDiv
- | FDiv
- | Mod
- | Eq
- | Ne
- | Lt
- | Gt
- | Le
- | Ge
- | Min
- | Max
- | BitAnd
- | BitOr
- | BitXor
- | Lcm
- | Gcd
- | Round
- | RoundUp
- | Trunc
- | Atan2
- | Hypot
- | Hypotx
- | Pow
- | ShiftLeft
- | ShiftRight
- | UnsignedShift
- | Fill
- | Ring1
- | Ring2
- | Ring3
- | Ring4
- | DifSqr
- | SumSqr
- | SqrSum
- | SqrDif
- | AbsDif
- | Thresh
- | AMClip
- | ScaleNeg
- | Clip2
- | Excess
- | Fold2
- | Wrap2
- | FirstArg
- | RandRange
- | ExpRandRange
- | NumBinarySelectors
- module Vivid.SynthDef.TypesafeArgs
Documentation
data CalculationRate Source #
The rate that a UGen computes at
Internal representation of Synth Definitions. Usually, use sd instead of
making these by hand.
This representation (especially _sdUGens) might change in the future.
Constructors
| SynthDef | |
Constructors
| SDName_Named ByteString | |
| SDName_Hash |
type SDBody' args = State ([Int], SynthDef args, VarSet args) Source #
State monad to construct SynthDefs
The SynthDef is an under-construction synth definition The [Int] is the id supply. Its type definitely could change in the future
zoomSDBody :: Subset inner outer => SDBody' inner a -> SDBody' outer a Source #
Given
good0 :: SDBody '["2"] () good0 = return ()
good1 :: SDBody '["3","1","3","1"] () good1 = return ()
bad0 :: SDBody '["bwahaha"] () bad0 = return ()
outer :: SDBody '[ "1", "2", "3"]() outer = do zoomSDBody good0 -- works zoomSDBody good1 -- works -- zoomSDBody bad0 -- doesn't work - great!
Representation of Unit Generators. You usually won't be creating these
by hand, but instead using things from the library in UGens
Constructors
| UGen | |
Fields
| |
Unary signal operations. Many of these have functions so you don't need to
use this internal representation (e.g. Neg has neg, etc).
This type might not be exposed in the future.
Constructors
| Neg | |
| Not | |
| IsNil | |
| NotNil | |
| BitNot | There's a bug in some SC versions where .bitNot isn't implemented correctly. Vivid backfills it with a fix, so you can use BitNot with any SC version |
| Abs | |
| AsFloat | |
| AsInt | |
| Ciel | |
| Floor | |
| Frac | |
| Sign | |
| Squared | |
| Cubed | |
| Sqrt | |
| Exp | |
| Recip | |
| MIDICPS | |
| CPSMIDI | |
| MIDIRatio | |
| RatioMIDI | |
| DbAmp | |
| AmpDb | |
| OctCPS | |
| CPSOct | |
| Log | |
| Log2 | |
| Log10 | |
| Sin | |
| Cos | |
| Tan | |
| ArcSin | |
| ArcCos | |
| ArcTan | |
| SinH | |
| CosH | |
| TanH | |
| Rand | |
| Rand2 | |
| LinRand | |
| BiLinRand | |
| Sum3Rand | |
| Distort | |
| SoftClip | |
| Coin | |
| DigitValue | |
| Silence | |
| Thru | |
| RectWindow | |
| HanWindow | |
| WelchWindow | |
| TriWindow | |
| Ramp | |
| SCurve | |
| NumUnarySelectors |
Binary signal operations. For the simple ones (like Add, Mul, etc.),
there are functions (like ~+, ~*, etc.)
that wrap them up so you
don't have to make a ugen for them yourself.
In the future these may not be exported -- we'll just have functions for all of them.
Constructors
| Add | |
| Sub | |
| Mul | |
| IDiv | Integer division |
| FDiv | Float division |
| Mod | |
| Eq | |
| Ne | |
| Lt | |
| Gt | |
| Le | |
| Ge | |
| Min | |
| Max | |
| BitAnd | |
| BitOr | |
| BitXor | |
| Lcm | |
| Gcd | |
| Round | |
| RoundUp | |
| Trunc | |
| Atan2 | |
| Hypot | |
| Hypotx | |
| Pow | |
| ShiftLeft | |
| ShiftRight | |
| UnsignedShift | |
| Fill | |
| Ring1 | a * (b + 1) == a * b + a |
| Ring2 | a * b + a + b |
| Ring3 | a * a * b |
| Ring4 | a * a * b - a * b * b |
| DifSqr | a * a - b * b |
| SumSqr | a * a + b * b |
| SqrSum | (a + b) ^ 2 |
| SqrDif | (a - b) ^ 2 |
| AbsDif | abs(a - b) |
| Thresh | |
| AMClip | |
| ScaleNeg | |
| Clip2 | |
| Excess | |
| Fold2 | |
| Wrap2 | |
| FirstArg | |
| RandRange | |
| ExpRandRange | |
| NumBinarySelectors |
module Vivid.SynthDef.TypesafeArgs