Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Common unit generator graphs.
Synopsis
- asLocalBuf :: ID i => i -> [UGen] -> UGen
- balanceStereo :: UGen -> UGen -> UGen -> UGen
- bLowPass4 :: UGen -> UGen -> UGen -> UGen
- bHiPass4 :: UGen -> UGen -> UGen -> UGen
- bufRdN :: Int -> Rate -> UGen -> UGen -> Loop UGen -> UGen
- bufRdL :: Int -> Rate -> UGen -> UGen -> Loop UGen -> UGen
- bufRdC :: Int -> Rate -> UGen -> UGen -> Loop UGen -> UGen
- changed :: UGen -> UGen -> UGen
- choose :: ID m => m -> UGen -> UGen
- chooseM :: UId m => UGen -> m UGen
- clearLocalBuf :: ID a => a -> UGen -> UGen -> UGen
- dcons :: ID m => (m, m, m) -> UGen -> UGen -> UGen
- dconsM :: UId m => UGen -> UGen -> m UGen
- dynKlang :: Rate -> UGen -> UGen -> UGen -> UGen
- dynKlank :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen
- exprange :: UGen -> UGen -> UGen -> UGen
- in_exprange :: UGen -> (UGen, UGen) -> UGen
- fft' :: UGen -> UGen -> UGen
- ffta :: ID i => i -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen
- firstPrivateBus :: UGen
- freqShift_hilbert :: UGen -> UGen -> UGen -> UGen
- gateReset :: Num a => a -> a -> a
- hilbertFIR :: UGen -> UGen -> UGen
- ifft' :: UGen -> UGen
- klanx_spec_f :: (a -> [b]) -> ([b] -> c) -> a -> a -> a -> c
- klangSpec :: [UGen] -> [UGen] -> [UGen] -> UGen
- klangSpec_k :: Real n => [n] -> [n] -> [n] -> UGen
- klangSpec_mce :: UGen -> UGen -> UGen -> UGen
- klankSpec :: [UGen] -> [UGen] -> [UGen] -> UGen
- klankSpec_k :: Real n => [n] -> [n] -> [n] -> UGen
- klankSpec_mce :: UGen -> UGen -> UGen -> UGen
- lchoose :: ID m => m -> [UGen] -> UGen
- lchooseM :: UId m => [UGen] -> m UGen
- linExp_b :: UGen -> UGen -> UGen -> UGen
- linExp_u :: UGen -> UGen -> UGen -> UGen
- linLin :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen
- linLin_u :: UGen -> UGen -> UGen -> UGen
- linLin_b :: UGen -> UGen -> UGen -> UGen
- localIn' :: Int -> Rate -> UGen
- makeFadeEnv :: Double -> UGen
- mce_gen :: ID z => (Id -> UGen) -> Int -> z -> UGen
- mce_genM :: Applicative f => f UGen -> Int -> f UGen
- mceN :: UGen -> UGen
- mix :: UGen -> UGen
- mceMean :: UGen -> UGen
- mixN :: Int -> UGen -> UGen
- mceFill :: Integral n => Int -> (n -> UGen) -> UGen
- mceFillInt :: Int -> (Int -> UGen) -> UGen
- listFill_z :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> UGen) -> [UGen]
- mceFill_z :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> UGen) -> UGen
- mixFill :: Integral n => Int -> (n -> UGen) -> UGen
- mixFillInt :: Int -> (Int -> UGen) -> UGen
- mixFillUGen :: Int -> (UGen -> UGen) -> UGen
- mixFill_z :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> UGen) -> UGen
- mixFillM :: (Integral n, Monad m) => Int -> (n -> m UGen) -> m UGen
- useq_z :: (ID z, Enum z) => z -> Int -> (z -> UGen -> UGen) -> UGen -> UGen
- mouseButton' :: Rate -> UGen -> UGen -> UGen -> UGen
- mouseR :: ID a => a -> Rate -> UGen -> UGen -> Warp UGen -> UGen -> UGen
- mouseX' :: Rate -> UGen -> UGen -> Warp UGen -> UGen -> UGen
- mouseY' :: Rate -> UGen -> UGen -> Warp UGen -> UGen -> UGen
- onsetType :: Num a => String -> a
- onsets' :: UGen -> UGen -> UGen -> UGen
- packFFTSpec :: [UGen] -> [UGen] -> UGen
- partConv_calcAccumSize :: Int -> Int -> Int
- pmOsc :: Rate -> UGen -> UGen -> UGen -> UGen -> UGen
- poll' :: UGen -> UGen -> UGen -> UGen -> UGen
- privateIn :: Int -> Rate -> UGen -> UGen
- privateOut :: UGen -> UGen -> UGen
- pvcollect :: UGen -> Int -> (UGen -> UGen -> Int -> (UGen, UGen)) -> Int -> Int -> UGen -> UGen
- pv_calcPVRecSize :: Double -> Int -> Double -> Double -> Int
- rand0 :: ID a => a -> UGen -> UGen
- rand0M :: UId m => UGen -> m UGen
- rand2 :: ID a => a -> UGen -> UGen
- rand2M :: UId m => UGen -> m UGen
- rotateStereo :: UGen -> UGen -> UGen
- runningSumRMS :: UGen -> UGen -> UGen
- selectX :: UGen -> UGen -> UGen
- setBuf' :: UGen -> [UGen] -> UGen -> UGen
- silent :: Int -> UGen
- soundIn :: UGen -> UGen
- splay :: UGen -> UGen -> UGen -> UGen -> Bool -> UGen
- sum_opt :: [UGen] -> UGen
- tap :: Int -> Rate -> UGen -> UGen -> UGen
- tChoose :: ID m => m -> UGen -> UGen -> UGen
- tChooseM :: UId m => UGen -> UGen -> m UGen
- tLine :: Rate -> UGen -> UGen -> UGen -> UGen -> UGen
- tXLine :: Rate -> UGen -> UGen -> UGen -> UGen -> UGen
- triAS :: Int -> UGen -> UGen
- tWChoose :: ID m => m -> UGen -> UGen -> UGen -> UGen -> UGen
- tWChooseM :: UId m => UGen -> UGen -> UGen -> UGen -> m UGen
- unpackFFT :: UGen -> Int -> Int -> Int -> UGen -> [UGen]
- varLag_env :: UGen -> UGen -> Envelope_Curve UGen -> Maybe UGen -> UGen
- wrapOut :: Maybe Double -> UGen -> UGen
- playBufCF :: Int -> UGen -> UGen -> UGen -> UGen -> Loop UGen -> UGen -> Int -> UGen
- osc1 :: Rate -> UGen -> UGen -> DoneAction UGen -> UGen
Documentation
asLocalBuf :: ID i => i -> [UGen] -> UGen Source #
Generate a localBuf and use setBuf to initialise it.
bLowPass4 :: UGen -> UGen -> UGen -> UGen Source #
24db/oct rolloff - 4th order resonant Low Pass Filter
bHiPass4 :: UGen -> UGen -> UGen -> UGen Source #
24db/oct rolloff - 4th order resonant Hi Pass Filter
bufRdN :: Int -> Rate -> UGen -> UGen -> Loop UGen -> UGen Source #
Buffer reader (no interpolation).
bufRdL :: Int -> Rate -> UGen -> UGen -> Loop UGen -> UGen Source #
Buffer reader (linear interpolation).
bufRdC :: Int -> Rate -> UGen -> UGen -> Loop UGen -> UGen Source #
Buffer reader (cubic interpolation).
dynKlang :: Rate -> UGen -> UGen -> UGen -> UGen Source #
Dynamic klang, dynamic sine oscillator bank
dynKlank :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen Source #
Dynamic klank, set of non-fixed resonating filters.
in_exprange :: UGen -> (UGen, UGen) -> UGen Source #
Variant of exprange
with arguments to make writing post-fix nicer.
fft' :: UGen -> UGen -> UGen Source #
Variant FFT constructor with default values for hop size (0.5), window type (0), active status (1) and window size (0).
firstPrivateBus :: UGen Source #
Sum of numInputBuses
and numOutputBuses
.
gateReset :: Num a => a -> a -> a Source #
UGen function to re-trigger an EnvGen envelope. Inputs are gate (as set at EnvGen) and reset. The four state logic is: (1,0)->1 (1,1)->-1 (0,1)->0 (0,0)->0. If the gate input to EnvGen.kr is -1 the envelope ramps to zero in one control period. The reset input sequence 0,1,0 when the gate is open produces (1,-1,1), which resets the envelope.
map (uncurry gateReset) [(1,0),(1,1),(0,1),(0,0)] == [1,-1,0,0]
hilbertFIR :: UGen -> UGen -> UGen Source #
Variant of hilbert
using FFT (with a delay) for better results.
Buffer should be 2048 or 1024.
2048 = better results, more delay.
1024 = less delay, little choppier results.
klanx_spec_f :: (a -> [b]) -> ([b] -> c) -> a -> a -> a -> c Source #
Generalised Klan(kg) specification rule. f unwraps inputs, g/ wraps output.
let r = [220,0.2,0,219,0.1,1,221,0.1,2] in klanx_spec_f id id [220,219,221] [0.2,0.1,0.1] [0,1,2] == r
klangSpec :: [UGen] -> [UGen] -> [UGen] -> UGen Source #
Format frequency, amplitude and decay time data as required for klank.
klangSpec_k :: Real n => [n] -> [n] -> [n] -> UGen Source #
Variant of klangSpec
for non-UGen inputs.
klankSpec :: [UGen] -> [UGen] -> [UGen] -> UGen Source #
Format frequency, amplitude and decay time data as required for klank.
klankSpec_k :: Real n => [n] -> [n] -> [n] -> UGen Source #
Variant for non-UGen inputs.
lchoose :: ID m => m -> [UGen] -> UGen Source #
Randomly select one of a list of UGens (initialisation rate).
linLin :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen Source #
Map from one linear range to another linear range.
makeFadeEnv :: Double -> UGen Source #
Generate an envGen
UGen with fadeTime
and gate
controls.
import Sound.SC3 audition (out 0 (makeFadeEnv 1 * sinOsc AR 440 0 * 0.1)) withSC3 (send (n_set1 (-1) "gate" 0))
listFill_z :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> UGen) -> [UGen] Source #
Construct a list of ID UGens.
mceFill_z :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> UGen) -> UGen Source #
mce
of listFill_z
mixFill_z :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> UGen) -> UGen Source #
Construct and sum a set of ID UGens.
mixFillM :: (Integral n, Monad m) => Int -> (n -> m UGen) -> m UGen Source #
Monad variant on mixFill.
useq_z :: (ID z, Enum z) => z -> Int -> (z -> UGen -> UGen) -> UGen -> UGen Source #
Apply the ID UGen processor f k times in sequence to i, ie. for k=4 f (f (f (f i))).
mouseX' :: Rate -> UGen -> UGen -> Warp UGen -> UGen -> UGen Source #
Variant that randomly traverses the mouseX space.
mouseY' :: Rate -> UGen -> UGen -> Warp UGen -> UGen -> UGen Source #
Variant that randomly traverses the mouseY space.
onsets' :: UGen -> UGen -> UGen -> UGen Source #
Onset detector with default values for minor parameters.
packFFTSpec :: [UGen] -> [UGen] -> UGen Source #
Format magnitude and phase data data as required for packFFT.
partConv_calcAccumSize :: Int -> Int -> Int Source #
Calculate size of accumulation buffer given FFT and IR sizes.
pmOsc :: Rate -> UGen -> UGen -> UGen -> UGen -> UGen Source #
PM oscillator. cf = carrier frequency, mf = modulation frequency, pm = pm-index = 0.0, mp = mod-phase = 0.0
privateIn :: Int -> Rate -> UGen -> UGen Source #
Variant of in'
offset so zero if the first private bus.
pvcollect :: UGen -> Int -> (UGen -> UGen -> Int -> (UGen, UGen)) -> Int -> Int -> UGen -> UGen Source #
Apply function f to each bin of an FFT
chain, f receives
magnitude, phase and index and returns a (magnitude,phase).
pv_calcPVRecSize :: Double -> Int -> Double -> Double -> Int Source #
dur and hop are in seconds, frameSize and sampleRate in frames, though the latter maybe fractional.
pv_calcPVRecSize 4.2832879818594 1024 0.25 48000.0 == 823299
runningSumRMS :: UGen -> UGen -> UGen Source #
RMS variant of runningSum
.
soundIn :: UGen -> UGen Source #
Zero indexed audio input buses. Optimises case of consecutive UGens.
soundIn (mce2 0 1) == in' 2 AR numOutputBuses soundIn (mce2 0 2) == in' 1 AR (numOutputBuses + mce2 0 2)
splay :: UGen -> UGen -> UGen -> UGen -> Bool -> UGen Source #
Pan a set of channels across the stereo field.
input, spread:1, level:1, center:0, levelComp:true
tChoose :: ID m => m -> UGen -> UGen -> UGen Source #
Randomly select one of several inputs on trigger.
tLine :: Rate -> UGen -> UGen -> UGen -> UGen -> UGen Source #
Triggered Line, implemented in terms of EnvGen.
tXLine :: Rate -> UGen -> UGen -> UGen -> UGen -> UGen Source #
Triggered xLine, implemented in terms of EnvGen.
triAS :: Int -> UGen -> UGen Source #
Triangle wave as sum of n sines. For partial n, amplitude is (1 / square n) and phase is pi at every other odd partial.
tWChoose :: ID m => m -> UGen -> UGen -> UGen -> UGen -> UGen Source #
Randomly select one of several inputs on trigger (weighted).
tWChooseM :: UId m => UGen -> UGen -> UGen -> UGen -> m UGen Source #
Randomly select one of several inputs (weighted).
unpackFFT :: UGen -> Int -> Int -> Int -> UGen -> [UGen] Source #
Unpack an FFT chain into separate demand-rate FFT bin streams.
varLag_env :: UGen -> UGen -> Envelope_Curve UGen -> Maybe UGen -> UGen Source #
VarLag in terms of envGen. Note: in SC3 curvature and warp are separate arguments.
wrapOut :: Maybe Double -> UGen -> UGen Source #
If z
isn't a sink node route to an out
node writing to bus
.
If fadeTime
is given multiply by makeFadeEnv
.
import Sound.SC3 audition (wrapOut (Just 1) (sinOsc AR 440 0 * 0.1)) import Sound.OSC withSC3 (sendMessage (n_set1 (-1) "gate" 0))
wslib
playBufCF :: Int -> UGen -> UGen -> UGen -> UGen -> Loop UGen -> UGen -> Int -> UGen Source #
Cross-fading version of playBuf
.