Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Common unit generator graphs.
Synopsis
- asLocalBufId :: ID i => i -> [Ugen] -> Ugen
- asLocalBufM :: Uid m => [Ugen] -> m Ugen
- asLocalBuf :: [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
- chooseId :: ID m => m -> Ugen -> Ugen
- chooseM :: Uid m => Ugen -> m Ugen
- choose :: Ugen -> Ugen
- clearLocalBufId :: ID a => a -> Ugen -> Ugen -> Ugen
- clearLocalBufM :: Uid m => Ugen -> Ugen -> m Ugen
- clearLocalBuf :: Ugen -> Ugen -> Ugen
- dconsId :: ID m => (m, m, m) -> Ugen -> Ugen -> Ugen
- dconsM :: Uid m => Ugen -> Ugen -> m Ugen
- dcons :: Ugen -> Ugen -> 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
- fftAllocId :: ID i => i -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen
- fftAllocM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen
- fftAlloc :: 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
- lchooseId :: ID m => m -> [Ugen] -> Ugen
- lchooseM :: Uid m => [Ugen] -> m Ugen
- lchoose :: [Ugen] -> 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
- mouseButtonRand :: Rate -> Ugen -> Ugen -> Ugen -> Ugen
- mouseRandId :: ID a => a -> Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen
- mouseRandM :: Uid m => Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> m Ugen
- mouseRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen
- mouseXRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen
- mouseYRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen
- onsetType :: Num a => String -> a
- onsetsDefault :: Ugen -> Ugen -> Ugen -> Ugen
- packFFTSpec :: [Ugen] -> [Ugen] -> Ugen
- partConv_calcAccumSize :: Int -> Int -> Int
- pmOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen
- pollExt :: 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
- rand0Id :: ID a => a -> Ugen -> Ugen
- rand0M :: Uid m => Ugen -> m Ugen
- rand0 :: Ugen -> Ugen
- rand2Id :: ID a => a -> Ugen -> Ugen
- rand2M :: Uid m => Ugen -> m Ugen
- rand2 :: Ugen -> 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
- tap :: Int -> Rate -> Ugen -> Ugen -> Ugen
- tChooseId :: ID m => m -> Ugen -> Ugen -> Ugen
- tChooseM :: Uid m => Ugen -> Ugen -> m Ugen
- tChoose :: Ugen -> Ugen -> Ugen
- tLine :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen
- tXLine :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen
- triAS :: Int -> Ugen -> Ugen
- tWChooseId :: ID m => m -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen
- tWChooseM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen
- tWChoose :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen
- unpackFFT :: Ugen -> Int -> Int -> Int -> Ugen -> [Ugen]
- varLag_env :: Ugen -> Ugen -> Envelope_Curve Ugen -> Maybe Ugen -> Ugen
- whiteNoiseMN :: Uid m => Int -> Rate -> m Ugen
- whiteNoiseN :: Int -> Rate -> 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
asLocalBufId :: ID i => i -> [Ugen] -> Ugen Source #
Generate a localBuf and use setBuf to initialise it.
asLocalBuf :: [Ugen] -> Ugen Source #
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.
lchooseId :: 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))
mouseRandId :: ID a => a -> Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen Source #
Randomised mouse Ugen (see also mouseX'
and mouseY'
).
mouseXRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen Source #
Variant that randomly traverses the mouseX space.
mouseYRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen Source #
Variant that randomly traverses the mouseY space.
onsetsDefault :: 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
rand2Id :: ID a => a -> Ugen -> Ugen Source #
rand
with left edge set to negative n.
Note rand2 is also a UnaryOp Ugen, however hsc3 does not store Ids for operators.
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
tChooseId :: 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.
tWChooseId :: 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
.