packages feed

hsc3 0.3 → 0.4

raw patch · 99 files changed

+1030/−622 lines, 99 filesdep +processdep ~hoscPVP ok

version bump matches the API change (PVP)

Dependencies added: process

Dependency ranges changed: hosc

API changes (from Hackage documentation)

- Sound.SC3.UGen.Composite: dcons :: (UId m) => UGen -> UGen -> m UGen
- Sound.SC3.UGen.Composite: tChoose :: (UId m) => UGen -> UGen -> m UGen
- Sound.SC3.UGen.Composite: twChoose :: (UId m) => UGen -> UGen -> UGen -> UGen -> m UGen
+ Sound.SC3.Server.NRT: putNRT :: Handle -> [OSC] -> IO ()
+ Sound.SC3.Server.Process: EventHandler :: (String -> IO ()) -> (String -> IO ()) -> (t -> IO ()) -> EventHandler t
+ Sound.SC3.Server.Process: ExtremelyVerbose :: Verbosity
+ Sound.SC3.Server.Process: NRTOptions :: Maybe FilePath -> Maybe FilePath -> FilePath -> Int -> String -> String -> NRTOptions
+ Sound.SC3.Server.Process: Normal :: Verbosity
+ Sound.SC3.Server.Process: Quiet :: Verbosity
+ Sound.SC3.Server.Process: RTOptions :: Int -> Int -> Bool -> Int -> Maybe String -> Maybe String -> Int -> Int -> Maybe Int -> Maybe Int -> RTOptions t
+ Sound.SC3.Server.Process: ServerOptions :: FilePath -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Bool -> Verbosity -> ServerOptions
+ Sound.SC3.Server.Process: Silent :: Verbosity
+ Sound.SC3.Server.Process: Verbose :: Verbosity
+ Sound.SC3.Server.Process: VeryVerbose :: Verbosity
+ Sound.SC3.Server.Process: blockSize :: ServerOptions -> Int
+ Sound.SC3.Server.Process: commandFilePath :: NRTOptions -> Maybe FilePath
+ Sound.SC3.Server.Process: data EventHandler t
+ Sound.SC3.Server.Process: data NRTOptions
+ Sound.SC3.Server.Process: data RTOptions t
+ Sound.SC3.Server.Process: data ServerOptions
+ Sound.SC3.Server.Process: data Verbosity
+ Sound.SC3.Server.Process: defaultEventHandler :: EventHandler t
+ Sound.SC3.Server.Process: defaultNRTOptions :: NRTOptions
+ Sound.SC3.Server.Process: defaultRTOptionsTCP :: RTOptions TCP
+ Sound.SC3.Server.Process: defaultRTOptionsUDP :: RTOptions UDP
+ Sound.SC3.Server.Process: defaultServerOptions :: ServerOptions
+ Sound.SC3.Server.Process: hardwareBufferSize :: RTOptions t -> Int
+ Sound.SC3.Server.Process: hardwareDeviceName :: RTOptions t -> Maybe String
+ Sound.SC3.Server.Process: hardwareSampleRate :: RTOptions t -> Int
+ Sound.SC3.Server.Process: inputFilePath :: NRTOptions -> Maybe FilePath
+ Sound.SC3.Server.Process: inputStreamsEnabled :: RTOptions t -> Maybe Int
+ Sound.SC3.Server.Process: instance CommandLine (RTOptions t)
+ Sound.SC3.Server.Process: instance CommandLine NRTOptions
+ Sound.SC3.Server.Process: instance CommandLine ServerOptions
+ Sound.SC3.Server.Process: instance Enum Verbosity
+ Sound.SC3.Server.Process: instance Eq (RTOptions t)
+ Sound.SC3.Server.Process: instance Eq NRTOptions
+ Sound.SC3.Server.Process: instance Eq ServerOptions
+ Sound.SC3.Server.Process: instance Eq Verbosity
+ Sound.SC3.Server.Process: instance OpenTransport TCP
+ Sound.SC3.Server.Process: instance OpenTransport UDP
+ Sound.SC3.Server.Process: instance Option Int
+ Sound.SC3.Server.Process: instance Option String
+ Sound.SC3.Server.Process: instance Show (RTOptions t)
+ Sound.SC3.Server.Process: instance Show NRTOptions
+ Sound.SC3.Server.Process: instance Show ServerOptions
+ Sound.SC3.Server.Process: instance Show Verbosity
+ Sound.SC3.Server.Process: loadSynthDefs :: ServerOptions -> Bool
+ Sound.SC3.Server.Process: maxNumberOfLogins :: RTOptions t -> Int
+ Sound.SC3.Server.Process: maxNumberOfNodes :: ServerOptions -> Int
+ Sound.SC3.Server.Process: maxNumberOfSynthDefs :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfAudioBusChannels :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfControlBusChannels :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfInputBusChannels :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfOutputBusChannels :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfRandomSeeds :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfSampleBuffers :: ServerOptions -> Int
+ Sound.SC3.Server.Process: numberOfWireBuffers :: ServerOptions -> Int
+ Sound.SC3.Server.Process: onBoot :: EventHandler t -> t -> IO ()
+ Sound.SC3.Server.Process: onPutError :: EventHandler t -> String -> IO ()
+ Sound.SC3.Server.Process: onPutString :: EventHandler t -> String -> IO ()
+ Sound.SC3.Server.Process: outputFilePath :: NRTOptions -> FilePath
+ Sound.SC3.Server.Process: outputHeaderFormat :: NRTOptions -> String
+ Sound.SC3.Server.Process: outputSampleFormat :: NRTOptions -> String
+ Sound.SC3.Server.Process: outputSampleRate :: NRTOptions -> Int
+ Sound.SC3.Server.Process: outputStreamsEnabled :: RTOptions t -> Maybe Int
+ Sound.SC3.Server.Process: realTimeMemorySize :: ServerOptions -> Int
+ Sound.SC3.Server.Process: serverProgram :: ServerOptions -> FilePath
+ Sound.SC3.Server.Process: sessionPassword :: RTOptions t -> Maybe String
+ Sound.SC3.Server.Process: tcpPortNumber :: RTOptions t -> Int
+ Sound.SC3.Server.Process: udpPortNumber :: RTOptions t -> Int
+ Sound.SC3.Server.Process: useZeroconf :: RTOptions t -> Bool
+ Sound.SC3.Server.Process: verbosity :: ServerOptions -> Verbosity
+ Sound.SC3.Server.Process: withNRT :: ServerOptions -> NRTOptions -> EventHandler Handle -> IO ExitCode
+ Sound.SC3.Server.Process: withSynth :: (Transport t, OpenTransport t) => ServerOptions -> RTOptions t -> EventHandler t -> IO ExitCode
+ Sound.SC3.UGen.Composite.Monadic: dcons :: (UId m) => UGen -> UGen -> m UGen
+ Sound.SC3.UGen.Composite.Monadic: tChoose :: (UId m) => UGen -> UGen -> m UGen
+ Sound.SC3.UGen.Composite.Monadic: twChoose :: (UId m) => UGen -> UGen -> UGen -> UGen -> m UGen
+ Sound.SC3.UGen.Record.Pitch: Args :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> Args
+ Sound.SC3.UGen.Record.Pitch: ampThreshold :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: data Args
+ Sound.SC3.UGen.Record.Pitch: defaults :: Args
+ Sound.SC3.UGen.Record.Pitch: downSample :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: execFreq :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: initFreq :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: maxBinsPerOctave :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: maxFreq :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: median :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: minFreq :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: peakThreshold :: Args -> UGen
+ Sound.SC3.UGen.Record.Pitch: pitch :: Args -> UGen -> UGen

Files

Help/Graphs/aleatoric-quartet.lhs view
@@ -1,22 +1,22 @@ aleatoric quartet (jmcc)  > let { amp = 0.07->     ; density = mouseX KR 0.01 1 Linear 0.1+>     ; density = mouseX kr 0.01 1 Linear 0.1 >     ; dmul = recip density * 0.5 * amp >     ; dadd = amp - dmul >     ; chain n f = foldl (>=>) return (replicate n f)->     ; rapf i = do { r <- clone 2 (rand 0 0.05)+>     ; rapf i = do { r <- clone 2 (M.rand 0 0.05) >                   ; return (allpassN i 0.05 r 1) }->     ; mk_f = do { i0 <- iRand 0 2+>     ; mk_f = do { i0 <- M.iRand 0 2 >                 ; let r0 = select i0 (mce [1, 0.5, 0.25])->                   in do { r1 <- rand (-30) 30->                         ; n0 <- lfNoise0 KR r0+>                   in do { r1 <- M.rand (-30) 30+>                         ; n0 <- M.lfNoise0 kr r0 >                         ; let m = lag (roundE (n0 * 7 + 66 + r1) 1) 0.2 >                           in return (midiCPS m) } }->     ; mk_s = do { f <- fmap recip mk_f->                 ; r <- rand (-1) 1->                 ; x <- do { n0 <- pinkNoise AR->                           ; n1 <- lfNoise1 KR 8+>     ; mk_s = do { f <- liftM recip mk_f+>                 ; r <- M.rand (-1) 1+>                 ; x <- do { n0 <- M.pinkNoise ar+>                           ; n1 <- M.lfNoise1 kr 8 >                           ; return (n0 * max 0 (n1 * dmul + dadd)) } >                 ; return (pan2 (combL x 0.02 f 3) r 1) } } > in do { g <- chain 5 rapf =<< fmap sum (replicateM 4 mk_s)
Help/Graphs/analog-bubbles.lhs view
@@ -1,8 +1,8 @@ analog bubbles (jmcc) -> let { o = lfSaw KR (mce2 8 7.23) 0 * 3 + 80->     ; f = lfSaw KR 0.4 0 * 24 + o->     ; s = sinOsc AR (midiCPS f) 0 * 0.04 }+> let { o = lfSaw kr (mce2 8 7.23) 0 * 3 + 80+>     ; f = lfSaw kr 0.4 0 * 24 + o+>     ; s = sinOsc ar (midiCPS f) 0 * 0.04 } > in audition (out 0 (combN s 0.2 0.2 4))  { var o = LFSaw.kr([8, 7.23], 0, 3, 80)
Help/Graphs/babbling-brook.lhs view
@@ -1,7 +1,7 @@ babbling brook (jmcc) -> let b f m a g = do { n1 <- brownNoise AR->                    ; n2 <- brownNoise AR+> let b f m a g = do { n1 <- M.brownNoise ar+>                    ; n2 <- M.brownNoise ar >                    ; let n3 = lpf n2 f * m + a >                      in return (rhpf (onePole n1 0.99) n3 0.03 * g) } > in do { x <- clone 2 (b 14 400 500 0.006)
Help/Graphs/bit-reduction.lhs view
@@ -2,11 +2,11 @@  sample rate decrease -> do { f <- lfNoise2 KR 8->    ; nh <- lfNoise2 KR 3->    ; let { src = blip AR (f * 200 + 300) (nh * 10 + 20)->          ; sr = mouseX KR 1000 (sampleRate * 0.1) Exponential 0.2 }->      in audition (out 0 (latch src (impulse AR sr 0))) }+> do { f <- M.lfNoise2 kr 8+>    ; nh <- M.lfNoise2 kr 3+>    ; let { src = blip ar (f * 200 + 300) (nh * 10 + 20)+>          ; sr = mouseX kr 1000 (sampleRate * 0.1) Exponential 0.2 }+>      in audition (out 0 (latch src (impulse ar sr 0))) }  { var f = LFNoise2.kr(8) ; var nh = LFNoise2.kr(3)@@ -16,12 +16,12 @@  bit rate decrease -> do { f <- lfNoise2 KR 8->    ; nh <- lfNoise2 KR 3->    ; let { src = blip AR (f * 200 + 300) (nh * 10 + 20)->          ; sr = mouseX KR 1000 (sampleRate * 0.1) Exponential 0.2->          ; bit_sz = mouseY KR 1 24 Exponential 0.2->          ; down_sample = latch src (impulse AR sr 0)+> do { f <- M.lfNoise2 kr 8+>    ; nh <- M.lfNoise2 kr 3+>    ; let { src = blip ar (f * 200 + 300) (nh * 10 + 20)+>          ; sr = mouseX kr 1000 (sampleRate * 0.1) Exponential 0.2+>          ; bit_sz = mouseY kr 1 24 Exponential 0.2+>          ; down_sample = latch src (impulse ar sr 0) >          ; bit_redux = roundE down_sample (0.5 ** bit_sz) } >      in audition (out 0 (mce2 down_sample bit_redux)) } 
Help/Graphs/bottle.lhs view
@@ -1,15 +1,15 @@ bottle (sc) -> do { freq <- rand 220 880->    ; wn <- whiteNoise ar->    ; pn <- pinkNoise ar+> do { freq <- M.rand 220 880+>    ; wn <- M.whiteNoise ar+>    ; pn <- M.pinkNoise ar >    ; let { chain n f = foldl (>=>) return (replicate n f) >          ; perc = envPerc 0.1 0.6 >          ; ex = envGen kr 1 1 0 1 DoNothing perc * wn * 0.02 >          ; flute = ringz ex freq 0.3 >          ; r = resonz pn (5 + (freq / 2)) 0.1 >          ; breath = envGen kr 1 1 0 1 DoNothing perc * r->          ; rapf i = do { x <- linRand 0.001 0.1 (-1)+>          ; rapf i = do { x <- M.linRand 0.001 0.1 (-1) >                        ; return (i + allpassN i 0.1 x 1.0 * 0.5) } >          ; cls i = let { en = replicate 3 (EnvNum (-4)) >                        ; l = envLinen 0.01 3.0 1.0 1 en
Help/Graphs/bowed-string.lhs view
@@ -5,12 +5,12 @@ >     ; root = 5 >     ; scale = map (+ root) [0, 2, 4, 5, 7, 9, 11]  >     ; oct = [24, 36, 48, 60, 72, 84] }-> in do { n0 <- clone 2 (brownNoise AR)->       ; r0 <- expRand 0.125 0.5->       ; r1 <- rand 0.7 0.9->       ; r2 <- replicateM 12 (rand 1.0 3.0)->       ; f <- fmap midiCPS (liftM2 (+) (choose scale) (choose oct))->       ; n1 <- lfNoise1 KR r0+> in do { n0 <- clone 2 (M.brownNoise ar)+>       ; r0 <- M.expRand 0.125 0.5+>       ; r1 <- M.rand 0.7 0.9+>       ; r2 <- replicateM 12 (M.rand 1.0 3.0)+>       ; f <- liftM midiCPS (liftM2 (+) (choose scale) (choose oct))+>       ; n1 <- M.lfNoise1 kr r0 >       ; let { x = n0 * 0.007 * max 0 (n1 * 0.6 + 0.4) >             ; geom n i z = take n (iterate (* z) i) >             ; iota n i z = take n (iterate (+ z) i)
Help/Graphs/ccomb.lhs view
@@ -3,13 +3,13 @@ > let { rng l r i = linLin i (-1) 1 l r >     ; lwr = 48 >     ; flwr = midiCPS lwr->     ; spart t = do { n <- liftM (rng lwr 72.0) (lfNoise2 KR 0.1)->                    ; e <- liftM (decay2 t 0.01) (tRand 0.05 0.75 t)->                    ; x <- liftM (* e) (whiteNoise AR)->                    ; m <- lfNoise2 KR 0.1+>     ; spart t = do { n <- liftM (rng lwr 72.0) (M.lfNoise2 kr 0.1)+>                    ; e <- liftM (decay2 t 0.01) (M.tRand 0.05 0.75 t)+>                    ; x <- liftM (* e) (M.whiteNoise ar)+>                    ; m <- M.lfNoise2 kr 0.1 >                    ; let f = lag (midiCPS n) 0.25 >                      in return (combC x (recip flwr) (recip f) (rng 1 8 m)) } }-> in do { t <- dust KR (mce2 0.75 0.35)+> in do { t <- M.dust kr (mce2 0.75 0.35) >       ; audition . (out 0) . (* 0.1) . sum =<< replicateM 12 (spart t) }  { var lwr = 48
Help/Graphs/chain-saw.lhs view
@@ -11,20 +11,20 @@ >     ; mceProduct = mceEdit (\l -> [product l]) >     ; clipu s = clip2 s 1 >     ; dup a = mce2 a a->     ; f s1 = do { xr <- liftM dup (expRand 0.1 2)->                 ; n1 <- lfNoise1 KR xr->                 ; n2 <- lfNoise1 KR xr->                 ; n3 <- lfNoise1 KR xr+>     ; f s1 = do { xr <- liftM dup (M.expRand 0.1 2)+>                 ; n1 <- M.lfNoise1 kr xr+>                 ; n2 <- M.lfNoise1 kr xr+>                 ; n3 <- M.lfNoise1 kr xr >                 ; f1 <- coin 0.6 (exprange n1 0.01 10) (exprange n2 10 50) >                 ; s2 <- coin 0.5 (1 - s1) (mceReverse s1) >                 ; let { f2 = linExp s1 (-1) 1 f1 (f1 * exprange n3 2 10)->                       ; u1 = lfSaw KR f2 0 ->                       ; u2 = lfSaw KR (f1 * 0.1) 0 * 0.1 + 1 }+>                       ; u1 = lfSaw kr f2 0 +>                       ; u2 = lfSaw kr (f1 * 0.1) 0 * 0.1 + 1 } >                   in return . clipu =<< coin 0.5 (u1 * s2) (u1 * u2) }->     ; inp = lfSaw KR (0.2 * mce2 1 1.1) 0+>     ; inp = lfSaw kr (0.2 * mce2 1 1.1) 0 >     ; b_freq = mce [70, 800, 9000, 5242] }-> in do { ff <- chain 16 f inp->       ; let { c_saw = mceProduct (saw AR (exprange ff 6 11000))+> in do { ff <- chain 8 f inp+>       ; let { c_saw = mceProduct (saw ar (exprange ff 6 11000)) >             ; b_saw = dup (mix (bpf c_saw b_freq 0.2)) } >         in audition (out 0 (b_saw * 0.3)) } 
Help/Graphs/chrd.lhs view
@@ -1,17 +1,17 @@ chrd (rd) -> let chrd = do { r0 <- rand 0.05 0.5->               ; [r1, r2] <- replicateM 2 (rand (-1) 1)->               ; r3 <- rand 0.15 0.35->               ; r4 <- rand 0.005 0.01+> let chrd = do { r0 <- M.rand 0.05 0.5+>               ; [r1, r2] <- replicateM 2 (M.rand (-1) 1)+>               ; r3 <- M.rand 0.15 0.35+>               ; r4 <- M.rand 0.005 0.01 >               ; let { m = mce [60, 65, 72, 77, 79, 84] >                     ; ds = 3 >                     ; d = mce (map (* ds) [5, 4, 5, 7, 4, 5])->                     ; f = midiCPS (xLine KR m (m + r0) d DoNothing)+>                     ; f = midiCPS (xLine kr m (m + r0) d DoNothing) >                     ; z = envTrapezoid 0 r3 d r4->                     ; e = envGen KR 1 1 0 1 DoNothing z->                     ; p = xLine KR r1 r2 d DoNothing->                     ; o = fSinOsc AR f 0 }+>                     ; e = envGen kr 1 1 0 1 DoNothing z+>                     ; p = xLine kr r1 r2 d DoNothing+>                     ; o = fSinOsc ar f 0 } >                 in return (mix (pan2 o p e)) } > in audition . out 0 . mix =<< clone 9 chrd 
Help/Graphs/cricket.lhs view
@@ -1,13 +1,13 @@ cricket (rd) -> do { r1 <- clone 2 (rand 10 13)->    ; r2 <- clone 2 (rand 10 13)->    ; r3 <- clone 2 (rand 4 7)->    ; let { t = impulse KR 0.7 0->          ; e = decay2 (impulse KR r1 0) 0.001 0.005->          ; f = sinOsc KR r2 0 * e * r3 }->      in do { r4 <- clone 2 (tRand 2220 2227 t)->            ; audition (out 0 (sinOsc AR r4 0 * f * 0.25)) } }+> do { r1 <- clone 2 (M.rand 10 13)+>    ; r2 <- clone 2 (M.rand 10 13)+>    ; r3 <- clone 2 (M.rand 4 7)+>    ; let { t = impulse kr 0.7 0+>          ; e = decay2 (impulse kr r1 0) 0.001 0.005+>          ; f = sinOsc kr r2 0 * e * r3 }+>      in do { r4 <- clone 2 (M.tRand 2220 2227 t)+>            ; audition (out 0 (sinOsc ar r4 0 * f * 0.25)) } }  { var r1 = Array.fill(2, { Rand.new(10, 13) }) ; var r2 = Array.fill(2, { Rand.new(10, 13) })
Help/Graphs/crotale.lhs view
@@ -150,19 +150,15 @@ >                   , 11.498942375183105 >                   , 10.465788841247559 >                   , 24.93169593811035 ] )->     ; pinkNoise' = Sound.SC3.UGen.Base.pinkNoise->     ; tRand' = Sound.SC3.UGen.Base.tRand->     ; tiRand' = Sound.SC3.UGen.Base.tiRand->     ; dust' = Sound.SC3.UGen.Base.dust >     ; (cf, ca, cd) = crotale >     ; ps = mce [-12, -5, 0, 2, 4, 5, 7, 12]->     ; n = pinkNoise' (uid 0) AR->     ; t = dust' (uid 0) KR 3->     ; fs = select (tiRand' (uid 0) 0 7 t) ps->     ; g = tRand' (uid 0) 0 1 t->     ; fo = tRand' (uid 1) 0 1 t->     ; ds = tRand' (uid 2) 2 7 t->     ; p = tRand' (uid 3) (-1) 1 t+>     ; n = B.pinkNoise (uid 0) ar+>     ; t = B.dust (uid 0) kr 3+>     ; fs = select (B.tiRand (uid 0) 0 7 t) ps+>     ; g = B.tRand (uid 0) 0 1 t+>     ; fo = B.tRand (uid 1) 0 1 t+>     ; ds = B.tRand (uid 2) 2 7 t+>     ; p = B.tRand (uid 3) (-1) 1 t >     ; s = decay2 t 0.06 0.01 * n * g >     ; k = dynKlank s (midiRatio fs) fo ds (klankSpec cf ca (map recip cd)) } > in audition (out 0 (pan2 k p 1))
Help/Graphs/cut-outs.lhs view
@@ -1,15 +1,15 @@ cut-outs (rd) -> let { t = impulse AR 22 0 * (sinOsc KR 0.5 0 + 1)->     ; x = mouseX KR 0.005 0.12 Exponential 0.1->     ; y = mouseY KR 0.01 0.52 Exponential 0.1 ->     ; n = do { n1 <- lfNoise0 KR 2->              ; n2 <- coinGate (0.05 + n1 + y * 0.4 + t * 0.5) (t * 0.5)->              ; n3 <- tExpRand (mce2 500 900) 1600 t+> let { t = impulse ar 22 0 * (sinOsc kr 0.5 0 + 1)+>     ; x = mouseX kr 0.005 0.12 Exponential 0.1+>     ; y = mouseY kr 0.01 0.52 Exponential 0.1 +>     ; n = do { n1 <- M.lfNoise0 kr 2+>              ; n2 <- M.coinGate (0.05 + n1 + y * 0.4 + t * 0.5) (t * 0.5)+>              ; n3 <- M.tExpRand (mce2 500 900) 1600 t >              ; return (ringz n2 n3 x) } } > in do { s <- liftM sum (replicateM 3 n)->       ; b <- tRand 0 1 =<< dust KR 8->       ; audition (mrg [out 0 b, out 0 (clip2 s (in' 1 KR 0) * 0.25)]) }+>       ; b <- M.tRand 0 1 =<< dust kr 8+>       ; audition (mrg [out 0 b, out 0 (clip2 s (in' 1 kr 0) * 0.25)]) }  { var t = Impulse.ar(22, 0) * (SinOsc.kr(0.5, 0) + 1) ; var x = MouseX.kr(0.005, 0.12, 'exponential', 0.1)
Help/Graphs/cymbalism.lhs view
@@ -1,15 +1,15 @@ cymbalism (jmcc)  > let p = 15-> in do { f1 <- rand 500 2500->       ; f2 <- rand 0 8000->       ; let y = do { f <- replicateM p (rand f1 (f1 + f2))->                    ; rt <- replicateM p (rand 1 5)+> in do { f1 <- M.rand 500 2500+>       ; f2 <- M.rand 0 8000+>       ; let y = do { f <- replicateM p (M.rand f1 (f1 + f2))+>                    ; rt <- replicateM p (M.rand 1 5) >                    ; return (klankSpec f (replicate p 1) rt) } >         in do { z <- clone 2 y->               ; n <- liftM (* 0.03) (whiteNoise AR)->               ; tf <- rand 0.5 3.5->               ; let { t = impulse AR tf 0+>               ; n <- liftM (* 0.03) (M.whiteNoise ar)+>               ; tf <- M.rand 0.5 3.5+>               ; let { t = impulse ar tf 0 >                     ; s = decay t 0.004 * n >                     ; k = klank s 1 0 1 (mceTranspose z) } >                 in audition (out 0 k) } }
Help/Graphs/deep-sea.lhs view
@@ -1,21 +1,18 @@ deep sea (jrhb) -> let { rand' = Sound.SC3.UGen.Base.rand->     ; lfNoise1' = Sound.SC3.UGen.Base.lfNoise1->     ; lfNoise2' = Sound.SC3.UGen.Base.lfNoise2->     ; range s l r = let m = (r - l) * 0.5 in mulAdd s m (m + l)+> let { range s l r = let m = (r - l) * 0.5 in mulAdd s m (m + l) >     ; amp = 1 >     ; pan = 0 >     ; variation = 0.9->     ; n = rand' (uid 0) 7 46->     ; dt1 = 25.0 + rand' (uid 1) (-1.7) 1.7->     ; dt2 = (dt1 + lfNoise2' (uid 0) KR 2) * variation * 0.001->     ; freq = 901 + rand' (uid 2) 0 65->     ; t = impulse AR (recip dt2) 0 * 100+>     ; n = B.rand (uid 0) 7 46+>     ; dt1 = 25.0 + B.rand (uid 1) (-1.7) 1.7+>     ; dt2 = (dt1 + B.lfNoise2 (uid 0) kr 2) * variation * 0.001+>     ; freq = 901 + B.rand (uid 2) 0 65+>     ; t = impulse ar (recip dt2) 0 * 100 >     ; count = pulseCount t 0 >     ; mul = count <* n >     ; u1 = bpf (mul * t) freq 1 * 0.1->     ; freq2 = freq * ((count `modE` range (lfNoise1' (uid 0) KR 1) 2 20) + 1)+>     ; freq2 = freq * ((count `modE` range (B.lfNoise1 (uid 0) kr 1) 2 20) + 1) >     ; u2 = bpf u1 freq2 1 * 0.2 } > in audition (mrg [ detectSilence u2 0.0001 0.2 RemoveSynth >                  , out 0 (pan2 u2 pan (amp * 10)) ])
Help/Graphs/demanding-studies.lhs view
@@ -1,13 +1,13 @@ demanding studies (jmcc) -> do { s1 <- drand dinf (mce [72, 75, 79, 82])->    ; s2 <- drand 1 (mce [82, 84, 86])->    ; s3 <- dseq dinf (mce [72, 75, 79, s2])->    ; let { x = mouseX KR 5 13 Linear 0.2->          ; tr = impulse KR x 0+> do { s1 <- M.drand dinf (mce [72, 75, 79, 82])+>    ; s2 <- M.drand 1 (mce [82, 84, 86])+>    ; s3 <- M.dseq dinf (mce [72, 75, 79, s2])+>    ; let { x = mouseX kr 5 13 Linear 0.2+>          ; tr = impulse kr x 0 >          ; f = demand tr 0 (mce [midiCPS (s1 - 12), midiCPS s3])->          ; o1 = sinOsc AR (f + mce2 0 0.7) 0->          ; o2 = saw AR (f + mce2 0 0.7) * 0.3+>          ; o1 = sinOsc ar (f + mce2 0 0.7) 0+>          ; o2 = saw ar (f + mce2 0 0.7) * 0.3 >          ; o3 = cubed (distort (log (distort (o1 + o2)))) } >      in audition (out 0 (o3 * 0.1)) } 
Help/Graphs/dial-history.lhs view
@@ -5,22 +5,22 @@ >     ; range s l r = linLin s 0 1 l r >     ; mce_r = mce . map mce  >     ; mce_mrg = mrg . mceProxies }-> in do { n <- dwhite dinf 7 12->       ; w <- dwhite 1 2 7->       ; b <- dbrown n 0.1 0.2 0.01->       ; rate <- dseq dinf (mce2 w b)->       ; q <- dseq dinf (mce [1..10])->       ; g1 <- grayNoise AR->       ; g2 <- grayNoise AR->       ; d <- lfdNoise3 KR 0.5->       ; let { tr = trig (tDuty KR rate 0 DoNothing q 1) 0.09+> in do { n <- M.dwhite dinf 7 12+>       ; w <- M.dwhite 1 2 7+>       ; b <- M.dbrown n 0.1 0.2 0.01+>       ; rate <- M.dseq dinf (mce2 w b)+>       ; q <- M.dseq dinf (mce [1..10])+>       ; g1 <- M.grayNoise ar+>       ; g2 <- M.grayNoise ar+>       ; d <- M.lfdNoise3 kr 0.5+>       ; let { tr = trig (tDuty kr rate 0 DoNothing q 1) 0.09 >             ; pat = latch tr tr->             ; x = mouseX KR 0 1 Linear 0.2+>             ; x = mouseX kr 0 1 Linear 0.2 >             ; h = hasher (pat * x) >             ; which = trunc (range h 0 (constant (length numbers))) 1 >             ; both = select which (mce_r numbers) >             ; dial = select both (mce_r (transpose mfv))->             ; sig = sinOsc AR dial 0 * 0.05 * tr+>             ; sig = sinOsc ar dial 0 * 0.05 * tr >             ; dsig = delayN sig 0.2 (range d 0 0.01) >             ; hiss = g1 * 0.01 + hpf (g2 * 0.02) 3000 } >         in audition (out 0 (dsig + hiss)) }
Help/Graphs/diffraction.lhs view
@@ -2,19 +2,19 @@  > let { p = let { x = mouseX kr 0.001 0.02 Exponential 0.1 >               ; y = mouseY kr 120 400 Exponential 0.1 }->           in do { f <- fmap (* mce2 32 64) (lfNoise0 kr 4)->                 ; w <- fmap (* x) (lfNoise0 kr 32)->                 ; z <- fmap (* 0.1) (lfNoise0 kr 2)->                 ; m <- lfNoise0 kr 6+>           in do { f <- liftM (* mce2 32 64) (M.lfNoise0 kr 4)+>                 ; w <- liftM (* x) (M.lfNoise0 kr 32)+>                 ; z <- liftM (* 0.1) (M.lfNoise0 kr 2)+>                 ; m <- M.lfNoise0 kr 6 >                 ; let s = pulse ar f w >                   in return (resonz s (y + z) (m * 0.4 + 0.8) * 0.5) }->     ; q = do { n <- lfNoise0 kr 128+>     ; q = do { n <- M.lfNoise0 kr 128 >              ; s <- p >              ; return (combN s 0.2 (n * 0.1 + 0.1) 3) } >     ; r = let { x = mouseX kr 0.75 1.25 Exponential 0.1 >               ; y = mouseY kr 0.25 1 Exponential 0.1->               ; f _ = do { fr <- fmap (* x) (rand 50 59)->                          ; am <- fmap (* y) (rand 0.04 0.16)+>               ; f _ = do { fr <- liftM (* x) (M.rand 50 59)+>                          ; am <- liftM (* y) (M.rand 0.04 0.16) >                          ; return (sinOsc ar fr 0 * am) } } >           in liftM2 mce2 (mixFillM 16 f) (mixFillM 12 f) } > in audition . (out 0) . sum =<< sequence [p, q, r]
Help/Graphs/discretion.lhs view
@@ -1,12 +1,12 @@ discretion (rd) -> let { mkls bp t = envGen KR 1 1 0 1 RemoveSynth (envCoord bp t 1 EnvLin)->     ; part = do { f1 <- clone 2 (rand 50 55)->                 ; f2 <- clone 2 (rand 50 65)->                 ; f3 <- clone 2 (rand 50 55)->                 ; a <- clone 2 (rand 0.01 0.035)+> let { mkls bp t = envGen kr 1 1 0 1 RemoveSynth (envCoord bp t 1 EnvLin)+>     ; part = do { f1 <- clone 2 (M.rand 50 55)+>                 ; f2 <- clone 2 (M.rand 50 65)+>                 ; f3 <- clone 2 (M.rand 50 55)+>                 ; a <- clone 2 (M.rand 0.01 0.035) >                 ; let { t = 21 >                       ; f_ = mkls [(0, f1), (0.33, f2), (1, f3)] t >                       ; a_ = mkls [(0, 0), (0.33, a), (1, 0)] t }->                   in return (saw AR f_ * a_) } }+>                   in return (saw ar f_ * a_) } } > in audition . out 0 . mix =<< clone 8 part
Help/Graphs/drummer.lhs view
@@ -1,13 +1,13 @@ drummer (thor magnusson) -> do { n <- whiteNoise AR+> do { n <- M.whiteNoise ar >    ; let { tempo = 4 >          ; dup a = mce2 a a ->          ; tr = impulse AR tempo 0+>          ; tr = impulse ar tempo 0 >          ; tr_2 = pulseDivider tr 4 2 >          ; tr_4 = pulseDivider tr 4 0 >          ; snare = n * decay2 tr_2 0.005 0.5->          ; bass = sinOsc AR 60 0 * decay2 tr_4 0.005 0.5+>          ; bass = sinOsc ar 60 0 * decay2 tr_4 0.005 0.5 >          ; hihat = hpf n 10000 * decay2 tr 0.005 0.5 } >      in audition (out 0 (pan2 (snare + bass + hihat) 0 0.4)) } 
Help/Graphs/e-lamell.lhs view
@@ -9,13 +9,13 @@ >     ; threadPause :: Double -> IO () >     ; threadPause t = when (t>0) (threadDelay (floor (t * 1e6))) >     ; sendSynth fd n u = async fd (d_recv (synthdef n u))->     ; e_lamell = let { ctl s v = Control KR s v+>     ; e_lamell = let { ctl s v = Control kr s v >                      ; f = ctl "f" 440 >                      ; n = ctl "n" 12 >                      ; d = ctl "d" 0.1 >                      ; l = ctl "l" 0 >                      ; a = ctl "a" 1 }->                  in do { t <- tChoose 1 (mce2 1 32)+>                  in do { t <- M.tChoose 1 (mce2 1 32) >                        ; let { h = line ar n t d DoNothing >                              ; s = blip ar f h >                              ; e_d = envPerc 0.005 d
Help/Graphs/eggcrate.lhs view
@@ -4,12 +4,12 @@ >     ; sinu = sin . (* pi) >     ; eggcrate u v = cosu u * sinu v >     ; p = mce [64, 72, 96, 128, 256, 6400, 7200, 8400, 9600] }-> in do { [x, y] <- replicateM 2 (brownNoise KR)->       ; t <- dust KR 2.4->       ; [f0, f1] <- replicateM 2 (tChoose t p)+> in do { [x, y] <- replicateM 2 (M.brownNoise kr)+>       ; t <- M.dust kr 2.4+>       ; [f0, f1] <- replicateM 2 (M.tChoose t p) >       ; let { f = linLin (eggcrate x y) (-1) 1 f0 f1 >             ; a = linLin x (-1) 1 0 0.1 }->         in audition (out 0 (pan2 (mix (sinOsc AR f 0)) y a)) }+>         in audition (out 0 (pan2 (mix (sinOsc ar f 0)) y a)) }  { var eggcrate = { arg u, v                  ; (u * pi).cos * (v * pi).sin }
Help/Graphs/f-lets.lhs view
@@ -2,15 +2,15 @@  > let { f_let t g j n f =  >       let pd = pulseDivider t j 0->       in do { r0 <- tiRand (mce2 2 1) n pd->             ; r1 <- tRand 0.01 0.04 pd->             ; r2 <- tRand 0.05 0.10 pd+>       in do { r0 <- M.tiRand (mce2 2 1) n pd+>             ; r1 <- M.tRand 0.01 0.04 pd+>             ; r2 <- M.tRand 0.05 0.10 pd >             ; return (formlet pd (f * r0) r1 r2 * g) }->     ; mk_n t = do { r0 <- tRand 0 1 t->                   ; r1 <- tRand 0 1 t->                   ; r2 <- tRand 0 1 t->                   ; r3 <- tRand 0 1 t->                   ; r4 <- coinGate 0.2 t+>     ; mk_n t = do { r0 <- M.tRand 0 1 t+>                   ; r1 <- M.tRand 0 1 t+>                   ; r2 <- M.tRand 0 1 t+>                   ; r3 <- M.tRand 0 1 t+>                   ; r4 <- M.coinGate 0.2 t >                   ; sequence >                     [ f_let t 0.15 2 9 (mce2 200 400) >                     , f_let t 0.25 2 9 (mce2 (200 + r0) (400 + r1))@@ -19,5 +19,5 @@ >                     , let lr = fmap (* (latch r4 t)) >                       in lr (f_let t 0.5 1 16 (mce2 300 600)) ] } >     ; tr = impulse ar 24 0 }-> in do { n <- lfNoise0 kr 2+> in do { n <- M.lfNoise0 kr 2 >       ; audition . out 0 . (* (n * 0.25 + 0.25)) . sum =<< mk_n tr }
Help/Graphs/feedr.lhs view
@@ -4,9 +4,9 @@ > let { delayWr b i = recordBuf b 0 1 0 1 Loop 0 i >     ; tap nc b dt = playBuf nc b 1 0 (dt * (- sampleRate)) Loop >     ; dl = 6->     ; feedr n = do { t <- replicateM n (rand 0.0 (constant dl))->                    ; g <- replicateM n (rand 0.4 1.0)->                    ; f <- replicateM n (rand 0.9 0.95)+>     ; feedr n = do { t <- replicateM n (M.rand 0.0 (constant dl))+>                    ; g <- replicateM n (M.rand 0.4 1.0)+>                    ; f <- replicateM n (M.rand 0.9 0.95) >                    ; let { d = zipWith (\p q -> tap 2 10 p * q) t g >                          ; x = mouseX kr 0.02 1.0 Exponential 0.1 >                          ; s = clip2 (leakDC (hpf (sum d) 20) 0.995) 1
Help/Graphs/fm-iter.lhs view
@@ -1,14 +1,14 @@ fm-iter (rd) -> let { t0 = impulse AR (recip 0.30) 0+> let { t0 = impulse ar (recip 0.30) 0 >     ; t1 = tDelay t0 0.15 >     ; t = mce2 t0 t1 }-> in do { k <- tRand 56 57 t->       ; i <- tRand 40 480 t->       ; j <- tRand (-1) 1 t+> in do { k <- M.tRand 56 57 t+>       ; i <- M.tRand 40 480 t+>       ; j <- M.tRand (-1) 1 t >       ; let { c = midiCPS k >             ; m = midiCPS (k + 1 + j) >             ; s = envPerc 0.01 0.9->             ; e = envGen AR t 0.1 0 1 RemoveSynth s->             ; f = sinOsc AR c 0 * i + m }->         in audition (out 0 (sinOsc AR f 0 * e)) }+>             ; e = envGen ar t 0.1 0 1 RemoveSynth s+>             ; f = sinOsc ar c 0 * i + m }+>         in audition (out 0 (sinOsc ar f 0 * e)) }
Help/Graphs/fm-kltr.lhs view
@@ -8,21 +8,21 @@ >              ; r2 <- rand 0.5 1.5 >              ; r3 <- rand 0.975 1.025 >              ; r4 <- rand 0.75 1.25->              ; let { o = Control KR "out" 0->                    ; t = Control KR "trig" 0->                    ; a = Control KR "amp" 0.1->                    ; d = Control KR "dur" 0.1->                    ; f = Control KR "freq" 400.0->                    ; i = Control KR "index" 40.0->                    ; p = Control KR "pan" 0.0->                    ; f2 = Control KR "freq2" 600+>              ; let { o = Control kr "out" 0+>                    ; t = Control kr "trig" 0+>                    ; a = Control kr "amp" 0.1+>                    ; d = Control kr "dur" 0.1+>                    ; f = Control kr "freq" 400.0+>                    ; i = Control kr "index" 40.0+>                    ; p = Control kr "pan" 0.0+>                    ; f2 = Control kr "freq2" 600 >                    ; ep = envPerc 0.01 d->                    ; e = envGen AR 1 a 0 1 RemoveSynth ep->                    ; so = sinOsc AR (xLine KR f (f * r1) d DoNothing) 0->                    ; xl = xLine KR f2 (f2 * r3) d DoNothing->                    ; m = so * line KR i (f * r2) d DoNothing + xl->                    ; l = line KR p (p * r4) d DoNothing }->                in return (out o (pan2 (sinOsc AR m 0) l e)) }+>                    ; e = envGen ar 1 a 0 1 RemoveSynth ep+>                    ; so = sinOsc ar (xLine kr f (f * r1) d DoNothing) 0+>                    ; xl = xLine kr f2 (f2 * r3) d DoNothing+>                    ; m = so * line kr i (f * r2) d DoNothing + xl+>                    ; l = line kr p (p * r4) d DoNothing }+>                in return (out o (pan2 (sinOsc ar m 0) l e)) } >     ; fm fd f ff a d i = >         do { r1 <- rrand (-1) 1 >            ; r2 <- rrand (-1) 1
Help/Graphs/forest-sounds.lhs view
@@ -1,8 +1,8 @@ forest sounds (paul jones) -> let insects = do { n1 <- brownNoise AR->                  ; n2 <- lfNoise2 KR 50->                  ; let o = sinOsc KR (n2 * 50 + 50) 0 * 100 + 2000+> let insects = do { n1 <- M.brownNoise ar+>                  ; n2 <- M.lfNoise2 kr 50+>                  ; let o = sinOsc kr (n2 * 50 + 50) 0 * 100 + 2000 >                    in return (bpf n1 o 0.001 * 10) } > in audition . (out 0) =<< clone 2 insects 
Help/Graphs/fwalk.lhs view
@@ -10,13 +10,13 @@ >           , 40.0, 59.0, 45.0, 47.0, 52.0 ]  >     ; a = map (\b -> b_alloc b 20 1) [0, 1] >     ; s = map (\(b, d) -> b_setn1 b 0 d) [(0, n), (1, m)]->     ; fwalk r = do { t <- dust KR 3->                    ; r1 <- tiRand 0 6 t->                    ; r2 <- tRand (-0.0001) 0.0001 t->                    ; let { f = bufRdL 1 KR (mce2 0 1) r1 NoLoop+>     ; fwalk r = do { t <- M.dust kr 3+>                    ; r1 <- M.tiRand 0 6 t+>                    ; r2 <- M.tRand (-0.0001) 0.0001 t+>                    ; let { f = bufRdL 1 kr (mce2 0 1) r1 NoLoop >                          ; f' = f + r2->                          ; o1 = blip AR (midiCPS (r + f)) 12->                          ; o2 = blip AR (midiCPS (r + f')) 12 }+>                          ; o1 = blip ar (midiCPS (r + f)) 12+>                          ; o2 = blip ar (midiCPS (r + f')) 12 } >                      in return ((o1 + o2) * decay2 t 0.3 1.2 * 0.1) } } > in withSC3 (\fd -> do { f1 <- fwalk 24 >                       ; f2 <- fwalk 36
Help/Graphs/h-chatter.lhs view
@@ -2,22 +2,22 @@  > let { wrp i l r = linLin i (-1) 1 l r >     ; mma m a = return . (+ a)  . (* m)->     ; h0 = do { n <- mma 5 5 =<< lfNoise0 KR 1->               ; a <- mma 0.2 1.2 =<< lfNoise2 KR n->               ; b <- mma 0.15 0.15 =<< lfNoise2 KR n+>     ; h0 = do { n <- mma 5 5 =<< M.lfNoise0 kr 1+>               ; a <- mma 0.2 1.2 =<< M.lfNoise2 kr n+>               ; b <- mma 0.15 0.15 =<< M.lfNoise2 kr n >               ; let { f = 40->                     ; h = henonN AR (mce2 f (f * 0.5)) a b 0 0 }->                 in return (saw AR (h * 3200 + 1600) * 0.35) }->     ; h1 = do { n0 <- lfNoise0 KR 32->               ; n1 <- lfNoise0 KR 2->               ; let { a = mouseX KR 1.2 1.4 Linear 0.1->                     ; b = mouseY KR 0.2 0.3 Linear 0.1+>                     ; h = henonN ar (mce2 f (f * 0.5)) a b 0 0 }+>                 in return (saw ar (h * 3200 + 1600) * 0.35) }+>     ; h1 = do { n0 <- M.lfNoise0 kr 32+>               ; n1 <- M.lfNoise0 kr 2+>               ; let { a = mouseX kr 1.2 1.4 Linear 0.1+>                     ; b = mouseY kr 0.2 0.3 Linear 0.1 >                     ; h = wrp n0 1 32 >                     ; p = wrp n1 2400 3200 >                     ; l = wrp n1 (-0.75) 0.75 >                     ; g = wrp n1 0.55 0.85 >                     ; f = 40->                     ; o = blip AR (wrp (henonN AR f a b 0 0) p (p * 2)) h }+>                     ; o = blip ar (wrp (henonN ar f a b 0 0) p (p * 2)) h } >                 in return (pan2 o l g * 0.35) } } > in audition . out 0 =<< liftM2 (+) h0 h1 
Help/Graphs/half-life.lhs view
@@ -2,8 +2,8 @@  > let { t_half = 3.92 >     ; n_atoms = 1e+5->     ; n = max 0 (n_atoms - pulseCount (localIn 2 AR) 0) }-> in do { activity <- dust AR (n * log 2 / t_half)+>     ; n = max 0 (n_atoms - pulseCount (localIn 2 ar) 0) }+> in do { activity <- M.dust ar (n * log 2 / t_half) >       ; audition (mrg [ localOut activity >                       , out 0 activity ]) } 
Help/Graphs/harmonic-swimming.lhs view
@@ -3,11 +3,11 @@ > let { a = 0.02 >     ; f = 50 >     ; p = 20->     ; l = line KR 0 (- a) 60 DoNothing ->     ; o h = do { r <- clone 2 (rand 2 8)->                ; n <- lfNoise1 KR r+>     ; l = line kr 0 (- a) 60 DoNothing +>     ; o h = do { r <- clone 2 (M.rand 2 8)+>                ; n <- M.lfNoise1 kr r >                ; let e = max 0 (n * a + l)->                  in return (fSinOsc AR (f * (h + 1)) 0 * e) } }+>                  in return (fSinOsc ar (f * (h + 1)) 0 * e) } } > in audition . out 0 . sum =<< mapM o [0..p]  { var a = 0.02
Help/Graphs/harmonic-tumbling.lhs view
@@ -2,11 +2,11 @@  > let { f = 80 >     ; p = 10->     ; t = xLine KR (mce2 10 11) 0.1 60 DoNothing->     ; o h = do { n <- dust KR t->                ; r <- rand 0 0.5+>     ; t = xLine kr (mce2 10 11) 0.1 60 DoNothing+>     ; o h = do { n <- M.dust kr t+>                ; r <- M.rand 0 0.5 >                ; let e = decay2 (n * 0.02) 0.005 r->                  in return (fSinOsc AR (f * (h + 1)) 0 * e) } }+>                  in return (fSinOsc ar (f * (h + 1)) 0 * e) } } > in audition . out 0 . sum =<< mapM o [0..p]  { var f = 80
Help/Graphs/hh-808.lhs view
@@ -3,10 +3,10 @@ > let { time = 250 >     ; freqs = [205.35, 304.41, 369.64, 522.71, 540.54, 812.21] >     ; pulseEnv = let e = env [1.0, 0.6] [time] [EnvNum (-0.5)] 0 0->                  in envGen AR 1 1 0 (1/1000) DoNothing e->     ; s = mix (lfPulse AR (mce (map (* 4.09) freqs)) 0 0.5)+>                  in envGen ar 1 1 0 (1/1000) DoNothing e+>     ; s = mix (lfPulse ar (mce (map (* 4.09) freqs)) 0 0.5) >     ; f = [ \a -> ((a ==* 6.0) * 0.6) + ((a ==* 2.0) * 0.2) + ((a ==* 1.0) * 0.9)->           , \a -> (a * pulseEnv) + ((mix (lfPulse AR (mce freqs) 0 0.55)) * 0.9)+>           , \a -> (a * pulseEnv) + ((mix (lfPulse ar (mce freqs) 0 0.55)) * 0.9) >           , \a -> rlpf a 7000 0.6 >           , \a -> rhpf a 6800 1.5 >           , \a -> rhpf a 6800 1.5@@ -14,7 +14,7 @@ >           , \a -> a + freeVerb a 0.33 0.5 0.5 >           , \a -> let { c = map EnvNum [0, -0.5, 0, -50] >                       ; e = env [0, 1, 0.4, 0, 0] [2, time, 50, 500] c 0 0 }->                   in a * envGen AR 1 1 0 (1/1000) RemoveSynth e+>                   in a * envGen ar 1 1 0 (1/1000) RemoveSynth e >           , \a -> mce [a, delayN a 0.005 0.005] ] >     ; (>>>) = flip (.) } > in audition (out 0 (foldl1 (>>>) f s * 2))
Help/Graphs/implosion.lhs view
@@ -1,19 +1,19 @@ implosion (rd)  > let { mkls bp t = let e = envCoord bp t 1 EnvLin->                   in envGen KR 1 1 0 1 RemoveSynth e+>                   in envGen kr 1 1 0 1 RemoveSynth e >     ; mkrmp l r t = mkls [(0, l), (1, r)] t >     ; wrp i l r = linLin i (-1) 1 l r >     ; pmr_n rt l0 l1 r0 r1 d = let { le = mkrmp l0 r0 d >                                    ; re = mkrmp l1 r1 d }->                                in do { n <- whiteNoise rt+>                                in do { n <- M.whiteNoise rt >                                      ; return (wrp n le re) } }-> in do { n0 <- rand (-1) 0->       ; n1 <- rand 0 1->       ; d  <- rand 7.5 13.5->       ; f0 <- rand 10990 16220->       ; f1 <- rand  9440 19550->       ; f <- pmr_n AR 440 f0 f1 f1 d->       ; l <- pmr_n KR n0 n1 0 0 d->       ; a <- pmr_n KR 0.1 0.6 0 0 d->       ; audition (out 0 (pan2 (saw AR f) l a)) }+> in do { n0 <- M.rand (-1) 0+>       ; n1 <- M.rand 0 1+>       ; d  <- M.rand 7.5 13.5+>       ; f0 <- M.rand 10990 16220+>       ; f1 <- M.rand  9440 19550+>       ; f <- pmr_n ar 440 f0 f1 f1 d+>       ; l <- pmr_n kr n0 n1 0 0 d+>       ; a <- pmr_n kr 0.1 0.6 0 0 d+>       ; audition (out 0 (pan2 (saw ar f) l a)) }
Help/Graphs/k-ppr.lhs view
@@ -1,16 +1,16 @@ k-ppr (rd)  > let { wrp i l r = linLin i (-1) 1 l r->     ; x = mouseX KR 0.05 0.35 Linear 0.1->     ; y = mouseY KR 0.15 0.75 Linear 0.1->     ; ti = lfTri KR x 0+>     ; x = mouseX kr 0.05 0.35 Linear 0.1+>     ; y = mouseY kr 0.15 0.75 Linear 0.1+>     ; ti = lfTri kr x 0 >     ; tf = wrp ti 100 200->     ; t = impulse AR tf 0+>     ; t = impulse ar tf 0 >     ; stream lf rf ld rd g = ->         do { r1 <- rand 9 18+>         do { r1 <- M.rand 9 18 >            ; let t' = pulseDivider t r1 0->              in do { r2 <- tRand lf (wrp ti lf rf) t'->                    ; r3 <- tRand ld rd t'+>              in do { r2 <- M.tRand lf (wrp ti lf rf) t'+>                    ; r3 <- M.tRand ld rd t' >                    ; return (ringz (decay2 t' 0.01 0.5) r2 (r3 * y) * g) } }  >     ; s1 = stream 3140 6240 0.050 0.005 0.15  >     ; s2 = stream 0400 9000 0.005 0.005 0.15 }
Help/Graphs/karplus-strong.lhs view
@@ -9,19 +9,19 @@ >            , [0, -12 , -30, -40, -64] >            , [50, 60,  170, 180, 200] ) >     ; cs (_, c1, c2, c3) = c1 ++ c2 ++ c3->     ; vf i s = let { f = in' 5 KR i->                    ; a = in' 5 KR (i + 5)->                    ; b = in' 5 KR (i + 10) }+>     ; vf i s = let { f = in' 5 kr i+>                    ; a = in' 5 kr (i + 5)+>                    ; b = in' 5 kr (i + 10) } >                in mix (resonz s f (b / f) * dbAmp a)->     ; ks n d = let { x = mouseX KR 0 0.01 Linear 0.1 {- delay -}->                    ; y = mouseY KR 0.85 1 Linear 0.1 {- blend / gain -}+>     ; ks n d = let { x = mouseX kr 0 0.01 Linear 0.1 {- delay -}+>                    ; y = mouseY kr 0.85 1 Linear 0.1 {- blend / gain -} >                    ; ugenIf a b c = (a * b) + ((1 - a) * c) >                    ; n0 = (n / 2) + 0.5 >                    ; probSwitch i prob = ugenIf (n0 >* prob) i (negate i) >                    ; laggedDelay = lag x 0.01->                    ; o = sinOsc AR 200 0+>                    ; o = sinOsc ar 200 0 >                    ; a0 = decay d 0.025 * o->                    ; a1 = localIn 1 AR + (a0 * (y - 0.25))+>                    ; a1 = localIn 1 ar + (a0 * (y - 0.25)) >                    ; a2 = delayN a1 0.01 laggedDelay >                    ; a3 = delay1 a2 >                    ; a4 = (a2 + a3) / 2.0@@ -30,8 +30,8 @@ >                    ; a7 = a6 * 1.5 } >               in mrg [localOut (a5 * 0.99), out 0 (mce [a7, a7])] } > in withSC3 (\fd -> do { send fd (c_setn [(0,cs aA), (15, cs aU)])->                       ; n <- whiteNoise AR->                       ; d <- dust KR 4+>                       ; n <- M.whiteNoise ar+>                       ; d <- M.dust kr 4 >                       ; play fd (ks n d) })  Variant on http://doc.gold.ac.uk/~ma503am/alex/vocable-source-released/
Help/Graphs/klink.lhs view
@@ -1,15 +1,15 @@ klink (rd) -> do { n1 <- lfNoise0 KR (mce2 0.5 1.5)->    ; let { o = sinOsc KR n1 0+> do { n1 <- M.lfNoise0 kr (mce2 0.5 1.5)+>    ; let { o = sinOsc kr n1 0 >          ; f = mce2 2 3 >          ; a = abs (slope o) * f->          ; t = impulse AR a 0+>          ; t = impulse ar a 0 >          ; i = decay2 t 0.01 0.1->          ; x = mouseX KR 960 3620 Exponential 0.2->          ; y = mouseY KR 0.5 2.0 Linear 0.2 }->      in do { n2 <- tRand x 3940 t->            ; n3 <- tRand 0.005 0.275 t+>          ; x = mouseX kr 960 3620 Exponential 0.2+>          ; y = mouseY kr 0.5 2.0 Linear 0.2 }+>      in do { n2 <- M.tRand x 3940 t+>            ; n3 <- M.tRand 0.005 0.275 t >            ; audition (out 0 (ringz i n2 (n3 * y))) } }  { var n1 = LFNoise0.kr([0.5, 1.5])
Help/Graphs/lf-pulses.lhs view
@@ -1,10 +1,10 @@ lf pulses (rd) -> do { n0 <- lfNoise0 AR (mce2 20 40)->    ; n1 <- lfNoise0 AR (mce2 5 10)->    ; let { x = mouseX KR 0.012 0.19 Exponential 0.1->          ; f = formlet (blip AR 10 12) (n0 * 43 + 700) 0.005 x ->          ; o = sinOsc AR 40 0 * n1 }+> do { n0 <- M.lfNoise0 ar (mce2 20 40)+>    ; n1 <- M.lfNoise0 ar (mce2 5 10)+>    ; let { x = mouseX kr 0.012 0.19 Exponential 0.1+>          ; f = formlet (blip ar 10 12) (n0 * 43 + 700) 0.005 x +>          ; o = sinOsc ar 40 0 * n1 } >      in audition (out 0 (clip2 (leakDC (f + o) 0.995) 0.75)) }  { var n0 = LFNoise0.ar([20, 40])
Help/Graphs/lfo-modulation.lhs view
@@ -1,8 +1,8 @@ lfo modulation (jmcc) -> let { o = fSinOsc KR 0.05 0 * 80 + 160->     ; p = fSinOsc KR (mce2 0.6 0.7) 0 * 3600 + 4000->     ; s = rlpf (lfPulse AR o 0 0.4 * 0.05) p 0.2 }+> let { o = fSinOsc kr 0.05 0 * 80 + 160+>     ; p = fSinOsc kr (mce2 0.6 0.7) 0 * 3600 + 4000+>     ; s = rlpf (lfPulse ar o 0 0.4 * 0.05) p 0.2 } > in audition (out 0 (combL s 0.3 (mce2 0.2 0.25) 2))  { var o = FSinOsc.kr(0.05, 0, 80, 160)
Help/Graphs/lg-timed.lhs view
@@ -1,19 +1,19 @@ lg-timed (rd)  > let { timed r y p =->       do { d0 <- dser r p->          ; d1 <- dcons 0 d0->          ; d2 <- dser r y->          ; let t = tDuty AR d1 0 RemoveSynth d2 1+>       do { d0 <- M.dser r p+>          ; d1 <- M.dcons 0 d0+>          ; d2 <- M.dser r y+>          ; let t = tDuty ar d1 0 RemoveSynth d2 1 >            in return (latch t t) } >     ; lg u = return (lag u 0.03) >     ; n = mce [52, 76, 66, 67, 68, 69] >     ; a = mce [0.35, 0.15, 0.04, 0.05, 0.16, 0.07] >     ; d = mce [0.1, 0.5, 0.09, 0.08, 0.07, 0.3]->     ; x = mouseX KR 0.5 1.25 Linear 0.2 }+>     ; x = mouseX kr 0.5 1.25 Linear 0.2 } > in do { tn <- lg =<< timed dinf n (d * x) >       ; ta <- lg =<< timed dinf a (d * x)->       ; audition (out 0 (sinOsc AR (midiCPS tn) 0 * ta)) }+>       ; audition (out 0 (sinOsc ar (midiCPS tn) 0 * ta)) }  { var dcons = { arg x, xs               ; var i = Dseq.new([0, 1], 1)
Help/Graphs/lin-sosc.lhs view
@@ -1,10 +1,10 @@ lin-sosc (rd)  > let { n = 1024->     ; x = mouseX KR 0.001 1.0 Linear 0.1->     ; tblM b = playBuf 1 b (x * bufRateScale KR b) 0 0 Loop->     ; tblC b c = playBuf 1 b (in' 1 KR c * bufRateScale KR b) 0 0 Loop->     ; o = sinOsc AR (tblM 0) 0 * tblM 1 +>     ; x = mouseX kr 0.001 1.0 Linear 0.1+>     ; tblM b = playBuf 1 b (x * bufRateScale kr b) 0 0 Loop+>     ; tblC b c = playBuf 1 b (in' 1 kr c * bufRateScale kr b) 0 0 Loop+>     ; o = sinOsc ar (tblM 0) 0 * tblM 1  >     ; co = clip2 (pan2 o (tblC 1 0) 0.025) 0.25 >     ; rrand (a, b) = getStdRandom (randomR (a,b)) >     ; choose l = liftM (l !!) (rrand (0, length l - 1))
Help/Graphs/modal-space.lhs view
@@ -2,17 +2,17 @@  > let { b = 0 >     ; p = [0, 2, 3.2, 5, 7, 9, 10] ->     ; x = mouseX KR 0 15 Linear 0.1+>     ; x = mouseX kr 0 15 Linear 0.1 >     ; k = degreeToKey 0 x 12->     ; c n r = let { o = sinOsc AR (midiCPS (r + k + n * 0.04)) 0 * 0.1->                   ; t = lfPulse AR (midiCPS (mce2 48 55)) 0.15 0.5->                   ; f = midiCPS (sinOsc KR 0.1 0 * 10 + r)+>     ; c n r = let { o = sinOsc ar (midiCPS (r + k + n * 0.04)) 0 * 0.1+>                   ; t = lfPulse ar (midiCPS (mce2 48 55)) 0.15 0.5+>                   ; f = midiCPS (sinOsc kr 0.1 0 * 10 + r) >                   ; d = rlpf t f 0.1 * 0.1 >                   ; m = o + d } >               in combN m 0.31 0.31 2 + m } > in withSC3 (\fd -> do { async fd (b_alloc b (length p) 1) >                       ; send fd (b_setn1 b 0 p)->                       ; n <- clone 2 (lfNoise1 KR 3)+>                       ; n <- clone 2 (M.lfNoise1 kr 3) >                       ; play fd (out 0 ((c n 48 + c n 72) * 0.25)) })  { var s = Server.default
Help/Graphs/moto-rev.lhs view
@@ -1,7 +1,7 @@ moto rev (jmcc) -> let { f = sinOsc KR 0.2 0 * 10 + 21->     ; s = lfPulse AR f (mce2 0 0.1) 0.1 }+> let { f = sinOsc kr 0.2 0 * 10 + 21+>     ; s = lfPulse ar f (mce2 0 0.1) 0.1 } > in audition (out 0 (clip2 (rlpf s 100 0.1) 0.4))  { var f = SinOsc.kr(0.2, 0) * 10 + 21
Help/Graphs/mouse-clatter.lhs view
@@ -1,17 +1,17 @@ mouse clatter (rd) -> let { x = mouseX KR 100 12000 Linear 0.1->     ; y = mouseY KR 0.01 0.15 Linear 0.1 }-> in do { n1 <- lfNoise0 KR (mce [3, 3.25])->       ; let { t = impulse KR (n1 * 16 + 18) 0->             ; s = do { n2 <- tRand 0.005 y t->                      ; n3 <- whiteNoise AR->                      ; n4 <- tRand 10 x t->                      ; n5 <- tRand 0 1 t->                      ; n6 <- tExpRand 0.15 1 t+> let { x = mouseX kr 100 12000 Linear 0.1+>     ; y = mouseY kr 0.01 0.15 Linear 0.1 }+> in do { n1 <- M.lfNoise0 kr (mce [3, 3.25])+>       ; let { t = impulse kr (n1 * 16 + 18) 0+>             ; s = do { n2 <- M.tRand 0.005 y t+>                      ; n3 <- M.whiteNoise ar+>                      ; n4 <- M.tRand 10 x t+>                      ; n5 <- M.tRand 0 1 t+>                      ; n6 <- M.tExpRand 0.15 1 t >                      ; o <- let e = decay2 t 0.01 n2 >                             in return (bpf (n3 * e) n4 n5)->                      ; n7 <- pv_RandComb (fft' 10 o) n6 t+>                      ; n7 <- M.pv_RandComb (fft' 10 o) n6 t >                      ; return (o * 0.05 + ifft' n7) } } >         in withSC3 (\fd -> do { async fd (b_alloc 10 2048 1) >                               ; play fd . out 0 =<< s }) }
Help/Graphs/nharm.lhs view
@@ -9,10 +9,10 @@ >                    ; l <- replicateM n (rrand 0.01 0.02) >                    ; p <- rrand (-1.0) 1.0 >                    ; let { a = 0.5->                          ; e = envGen KR 1 0.9 0 1 RemoveSynth (envSine d a)+>                          ; e = envGen kr 1 0.9 0 1 RemoveSynth (envSine d a) >                          ; nh = nharm n (midiCPS f) >                          ; s = klangSpec nh l (replicate n 0.0) }->                      in return (pan2 (klang AR 1 0 s) p e) }+>                      in return (pan2 (klang ar 1 0 s) p e) } >     ; ply :: Int -> (Double, Double) -> UGen -> Int -> IO () >     ; ply n (l,r) m u = replicateM_ n (do { threadPause =<< rrand l r >                                           ; audition . out 0 =<< klg m u }) }
Help/Graphs/noise-burst-sweep.lhs view
@@ -1,10 +1,10 @@ noise burst sweep (jmcc) -> do { n <- clone 2 (whiteNoise AR)->    ; let { lfoRate = mouseX KR 10 60 Exponential 0.2->          ; amp = max 0 (lfSaw KR lfoRate (-1))->          ; cfreq = mouseY KR 400 8000 Exponential 0.2->          ; freq = sinOsc KR 0.2 0 * cfreq + (1.05 * cfreq) }+> do { n <- clone 2 (M.whiteNoise ar)+>    ; let { lfoRate = mouseX kr 10 60 Exponential 0.2+>          ; amp = max 0 (lfSaw kr lfoRate (-1))+>          ; cfreq = mouseY kr 400 8000 Exponential 0.2+>          ; freq = sinOsc kr 0.2 0 * cfreq + (1.05 * cfreq) } >      in audition (out 0 (resonz (n * amp) freq 0.1)) }  { var n = WhiteNoise.ar ! 2
Help/Graphs/one-line.lhs view
@@ -1,9 +1,9 @@ one-line (lance putnam) -> let { lfs = lfSaw AR (mce2 1 0.99) (mce2 0 0.6) * 2000 + 2000+> let { lfs = lfSaw ar (mce2 1 0.99) (mce2 0 0.6) * 2000 + 2000 >     ; lfs_t = trunc lfs (mce2 400 600) * mce2 1 (-1) >     ; f = onePole (mix lfs_t) 0.98 }-> in audition (out 0 (pan2 (sinOsc AR f 0) 0 0.1))+> in audition (out 0 (pan2 (sinOsc ar f 0) 0 0.1))  { var lfs = LFSaw.ar([1, 0.99], [0, 0.6], 2000, 2000) ; var lfs_t = lfs.trunc([400, 600]) * [1, -1]
Help/Graphs/oscillator-cluster.lhs view
@@ -1,22 +1,22 @@ oscillator cluster (rd)  > let { rng i l r = linLin i (-1) 1 l r->     ; ln a b d = line KR a b d RemoveSynth->     ; xln a b d = xLine KR a b d RemoveSynth->     ; rln r a b d = liftM (\n -> ln (a + n) b d) (rand 0 r)->     ; rxln r a b d = liftM (\n -> xln (a + n) b d) (rand 0 r)->     ; prt d a cf = do { r1 <- rand cf (cf + 2)+>     ; ln a b d = line kr a b d RemoveSynth+>     ; xln a b d = xLine kr a b d RemoveSynth+>     ; rln r a b d = liftM (\n -> ln (a + n) b d) (M.rand 0 r)+>     ; rxln r a b d = liftM (\n -> xln (a + n) b d) (M.rand 0 r)+>     ; prt d a cf = do { r1 <- M.rand cf (cf + 2) >                       ; r2 <- rln 1 5 0.01 d >                       ; r3 <- rln 10 20 0 d->                       ; r4 <- rand 0.1 0.2->                       ; let { f = mce2 cf r1 + sinOsc KR r2 0 * r3->                             ; o = fSinOsc AR f 0->                             ; e = decay2 (impulse AR 0 0) r4 d * a }+>                       ; r4 <- M.rand 0.1 0.2+>                       ; let { f = mce2 cf r1 + sinOsc kr r2 0 * r3+>                             ; o = fSinOsc ar f 0+>                             ; e = decay2 (impulse ar 0 0) r4 d * a } >                        in return (o * e) } >     ; np = 12 >     ; fp = replicateM np (rand 220 660) }-> in do { d <- rand 4 7->       ; a <- rand 0.01 0.05+> in do { d <- M.rand 4 7+>       ; a <- M.rand 0.01 0.05 >       ; audition . (out 0) . sum =<< mapM (prt d a) =<< fp }  { var ln = { arg a, b, d
Help/Graphs/pattern-buffer.lhs view
@@ -3,21 +3,21 @@ > let { nf = 2 * 48000 >     ; c = 24 >     ; tseq l = let n = fromIntegral (length l) / 2.0->                in select (lfSaw KR 0.5 0 * n + n) (mce l)+>                in select (lfSaw kr 0.5 0 * n + n) (mce l) >     ; rrand l r = getStdRandom (randomR (l, r))->     ; p = phasor AR 0 (bufRateScale KR 10) 0 (bufFrames KR 10) 0->     ; t = bufRdC 1 AR 10 p Loop +>     ; p = phasor ar 0 (bufRateScale kr 10) 0 (bufFrames kr 10) 0+>     ; t = bufRdC 1 ar 10 p Loop  >     ; rs h = do { r0 <- rrand 0 nf >                 ; r1 <- rrand 0.0 1.0 >                 ; send h (b_set1 10 r0 r1) } } > in do { r1 <- replicateM c (rrand 36 96) >       ; r2 <- replicateM c (rrand (-1.0) 1.0) >       ; r3 <- rrand 0 1->       ; n1 <- tRand 0.02 0.08 t+>       ; n1 <- M.tRand 0.02 0.08 t >       ; let { e = decay2 t 0.01 n1 >             ; f = midiCPS (tseq r1) >             ; l = tseq r2->             ; o = [sinOsc AR f 0, saw AR f] !! r3 }+>             ; o = [sinOsc ar f 0, saw ar f] !! r3 } >         in withSC3 (\fd -> do { async fd (b_alloc 10 (nf * 2) 1) >                               ; replicateM_ c (rs fd) >                               ; play fd (out 0 (pan2 o l e)) }) }
Help/Graphs/plucked-strings.lhs view
@@ -1,20 +1,20 @@ plucked strings (jmcc) -> let { s = do { n0 <- pinkNoise AR->              ; r1 <- rand (-1) 1+> let { s = do { n0 <- M.pinkNoise ar+>              ; r1 <- M.rand (-1) 1 >              ; im <- i >              ; dt' <- dt >              ; let t = decay im 0.1 * n0 * 0.1 >                in return (pan2 (combL t dt' dt' 4) r1 1) }->     ; i = do { r0 <- rand 2 2.2->              ; n0 <- dust AR 0.5->              ; r1 <- rand 0.05 0.15->              ; r2 <- rand 0 (pi * 2)->              ; r3 <- iRand 0 2->              ; let { s0 = impulse AR r0 0.3+>     ; i = do { r0 <- M.rand 2 2.2+>              ; n0 <- M.dust ar 0.5+>              ; r1 <- M.rand 0.05 0.15+>              ; r2 <- M.rand 0 (pi * 2)+>              ; r3 <- M.iRand 0 2+>              ; let { s0 = impulse ar r0 0.3 >                    ; s1 = n0 * 0.3->                    ; s2 = impulse AR (sinOsc KR r1 r2 * 5 + 5.2) 0.3 }+>                    ; s2 = impulse ar (sinOsc kr r1 r2 * 5 + 5.2) 0.3 } >                in return (select r3 (mce [s0, s1, s2])) }->     ; dt = do { r0 <- rand 60 90+>     ; dt = do { r0 <- M.rand 60 90 >               ; return (1 / (midiCPS (floorE r0))) } } > in audition . out 0 . sum =<< replicateM 5 s
Help/Graphs/police-state.lhs view
@@ -1,18 +1,18 @@ police state (jmcc) -> let node = do { r0 <- rand 0.02 0.12->               ; r1 <- rand 0 (pi*2)->               ; r2 <- rand 0 600->               ; r3 <- rand 700 1300->               ; r4 <- rand (-1) 1->               ; r5 <- rand 80 120->               ; n0 <- lfNoise2 AR r5->               ; let f = sinOsc KR r0 r1 * r2 + r3->                 in return (pan2 (sinOsc AR f 0 * n0 * 0.1) r4 1) }+> let node = do { r0 <- M.rand 0.02 0.12+>               ; r1 <- M.rand 0 (pi*2)+>               ; r2 <- M.rand 0 600+>               ; r3 <- M.rand 700 1300+>               ; r4 <- M.rand (-1) 1+>               ; r5 <- M.rand 80 120+>               ; n0 <- M.lfNoise2 ar r5+>               ; let f = sinOsc kr r0 r1 * r2 + r3+>                 in return (pan2 (sinOsc ar f 0 * n0 * 0.1) r4 1) } > in do { nodes <- clone 4 node->       ; n0 <- clone 2 (lfNoise2 KR 0.4)->       ; n1 <- lfNoise2 AR (n0 * 90 + 620)->       ; n2 <- lfNoise2 KR (mce2 0.3 0.301)+>       ; n0 <- clone 2 (M.lfNoise2 kr 0.4)+>       ; n1 <- M.lfNoise2 ar (n0 * 90 + 620)+>       ; n2 <- M.lfNoise2 kr (mce2 0.3 0.301) >       ; let e = n1 * (n2 * 0.15 + 0.18) >         in audition (out 0 (combL (mix nodes + e) 0.3 0.3 3)) } 
Help/Graphs/pulsing-bottles.lhs view
@@ -1,14 +1,12 @@ pulsing bottles (jmcc) -> let { r = do { n <- whiteNoise AR->              ; r0 <- rand 4 14->              ; r1 <- rand 0 0.7->              ; r2 <- rand 400 7400->              ; return (resonz (n * lfPulse KR r0 0 0.25 * r1) r2 0.01) }->     ; s = do { f <- rand 0.1 0.5->              ; p <- rand 0 (pi * 2)->              ; return (sinOsc KR f p) }->     ; u = do { r' <- r->              ; s' <- s->              ; return (pan2 r' s' 1) } }+> let { r = do { n <- M.whiteNoise ar+>              ; r0 <- M.rand 4 14+>              ; r1 <- M.rand 0 0.7+>              ; r2 <- M.rand 400 7400+>              ; return (resonz (n * lfPulse kr r0 0 0.25 * r1) r2 0.01) }+>     ; s = do { f <- M.rand 0.1 0.5+>              ; p <- M.rand 0 (pi * 2)+>              ; return (sinOsc kr f p) }+>     ; u = liftM2 (\x y -> pan2 x y 1) r s } > in audition . out 0 . sum =<< replicateM 6 u
Help/Graphs/record-scratcher.lhs view
@@ -3,11 +3,11 @@ > let { dup a = mce2 a a >     ; fn = "/home/rohan/audio/metal.wav" >     ; d = env [0, 1, 0] [0.1, 0.1] [EnvSin] 1 0->     ; e = envGen KR 1 1 0 1 RemoveSynth d->     ; x = mouseX KR (-10) 10 Linear 0.2+>     ; e = envGen kr 1 1 0 1 RemoveSynth d+>     ; x = mouseX kr (-10) 10 Linear 0.2 >     ; dx = x - delayN x 0.1 0.1->     ; bdx = mouseButton KR 1 0 0.3 + dx->     ; bdxr = bdx * bufRateScale KR 0+>     ; bdx = mouseButton kr 1 0 0.3 + dx+>     ; bdxr = bdx * bufRateScale kr 0 >     ; scr = playBuf 1 0 bdxr 0 0 Loop } > in withSC3 (\fd -> do { async fd (b_allocRead 0 fn 0 0) >                       ; play fd (out 0 (dup (scr * e))) })
Help/Graphs/red-frik.lhs view
@@ -1,17 +1,17 @@ red frik (f0)  > let red tr n = ->     do { r1 <- tRand 0.3 3 tr->        ; r2 <- tRand 0.3 5 tr->        ; r3 <- tRand 0 0.5 tr->        ; r4 <- tRand 0.49 0.56 tr->        ; r5 <- tRand 0.3 0.6 tr->        ; r6 <- tRand 0.3 0.5 tr->        ; let { o1 = fSinOsc KR r2 0 * r3 + r4->              ; o2 = fSinOsc KR o1 r5 * r6 }+>     do { r1 <- M.tRand 0.3 3 tr+>        ; r2 <- M.tRand 0.3 5 tr+>        ; r3 <- M.tRand 0 0.5 tr+>        ; r4 <- M.tRand 0.49 0.56 tr+>        ; r5 <- M.tRand 0.3 0.6 tr+>        ; r6 <- M.tRand 0.3 0.5 tr+>        ; let { o1 = fSinOsc kr r2 0 * r3 + r4+>              ; o2 = fSinOsc kr o1 r5 * r6 } >          in return (rhpf n r1 o2) }-> in do { n <- clone 2 (brownNoise AR)->       ; let tr = impulse KR 0.1 0+> in do { n <- clone 2 (M.brownNoise ar)+>       ; let tr = impulse kr 0.1 0 >         in audition . out 0 =<< red tr n }  { var red = { arg tr, n
Help/Graphs/reverberated-sine-percussion.lhs view
@@ -3,16 +3,16 @@ > let { d = 6 >     ; c = 5 >     ; a = 4->     ; s_ = do { n <- dust AR (2 / constant d)->               ; r <- rand 0 3000+>     ; s_ = do { n <- M.dust ar (2 / constant d)+>               ; r <- M.rand 0 3000 >               ; return (resonz (n * 50) (200 + r) 0.003) }->     ; x_ i = do { r <- clone 2 (rand 0 0.05)+>     ; x_ i = do { r <- clone 2 (M.rand 0 0.05) >                 ; return (allpassN i 0.05 r 1) }  >     ; chain n f = foldl (>=>) return (replicate n f) } > in do { s <- liftM sum (replicateM d s_) >       ; y <- let z = delayN s 0.048 0.48->              in do { r <- clone c (rand 0 0.1)->                    ; n <- lfNoise1 KR r+>              in do { r <- clone c (M.rand 0 0.1)+>                    ; n <- M.lfNoise1 kr r >                    ; return (mix (combL z 0.1 (n * 0.04 + 0.05) 15)) } >       ; x <- chain a x_ y >       ; audition (out 0 (s + x * 0.2)) }
Help/Graphs/rzblp.lhs view
@@ -1,16 +1,13 @@ rzblp (rd) -> import System.IO.Unsafe--> let { u = unsafePerformIO->     ; wrp i l r = let m = (r - l) / 2+> let { wrp i l r = let m = (r - l) / 2 >                   in i * m + l + m->     ; lfn f l r = wrp (u (lfNoise0 kr f)) l r+>     ; lfn f l r = wrp (U.lfNoise0 kr f) l r >     ; hpb q = mixFill 2 (\_ -> let { f = lfn q 1330 1395 >                                    ; a = lfn q 0.001 0.007 } >                                in blip ar f 24 * a) >     ; mk_f d = let { q = lfn 5.2 5.2 5.21->                    ; a = u (d dinf (mce [1, 3, 2, 7, 8]))+>                    ; a = d dinf (mce [1, 3, 2, 7, 8]) >                    ; tr = impulse kr q 0 >                    ; freq = demand tr 0 a * 30 + 340 } >                in sum [ blip ar freq 3 * lfn q 0.001 0.01@@ -19,4 +16,4 @@ >                                    (lfn q 0.1 0.5) * lfn q 0.01 1.8 >                       , hpb q * lfn q 1.2 1.8 >                       , blip ar (lfn q 16 36) 3 * mce2 0.03 0.09 ] }-> in audition (out 0 (mk_f drand + mk_f dxrand))+> in audition (out 0 (mk_f U.drand + mk_f U.dxrand))
Help/Graphs/s-chirp.lhs view
@@ -1,19 +1,19 @@ s-chirp (rd) -> let { x = mouseX KR 15 0 Linear 0.1->     ; y = mouseY KR 15 27 Linear 0.1+> let { x = mouseX kr 15 0 Linear 0.1+>     ; y = mouseY kr 15 27 Linear 0.1 >     ; scl = [0, 2, 3.2, 5, 7, 9, 10] }-> in do { t <- dust KR 9->       ; b <- tChoose t (mce [36, 48, 60, 72])->       ; n <- liftM (* 0.04) (lfNoise1 KR (mce2 3 3.05))->       ; d <- tiRand x y t->       ; e <- liftM (decay2 t 0.005) (tRand 0.02 0.15 t)+> in do { t <- M.dust kr 9+>       ; b <- M.tChoose t (mce [36, 48, 60, 72])+>       ; n <- liftM (* 0.04) (M.lfNoise1 kr (mce2 3 3.05))+>       ; d <- M.tiRand x y t+>       ; e <- liftM (decay2 t 0.005) (M.tRand 0.02 0.15 t) >       ; o <- let { k = degreeToKey 0 d 12 >                  ; f = midiCPS (b + k + n)->                  ; m = e * sinOsc AR f 0 * 0.2+>                  ; m = e * sinOsc ar f 0 * 0.2 >                  ; u = pulseDivider t 9 0 }->              in do { r0 <- tRand 0.0075 0.125 u->                    ; r1 <- tRand 0.05 0.15 u+>              in do { r0 <- M.tRand 0.0075 0.125 u+>                    ; r1 <- M.tRand 0.05 0.15 u >                    ; return (m * 0.5 + allpassC m 0.15 r0 r1) } >       ; withSC3 (\fd -> do { async fd (b_alloc 0 7 1) >                            ; send fd (b_setn1 0 0 scl)
Help/Graphs/sample-and-hold-liquidities.lhs view
@@ -1,13 +1,12 @@ sample and hold liquidities (jmcc) -> let { wn = Sound.SC3.UGen.Base.whiteNoise->     ; r = mouseX KR 1 200 Exponential 0.1+> let { r = mouseX kr 1 200 Exponential 0.1 >     ; t = recip r->     ; c = impulse KR r 0.4->     ; cf = mouseY KR 100 8000 Exponential 0.1->     ; f = latch (wn (uid 0) KR * cf * 0.5 + cf) c->     ; p = latch (wn (uid 1) KR) c->     ; i = pan2 (sinOsc AR f 0 * decay2 c (t * 0.1) (t * 0.9)) p 1 }+>     ; c = impulse kr r 0.4+>     ; cf = mouseY kr 100 8000 Exponential 0.1+>     ; f = latch (B.whiteNoise (uid 0) kr * cf * 0.5 + cf) c+>     ; p = latch (B.whiteNoise (uid 1) kr) c+>     ; i = pan2 (sinOsc ar f 0 * decay2 c (t * 0.1) (t * 0.9)) p 1 } > in audition (out 0 (combN i 0.3 0.3 2))  { var r = MouseX.kr(1, 200, 'exponential', 0.1)
Help/Graphs/scratchy.lhs view
@@ -1,6 +1,6 @@ scratchy (jmcc) -> do { n <- clone 2 (brownNoise AR)+> do { n <- clone 2 (M.brownNoise ar) >    ; let f = max (n * 0.5 - 0.49) 0 * 20 >      in audition (out 0 (rhpf f 5000 1)) } @@ -10,7 +10,6 @@  with non-monadic noise -> let { bn = Sound.SC3.UGen.Base.brownNoise->     ; f m = bn (uid m) AR * 0.5 - 0.49+> let { f m = B.brownNoise (uid m) ar * 0.5 - 0.49 >     ; n = mce [f 0, f 1] } > in audition (out 0 (rhpf (max n 0 * 20) 5000 1))
Help/Graphs/scritto.lhs view
@@ -103,17 +103,17 @@ >     ; s_msg n (_, f, a, b) = b_setn1 n 0 (f ++ a ++ b) >     ; s_alloc fd (s, b) = do { async fd (b_alloc b 15 1) >                              ; send fd (s_msg b s) }->     ; buf_at b n = bufRd 1 KR b (mce [n .. n + 4]) NoLoop NoInterpolation+>     ; buf_at b n = bufRd 1 kr b (mce [n .. n + 4]) NoLoop NoInterpolation >     ; v_filter i f a b = resonz i f (b / f) * dbAmp a >     ; v_filter_b bi i = v_filter i (buf_at bi 0) (buf_at bi 5) (buf_at bi 10) >     ; mk_instr bx = do ->         { n <- lfNoise2 KR 3->         ; let { t = impulse AR (n * 9 + 9) 0->               ; i d = do { n1 <- tRand 0.02 0.06 t->                          ; n2 <- tiRand 30 52 t->                          ; n3 <- tiRand 16 32 t+>         { n <- M.lfNoise2 kr 3+>         ; let { t = impulse ar (n * 9 + 9) 0+>               ; i d = do { n1 <- M.tRand 0.02 0.06 t+>                          ; n2 <- M.tiRand 30 52 t+>                          ; n3 <- M.tiRand 16 32 t >                          ; let { p = pulseDivider t d 0->                                ; b = blip AR (midiCPS n2) n3 }+>                                ; b = blip ar (midiCPS n2) n3 } >                            in return (decay2 p 0.01 n1 * b * 12) } >               ; bi = linLin n (-1) 1 0 bx >               ; voice = mix . v_filter_b bi }
Help/Graphs/shepard-tones.lhs view
@@ -13,11 +13,11 @@ >     ; freqTable = map amp_f (indxs 1024 0 10) >     ; ratescale = 1024 / 44100 / 10 >     ; rate = 0.1->     ; ph = phasor AR 0 (rate * ratescale) 0 1024 0+>     ; ph = phasor ar 0 (rate * ratescale) 0 1024 0 >     ; phases = mce (map (\n -> n * 0.1 * 1024 + ph) [0..9])->     ; freqs = bufRdC 1 AR 1 phases Loop->     ; amps = bufRdC 1 AR 2 phases Loop->     ; tone = mix (sinOsc AR freqs 0 * amps) * 0.1 }+>     ; freqs = bufRdC 1 ar 1 phases Loop+>     ; amps = bufRdC 1 ar 2 phases Loop+>     ; tone = mix (sinOsc ar freqs 0 * amps) * 0.1 } > in withSC3 (\fd -> do { async fd (b_alloc 1 1024 1) >                       ; async fd (b_alloc 2 1024 1) >                       ; send fd (b_setn1 1 0 freqTable)
Help/Graphs/shifting-pulses.lhs view
@@ -1,10 +1,10 @@ shifting pulses (rd) -> do { [n0, n1, n2] <- replicateM 3 (clone 2 (brownNoise KR))->    ; t <- dust KR 0.75+> do { [n0, n1, n2] <- replicateM 3 (clone 2 (M.brownNoise kr))+>    ; t <- M.dust kr 0.75 >    ; let { warp i = linLin i (-1) 1 >          ; l = latch t t->          ; p = pulse AR (warp n0 2 (mce2 11 15)) 0.01 * 0.1 +>          ; p = pulse ar (warp n0 2 (mce2 11 15)) 0.01 * 0.1  >          ; f = warp n1 300 1800  >          ; rq = warp n2 0.01 2 } >      in audition (out 0 (l * rlpf p f rq)) }
Help/Graphs/snare-909.lhs view
@@ -1,23 +1,23 @@ snare-909 (jmcc)  > let { snr tr n v =->       let { e a b = envGen AR tr 1 0 1 DoNothing (envPerc a b)+>       let { e a b = envGen ar tr 1 0 1 DoNothing (envPerc a b) >           ; e1 = e 0.0005 0.055 >           ; e2 = e 0.0005 0.075 >           ; e3 = e 0.0005 0.4 >           ; e4 = e 0.0005 0.283->           ; t1 = lfTri AR 330 0->           ; t2 = lfTri AR 185 0+>           ; t1 = lfTri ar 330 0+>           ; t2 = lfTri ar 185 0 >           ; x1 = lpf n 7040 * 0.1 + v >           ; x2 = hpf x1 523 >           ; m1 = t1 * e1 * 0.25 + t2 * e2 * 0.25 >           ; m2 = x1 * e3 * 0.20 + x2 * e4 * 0.20 } >       in m1 + m2->     ; x = mouseX KR 1 4 Linear 0.2->     ; y = mouseY KR 0.25 0.75 Exponential 0.2->     ; t = impulse KR (3 * x) 0 }-> in do { n <- whiteNoise AR->       ; v <- tRand 0.25 1.0 t+>     ; x = mouseX kr 1 4 Linear 0.2+>     ; y = mouseY kr 0.25 0.75 Exponential 0.2+>     ; t = impulse kr (3 * x) 0 }+> in do { n <- M.whiteNoise ar+>       ; v <- M.tRand 0.25 1.0 t >       ; audition (out 0 (pan2 (snr t n v) 0 y)) }  { var snr =
Help/Graphs/sosc-lp.lhs view
@@ -1,8 +1,8 @@ sosc-lp (rd) -> let { dustR r lo hi = do { n1 <- dwhite 1 lo hi->                          ; n2 <- whiteNoise r->                          ; d <- dseq dinf n1+> let { dustR r lo hi = do { n1 <- M.dwhite 1 lo hi+>                          ; n2 <- M.whiteNoise r+>                          ; d <- M.dseq dinf n1 >                          ; return (tDuty r d 0 DoNothing (abs n2) 1) } >     ; a = [60, 71, 89, 65, 36, 57, 92, 97, 92, 97] >     ; b = [71, 89, 60, 57, 65, 36, 95, 92, 93, 97]@@ -20,7 +20,7 @@ >     ; o2 t n = sinOsc ar (f2 t n) 0 * d_env t >     ; sosc_lp t n = out 0 ((o1 t + o2 t n) * 0.2) } > in do { clk <- dustR kr 0.2 0.9->       ; n <- lfNoise0 kr (mce2 1 3)+>       ; n <- M.lfNoise0 kr (mce2 1 3) >       ; audition (sosc_lp clk n) }  > let { a = [71, 60, 65, 89, 36, 57, 95, 97, 92, 97]
Help/Graphs/spe.lhs view
@@ -1,17 +1,17 @@ spe (jmcc)  > let { chain n f = foldl (>=>) return (replicate n f)->     ; rapf i = do { r <- clone 2 (rand 0 0.05)+>     ; rapf i = do { r <- clone 2 (M.rand 0 0.05) >                   ; return (allpassN i 0.05 r 4) }->     ; src = let { t = impulse KR 9 0->                 ; e = envGen KR t 0.1 0 1 DoNothing (envPerc 0.1 1)+>     ; src = let { t = impulse kr 9 0+>                 ; e = envGen kr t 0.1 0 1 DoNothing (envPerc 0.1 1) >                 ; s = mce [ 00, 03, 02, 07 >                           , 08, 32, 16, 18 >                           , 00, 12, 24, 32 ] }->             in do { n <- lfNoise1 KR 1->                   ; m <- dseq dinf s+>             in do { n <- M.lfNoise1 kr 1+>                   ; m <- M.dseq dinf s >                   ; let { f = midiCPS (demand t 0 m + 32)->                         ; o = lfSaw AR f 0 * e+>                         ; o = lfSaw ar f 0 * e >                         ; rq = midiCPS (n * 36 + 110) } >                     in return (rlpf o rq 0.1) } } > in audition . (out 0) =<< chain 4 rapf =<< src
Help/Graphs/sprinkler.lhs view
@@ -1,8 +1,8 @@ sprinkler (jmcc) -> do { n <- whiteNoise AR->    ;  let { f = lfPulse KR 0.09 0 0.16 * 10 + 7->           ; t = lfPulse KR f 0 0.25 * 0.1 }+> do { n <- M.whiteNoise ar+>    ;  let { f = lfPulse kr 0.09 0 0.16 * 10 + 7+>           ; t = lfPulse kr f 0 0.25 * 0.1 } >       in audition (out 0 (bpz2 (n * t))) }  { var f = LFPulse.kr(0.09, 0, 0.16, 10, 7)@@ -11,7 +11,7 @@  with non-monadic noise -> let { n = Sound.SC3.UGen.Base.whiteNoise (uid 0) AR->     ; f = lfPulse KR 0.09 0 0.16 * 10 + 7->     ; t = lfPulse KR f 0 0.25 * 0.1 }+> let { n = B.whiteNoise (uid 0) ar+>     ; f = lfPulse kr 0.09 0 0.16 * 10 + 7+>     ; t = lfPulse kr f 0 0.25 * 0.1 } > in audition (out 0 (bpz2 (n * t)))
Help/Graphs/strummable-guitar.lhs view
@@ -1,10 +1,10 @@ strummable guitar (jmcc)  > let { scale = [ 52, 57, 62, 67, 71, 76 ]->     ; str i = let { x = mouseX KR 0 1 Linear 0.2+>     ; str i = let { x = mouseX kr 0 1 Linear 0.2 >                   ; t = abs (hpz1 (x >* (0.25 + constant i * 0.1))) >                   ; e = decay t 0.05->                   ; n = Sound.SC3.UGen.Base.pinkNoise (uid 0) AR * e+>                   ; n = B.pinkNoise (uid i) ar * e >                   ; dt = 1 / (midiCPS (scale !! i)) >                   ; s = combL n dt dt 4 } >               in pan2 s (constant i * 0.2 - 0.5) 1
Help/Graphs/sweepy-noise.lhs view
@@ -1,9 +1,9 @@ sweepy noise (jmcc) -> do { n <- clone 2 (whiteNoise AR)->    ; let { lfoDepth = mouseY KR 200 8000 Exponential 0.1->          ; lfoRate = mouseX KR 4 60 Exponential 0.1->          ; freq = lfSaw KR lfoRate 0 * lfoDepth + (lfoDepth * 1.2)+> do { n <- clone 2 (M.whiteNoise ar)+>    ; let { lfoDepth = mouseY kr 200 8000 Exponential 0.1+>          ; lfoRate = mouseX kr 4 60 Exponential 0.1+>          ; freq = lfSaw kr lfoRate 0 * lfoDepth + (lfoDepth * 1.2) >          ; filtered = rlpf (n * 0.03) freq 0.1 } >      in audition (out 0 (combN filtered 0.3 0.3 2 + filtered)) } 
Help/Graphs/synthetic-piano.lhs view
@@ -1,11 +1,11 @@ synthetic piano (jmcc) -> let p = do { n <- iRand 36 90->            ; f <- rand 0.1 0.5->            ; ph <- rand 0 (pi * 2)->            ; let { s = impulse AR f ph * 0.1+> let p = do { n <- M.iRand 36 90+>            ; f <- M.rand 0.1 0.5+>            ; ph <- M.rand 0 (pi * 2)+>            ; let { s = impulse ar f ph * 0.1 >                  ; e = decay2 s 0.008 0.04->                  ; c i = do { n0 <- lfNoise2 AR 3000+>                  ; c i = do { n0 <- M.lfNoise2 ar 3000 >                             ; let { o = [-0.05, 0, 0.04] !! i >                                   ; dt = 1 / (midiCPS (n + o)) } >                               in return (combL (n0 * e) dt dt 6) }
Help/Graphs/tank.lhs view
@@ -1,20 +1,20 @@ tank (jmcc) -> let { r_allpass i = do { r <- clone 2 (rand 0.005 0.02)+> let { r_allpass i = do { r <- clone 2 (M.rand 0.005 0.02) >                        ; return (allpassN i 0.03 r 1) } >     ; chain n f = foldl (>=>) return (replicate n f)->     ; pling = do { d <- dust AR 0.2->                  ; f <- expRand 300 2200->                  ; p <- rand (-1) 1->                  ; let { s1 = cubed (fSinOsc AR f 0)+>     ; pling = do { d <- M.dust ar 0.2+>                  ; f <- M.expRand 300 2200+>                  ; p <- M.rand (-1) 1+>                  ; let { s1 = cubed (fSinOsc ar f 0) >                        ; s2 = decay2 d 0.1 0.5 * 0.1 * s1 } >                    in return (pan2 s2 p 1) }->     ; bang = do { d <- dust AR 0.01->                 ; n <- brownNoise AR+>     ; bang = do { d <- M.dust ar 0.01+>                 ; n <- M.brownNoise ar >                 ; return (pan2 (decay2 d 0.04 0.3 * n) 0 1) }->     ; tank i = do { r1 <- clone 2 (rand 0.01 0.05)->                   ; r2 <- clone 2 (rand 0.03 0.15)->                   ; let { l0 = localIn 2 AR * 0.98+>     ; tank i = do { r1 <- clone 2 (M.rand 0.01 0.05)+>                   ; r2 <- clone 2 (M.rand 0.03 0.15)+>                   ; let { l0 = localIn 2 ar * 0.98 >                         ; l1 = onePole l0 0.33 >                         ; [l1l, l1r] = mceChannels l1 >                         ; l2 = rotate2 l1l l1r 0.23
Help/Graphs/tgb.lhs view
@@ -1,17 +1,17 @@ tgb (rd) -> let { mkls bp t = envGen KR 1 1 0 1 RemoveSynth (envCoord bp t 1 EnvLin)+> let { mkls bp t = envGen kr 1 1 0 1 RemoveSynth (envCoord bp t 1 EnvLin) >     ; pm_t l r d t = let { le = mkls l d >                          ; re = mkls r d }->                      in tRand le re t+>                      in M.tRand le re t >     ; wrp i l r = linLin i (-1) 1 l r >     ; pm_n rt l d = let { le = mkls l d >                         ; re = mkls l d }->                     in do { n <- whiteNoise rt+>                     in do { n <- M.whiteNoise rt >                           ; return (wrp n le re) } >     ; rrand l r = getStdRandom (randomR (l, r))->     ; gb b d = do { gps <- pm_n AR [(0, 400), (1, 900)] d->                   ; let { t = impulse AR gps 0+>     ; gb b d = do { gps <- pm_n ar [(0, 400), (1, 900)] d+>                   ; let { t = impulse ar gps 0 >                         ; pm_f (l, r) = pm_t l r d t } >                     in do { du <- pm_f ([(0, 0.005), (0.5, 0.015), (1, 0.005)] >                                        ,[(0, 0.009), (0.5, 0.020), (1, 0.009)])@@ -23,7 +23,7 @@ >                                        ,[(0, 0), (1, 1)]) >                           ; am <- pm_f ([(0, 0.25), (0.5, 0.55), (1, 0.15)] >                                        ,[(0, 0.5), (0.5, 0.75), (1, 0.25)])->                           ; let cs' = cs * (bufDur KR b)+>                           ; let cs' = cs * (bufDur kr b) >                             in return (tGrains 2 t b rt cs' du pn am 2) } } >     ; fn = "/home/rohan/audio/text.snd" } > in withSC3 (\fd -> do { async fd (b_allocRead 10 fn 0 0)
Help/Graphs/tgr-rpr.lhs view
@@ -7,11 +7,11 @@ >                , 0.2, 0.3 >                , 0.7, 0.9 >                , -1.0, 1.0 ]->     ; dustR r lo hi = do { n1 <- dwhite 1 lo hi->                          ; n2 <- whiteNoise r->                          ; d <- dseq dinf n1+>     ; dustR r lo hi = do { n1 <- M.dwhite 1 lo hi+>                          ; n2 <- M.whiteNoise r+>                          ; d <- M.dseq dinf n1 >                          ; return (tDuty r d 0 DoNothing (abs n2) 1) }->     ; rpr n t = tRand (in' 1 KR n) (in' 1 KR (n + 1)) t+>     ; rpr n t = tRand (in' 1 kr n) (in' 1 kr (n + 1)) t >     ; rrand l r = getStdRandom (randomR (l, r)) >     ; rSet = [ (0.005, 0.025), (0.05, 0.25) >              , (0.75,  0.95) , (1.05, 1.25)@@ -22,10 +22,10 @@ >     ; edit fd = do { s <- mapM (\(l,r) -> rrand l r) rSet >                    ; send fd (c_setn [(0, s)]) >                    ; threadDelay 350000 } }-> in do { clk <- dustR AR (in' 1 KR 0) (in' 1 KR 1)+> in do { clk <- dustR ar (in' 1 kr 0) (in' 1 kr 1) >       ; rat <- rpr 2 clk >       ; dur <- rpr 4 clk->       ; pos <- liftM (* (bufDur KR 10)) (rpr 8 clk)+>       ; pos <- liftM (* (bufDur kr 10)) (rpr 8 clk) >       ; pan <- rpr 10 clk >       ; amp <- rpr 6 clk >       ; withSC3 (\fd -> do { async fd (b_allocRead 10 sf 0 0)
Help/Graphs/theremin.lhs view
@@ -2,11 +2,11 @@  > let { m = 7 >     ; detune = 0->     ; x = mouseX KR 0 0.9 Linear 0.2->     ; y = mouseY KR 4000 200 Exponential 0.8+>     ; x = mouseX kr 0 0.9 Linear 0.2+>     ; y = mouseY kr 4000 200 Exponential 0.8 >     ; f = y + detune->     ; f' = f + f * sinOsc AR m 0 * 0.02->     ; a = sinOsc AR f' 0 * x }+>     ; f' = f + f * sinOsc ar m 0 * 0.02+>     ; a = sinOsc ar f' 0 * x } > in audition (out 0 (pan2 a 0 1))  { var mod = 7
Help/Graphs/three-cpsw.lhs view
@@ -1,13 +1,13 @@ three-cpsw (rd) -> do { t <- dust KR (mce2 12 18)->    ; f0 <- tRand 1 64 t->    ; f1 <- lfNoise0 KR f0->    ; a <- tRand 0.0 0.5 t->    ; dt <- tRand 0.975 1.025 t->    ; dh <- tRand 0.750 0.7505 t+> do { t <- M.dust kr (mce2 12 18)+>    ; f0 <- M.tRand 1 64 t+>    ; f1 <- M.lfNoise0 kr f0+>    ; a <- M.tRand 0.0 0.5 t+>    ; dt <- M.tRand 0.975 1.025 t+>    ; dh <- M.tRand 0.750 0.7505 t >    ; let { f = f1 * mce2 9000 12000 + 9500->          ; o = saw AR f + saw AR (f * dh) + saw AR (f * dt) }+>          ; o = saw ar f + saw ar (f * dh) + saw ar (f * dt) } >      in audition (out 0 (clip2 (o * a) 0.75)) }  { var t = Dust.kr([12, 18])
Help/Graphs/tipnso.lhs view
@@ -1,12 +1,12 @@ tipnso (rd) -> let { x = mouseX KR 1 32 Linear 0.1->     ; t = impulse AR x 0 }-> in do { n1 <- tiRand 16 72 t->       ; n2 <- tiRand 0 1 t->       ; n3 <- pinkNoise AR+> let { x = mouseX kr 1 32 Linear 0.1+>     ; t = impulse ar x 0 }+> in do { n1 <- M.tiRand 16 72 t+>       ; n2 <- M.tiRand 0 1 t+>       ; n3 <- M.pinkNoise ar >       ; let { e = decay2 t 0.01 (mce2 0.1 0.15) >             ; f = midiCPS (n1 + 36 + (12 * n2))->             ; s = sinOsc AR f 0 * e+>             ; s = sinOsc ar f 0 * e >             ; b = bpf (n3 * e) (36 + midiCPS n1) (175 / (midiCPS n1)) } >         in audition (out 0 ((s + b) * mce2 0.15 0.1)) }
Help/Graphs/tr-out.lhs view
@@ -1,13 +1,13 @@ tr-out (rd) -> let node n = do { t <- dust KR 1.6->                 ; r1 <- tRand 0 6 t->                 ; r2 <- tRand 0 6 t->                 ; r3 <- tRand 0 6 t->                 ; let { f = midiCPS (bufRdN 1 KR 0 r1 NoLoop)->                       ; p = bufRdN 1 KR 1 r2 NoLoop->                       ; a = bufRdN 1 KR 2 r3 NoLoop }->                   in return ( pan2 (sinOsc AR f 0) p a+> let node n = do { t <- M.dust kr 1.6+>                 ; r1 <- M.tRand 0 6 t+>                 ; r2 <- M.tRand 0 6 t+>                 ; r3 <- M.tRand 0 6 t+>                 ; let { f = midiCPS (bufRdN 1 kr 0 r1 NoLoop)+>                       ; p = bufRdN 1 kr 1 r2 NoLoop+>                       ; a = bufRdN 1 kr 2 r3 NoLoop }+>                   in return ( pan2 (sinOsc ar f 0) p a >                             , sendTrig t n (f / 660) ) } > in withSC3 (\fd -> do { async fd (b_alloc 0 6 1) >                       ; send fd (b_setn1 0 0 [60, 62, 64, 65, 67, 69])
Help/Graphs/trkl.lhs view
@@ -4,21 +4,21 @@ >         let { tf = xLine kr 1 ul d RemoveSynth >             ; st = impulse ar (tf * 8) 0 >             ; t = impulse ar tf 0 }->         in do { r0 <- rand (-1) 1->               ; r1 <- rand (-1) 1->               ; r2 <- tRand 0.05 1.0 t->               ; r3 <- tExpRand 0.0 0.25 st ->               ; fh <- tRand 1.75 2.25 t +>         in do { r0 <- M.rand (-1) 1+>               ; r1 <- M.rand (-1) 1+>               ; r2 <- M.tRand 0.05 1.0 t+>               ; r3 <- M.tExpRand 0.0 0.25 st +>               ; fh <- M.tRand 1.75 2.25 t  >               ; let { a = dbAmp (line kr 12 la d RemoveSynth) >                     ; f = xLine kr fu 900 d RemoveSynth >                     ; p = line kr r0 r1 d RemoveSynth >                     ; o1 = mix (ringz (decay2 t 0.01 dy) (mce2 f (f * fh)) fy) >                     ; o2 = mix (saw ar (mce2 f (f * fh))) } >                in return (pan2 (o1 + o2 * decay2 t 0.1 r2 * r3) p a) }-> in do { d <- rand 0.5 16->       ; ul <- rand 16 64->       ; fu <- rand 1200 9000->       ; dy <- rand 0.005 0.175->       ; la <- rand (-60) (-25)->       ; fy <- rand 0.015 0.125+> in do { d <- M.rand 0.5 16+>       ; ul <- M.rand 16 64+>       ; fu <- M.rand 1200 9000+>       ; dy <- M.rand 0.005 0.175+>       ; la <- M.rand (-60) (-25)+>       ; fy <- M.rand 0.015 0.125 >       ; audition . (out 0) =<< trkl d ul fu dy la fy }
Help/Graphs/trmlo.lhs view
@@ -1,10 +1,6 @@ trmlo (rd) -> import System.IO.Unsafe--> let { u_iRand p q = unsafePerformIO (iRand p q)->     ; u_rand p q = unsafePerformIO (rand p q)->     ; mWrp i l r = linLin i (-1) 1 (midiCPS l) (midiCPS r)+> let { mWrp i l r = linLin i (-1) 1 (midiCPS l) (midiCPS r) >     ; mWrp1 i m = mWrp i m (m + 1) >     ; mWrpN i m n = mWrp i m (m + n) >     ; o1 = let { f = 5@@ -14,28 +10,28 @@ >                ; n = 65 >                ; m = sinOsc kr f 0 } >            in pan2 (sinOsc ar (mWrp1 m n) 0) m e->     ; o2 = let { f = u_iRand 5 9->                ; d = u_iRand 5 9->                ; s = envSine d (u_rand 0.1 0.2)+>     ; o2 = let { f = U.iRand 5 9+>                ; d = U.iRand 5 9+>                ; s = envSine d (U.rand 0.1 0.2) >                ; e = envGen kr 1 1 0 1 DoNothing s->                ; n = u_iRand 69 72+>                ; n = U.iRand 69 72 >                ; m = sinOsc kr f 0 } >            in pan2 (sinOsc ar (mWrp1 m n) 0) m e->     ; o3 = let { f = u_iRand 5 9->                ; d = u_iRand 9 12->                ; s = envSine d (u_rand 0.1 0.2)+>     ; o3 = let { f = U.iRand 5 9+>                ; d = U.iRand 9 12+>                ; s = envSine d (U.rand 0.1 0.2) >                ; e = envGen kr 1 1 0 1 DoNothing s->                ; n = u_iRand 69 72+>                ; n = U.iRand 69 72 >                ; m = sinOsc kr f 0->                ; l = line kr 0 (u_iRand 1 5) d DoNothing }+>                ; l = line kr 0 (U.iRand 1 5) d DoNothing } >            in pan2 (blip ar (mWrp1 m (n + l)) (linLin m (-1) 1 1 2)) m e->     ; o4 = let { f = u_iRand 5 18->                ; d = u_iRand 12 15->                ; s = envSine d (u_rand 0.1 0.2)+>     ; o4 = let { f = U.iRand 5 18+>                ; d = U.iRand 12 15+>                ; s = envSine d (U.rand 0.1 0.2) >                ; e = envGen kr 1 5e-2 0 1 DoNothing s->                ; n = u_iRand 69 72+>                ; n = U.iRand 69 72 >                ; m = sinOsc kr f 0->                ; l = line kr 0 (u_iRand 1 5) d RemoveSynth->                ; fr = mWrpN m (n + l) (u_iRand 1 5) }->            in pan2 (blip ar fr (linLin m (-1) 1 1 (u_iRand 2 24))) m e }+>                ; l = line kr 0 (U.iRand 1 5) d RemoveSynth+>                ; fr = mWrpN m (n + l) (U.iRand 1 5) }+>            in pan2 (blip ar fr (linLin m (-1) 1 1 (U.iRand 2 24))) m e } > in audition (out 0 (o1 + o2 + o3 + o4))
Help/Graphs/tsort.lhs view
@@ -11,8 +11,8 @@  > let { n = 122 >     ; c = envCoord [(0,0), (0.15, 1), (6, 0)] 1 1 EnvLin->     ; e = envGen KR 1 1 0 1 RemoveSynth c->     ; f o = sinOsc AR (440 + constant o) 0 * 0.001+>     ; e = envGen kr 1 1 0 1 RemoveSynth c+>     ; f o = sinOsc ar (440 + constant o) 0 * 0.001 >     ; s = mixFill n f } > in audition (out 0 (s * e)) 
Help/Graphs/vlc-distrtn.lhs view
@@ -82,14 +82,14 @@ >             , (-67.32140, -2.79905) >             , (-68.22010, -2.33831) ] >     ; partial i freq detune fall n =->         do { n0 <- lfNoise1 kr 1->            ; n1 <- rand 0.75 1.25+>         do { n0 <- M.lfNoise1 kr 1+>            ; n1 <- M.rand 0.75 1.25 >            ; let { m = n * 2 >                  ; ampl = bufRdN 1 kr 0 m NoLoop >                  ; f = freq * (n + 1) * (n0 * detune + 1) } >              in return (ringz i f (fall * n1) * ampl) } >     ; plyr n =->         let { ctl j k = Control KR j k+>         let { ctl j k = Control kr j k >             ; buf = ctl "buf" 0 >             ; iamp = ctl "iamp" 0.1 >             ; ampl = ctl "ampl" 0.1
Help/Graphs/voscil.lhs view
@@ -1,9 +1,7 @@ voscil (rd) -> import System.IO.Unsafe- > let { rrand l r = getStdRandom (randomR (l, r))->     ; lfn r = unsafePerformIO (lfNoise0 kr r)+>     ; lfn r = U.lfNoise0 kr r >     ; b = 32 >     ; hb = (constant b - 1) / 2 >     ; bn = 8192 * 4
Help/Graphs/what-was-i-thinking.lhs view
@@ -1,14 +1,14 @@ what was i thinking? (jmcc) -> do { n0 <- lfNoise1 KR 0.2->    ; n1 <- lfNoise1 KR 0.157->    ; let { p = pulse AR f (n1 * 0.4 + 0.5) * 0.04->          ; i = lfPulse AR 0.1 0 0.05 * impulse AR 8 0 * 500+> do { n0 <- M.lfNoise1 kr 0.2+>    ; n1 <- M.lfNoise1 kr 0.157+>    ; let { p = pulse ar f (n1 * 0.4 + 0.5) * 0.04+>          ; i = lfPulse ar 0.1 0 0.05 * impulse ar 8 0 * 500 >          ; d = decay i 2->          ; f = max (sinOsc KR 4 0 + 80) d+>          ; f = max (sinOsc kr 4 0 + 80) d >          ; z = rlpf p (n0 * 2000 + 2400) 0.2->          ; c x = do { r <- rand 0 0.3->                     ; n <- lfNoise1 KR r+>          ; c x = do { r <- M.rand 0 0.3+>                     ; n <- M.lfNoise1 kr r >                     ; return (combL x 0.06 (n * 0.025 + 0.035) 1) } >          ; y = z * 0.6 } >      in do { z0 <- clone 2 (c y)
Help/Graphs/wial.lhs view
@@ -2,8 +2,8 @@  > let { pls c d f = let { t = pulseDivider c d 0 >                       ; e = decay2 t 0.05 0.75->                       ; o = sinOsc AR (toggleFF t * f + f * 2) 0 }->                    in do { n0 <- tiRand 0 1 t+>                       ; o = sinOsc ar (toggleFF t * f + f * 2) 0 }+>                    in do { n0 <- M.tiRand 0 1 t >                          ; return (o * e * n0 * 0.5) } >     ; smpl f = [ (4, 6, f      ,  0.75) >                , (2, 6, f *   2,  0.75)@@ -13,7 +13,7 @@ >                , (1, 3, f * 256,  0.15) >                , (2, 3, f * 512,  0.35) ] >     ; plss c (d0, d1, f, a) = liftM (* a) (pls c (mce2 d0 d1) f)->     ; clk = impulse AR 16 0 }-> in do { n0 <- dust KR 2->       ; f <- twChoose n0 (mce2 (20 * 0.66) 20) (mce2 0.25 0.75) 0+>     ; clk = impulse ar 16 0 }+> in do { n0 <- M.dust kr 2+>       ; f <- M.twChoose n0 (mce2 (20 * 0.66) 20) (mce2 0.25 0.75) 0 >       ; audition . out 0 . sum =<< mapM (plss clk) (smpl f) }
Help/Graphs/wind-metals.lhs view
@@ -1,13 +1,13 @@ wind metals (jmcc)  > let n = 6-> in do { base <- expRand 60 4000->       ; range <- rand 500 8000->       ; n0 <- clone 2 (brownNoise AR)->       ; r0 <- expRand 0.125 0.5->       ; n1 <- lfNoise1 KR r0->       ; f <- replicateM n (rand base (base + range))->       ; dt <- replicateM n (rand 0.1 2)+> in do { base <- M.expRand 60 4000+>       ; range <- M.rand 500 8000+>       ; n0 <- clone 2 (M.brownNoise ar)+>       ; r0 <- M.expRand 0.125 0.5+>       ; n1 <- M.lfNoise1 kr r0+>       ; f <- replicateM n (M.rand base (base + range))+>       ; dt <- replicateM n (M.rand 0.1 2) >       ; let { exc = n0 * 0.007 * max 0 (n1 * 0.75 + 0.25) >             ; k = klankSpec f (replicate n 1) dt >             ; s = klank exc 1 0 1 k }
Help/Graphs/xy-interference.lhs view
@@ -1,12 +1,20 @@ xy-interference (rd) -> let { x = mouseX KR 20 22000 Linear (mce2 0.005 0.025)->     ; y = mouseY KR 20 22000 Linear (mce2 0.005 0.075)->     ; nd = do { n <- lfNoise0 KR (mce2 5 9)->               ; let { a = sinOsc AR (x + n) 0->                     ; b = sinOsc AR y 0 }+> let { x = mouseX kr 20 22000 Linear (mce2 0.005 0.025)+>     ; y = mouseY kr 20 22000 Linear (mce2 0.005 0.075)+>     ; nd = do { n <- M.lfNoise0 kr (mce2 5 9)+>               ; let { a = sinOsc ar (x + n) 0+>                     ; b = sinOsc ar y 0 } >                 in return (a * b) } } > in audition . (out 0) . sum =<< replicateM 3 nd++> let { x = mouseX kr 20 22000 Linear (mce2 0.005 0.025)+>     ; y = mouseY kr 20 22000 Linear (mce2 0.005 0.075)+>     ; nd k = let { n = B.lfNoise0 (uid k) kr (mce2 5 9)+>                  ; a = sinOsc ar (x + n) 0+>                  ; b = sinOsc ar y 0 }+>              in a * b }+> in audition (out 0 (sum (map nd [1..3])))  { var x = MouseX.kr(20, 22000, 'linear', [0.005, 0.025]) ; var y = MouseY.kr(20, 22000, 'linear', [0.005, 0.075])
Help/Tutorial/Tutorial.lhs view
@@ -27,8 +27,7 @@ Add an appropriately modified variant of the following to ~/.emacs    (push "~/sw/hsc3/emacs" load-path)-  (setq hsc3-interpreter "ghci")-  (setq hsc3-help-directory "~/sw/hsc3/ Help/")+  (setq hsc3-help-directory "~/sw/hsc3/Help/")   (require 'hsc3)  The hsc3 emacs mode associates itself with files having the extension@@ -48,20 +47,24 @@ either by selecting from the 'Haskell SuperCollider' menu or using the associated keybinding. -* Interpreter Interaction+* Interpreter Interaction & User Configuration -To start ghci and load the list of modules at the emacs variables-'hsc3-main-modules' and 'hsc3-modules' use C-cC-s (Haskell-SuperCollider -> Haskell -> Start haskell).  By default-'hsc3-main-modules' is empty and 'hsc3-modules' contains-Sound.OpenSoundControl, Sound.SC3, Data.List, Control.Monad,-Control.Concurrent, System.Directory and System.Random.+To start ghci and load the file at 'hsc3-run-control' file use C-cC-s+(Haskell SuperCollider -> Haskell -> Start haskell).   +If there is no file at 'hsc3-run-control' one will be created and the+modules at 'hsc3-modules' will be imported.  By default this list+contains the hosc and hsc3 modules as well as Control.Concurrent,+Control.Monad, Data.List, and System.Random.+ Starting the interpreter splits the current window into two windows.  If the ghci output window becomes obscured during a session you can see it again by typing C-cC-g (Haskell SuperCollider -> Haskell -> See output). +To interrupt ghci type C-cC-i (Haskell SuperCollider -> Haskell ->+Interrupt haskell).+ To stop ghci type C-cC-x (Haskell SuperCollider -> Haskell -> Quit haskell). @@ -95,7 +98,7 @@ audition function places the synthesis node into the group node with ID 1, the expression below deletes that group. -> withSC3 ((flip send) (n_free [1]))+> withSC3 (\fd -> send fd (n_free [1]))  In order to audition another graph we need to re-create a group with ID 1.  Sound.SC3 includes a function 'reset' that sequences these two@@ -154,8 +157,8 @@  ghci understands import expressions, so to add a module to the current scope it is enough to type C-cC-c at an appropriate-location.  If hsc3-dot is installed, the following lines will-make a drawing.+location.  If hsc3-dot is installed, the following two +expressions will load the module and make a drawing.  > import Sound.SC3.UGen.Dot @@ -212,16 +215,6 @@ audition it.  In many cases both supercollider language and haskell versions are given, switch the emacs buffer to sclang-mode to run the supercollider language versions.--* User configuration files--It is straightforward to add configuration modules to the context in-which the hsc3 emacs mode evaluates expressions using the-'hsc3-main-modules' variable.  The search path for these modules can-be set using 'hsc3-interpreter-arguments'.-- (setq hsc3-interpreter-arguments (list "-i/home/rohan/.hsc3"))- (setq hsc3-main-modules (list "Config"))  * Monitoring incoming server messages 
Help/hsc3.help.lhs view
@@ -163,7 +163,7 @@ > in audition (out 0 (pan2 o1 x 0.1 + o2))  This is turn causes the (*) function to-expands and perform channel matching, that is+expand and perform channel matching, that is to duplicate the right hand side input as required. @@ -182,7 +182,7 @@ downwards, however in complex graphs this seems occasionally unreliable. -> let f = (mce2 440 440)+> let f = mce2 440 440 > in audition (out 0 (sinOsc AR f 0 * 0.1))  * Multiply add inputs, Haskell Curry, and cloning@@ -236,8 +236,8 @@ which is defined in relation to the standard monad functions replicateM and liftM. -| clone :: (UId m) => Int -> m UGen -> m UGen-| clone n u = liftM mce (replicateM n u)+> clone :: (UId m) => Int -> m UGen -> m UGen+> clone n u = liftM mce (replicateM n u)  * Multiple Root Graphs @@ -296,6 +296,12 @@ >     ; a = 0.1 :: Float } > in sinOsc AR (constant f) (constant p) * (constant a) +The most common case requiring constant annotations+is buffer numbers, which must be provided to unit+generator graphs as values of type 'UGen' and to+the server command constructors as values of type+'Int'.+ * Unit generators are comparable  In haskell the Eq and Ord type classes define@@ -312,7 +318,7 @@  Since the Ord type gives the signature: -| (>) :: (Ord a) => a -> a -> Bool+> (>) :: (Ord a) => a -> a -> Bool  we define a variant with a star suffix, such that:@@ -369,8 +375,8 @@ This is acceptable for deterministic unit generators, such as sinOsc, but of course fails for non-deterministic unit generators such as-whiteNoise, and for demand rate sources such as-dseq.+whiteNoise, and also for demand rate sources+such as dseq.  In supercollider language, the graph @@ -418,7 +424,7 @@  > whiteNoise :: (UId m) => Rate -> m UGen -where UId is defined as:+where the type-class UId is defined as:  > class (Monad m) => UId m where >     generateUId :: m Int@@ -438,7 +444,7 @@ > sinOsc :: Rate -> UGen -> UGen -> UGen  We can write a white noise graph using this-function as:+function and the haskell 'do' notation as:  > do { a <- whiteNoise AR >    ; b <- whiteNoise AR@@ -465,9 +471,9 @@ > in audition (out 0 (c * 0.1))  where (>>=) is the monadic bind function, and (\x--> y) is the syntax for function definition-(ie. {|x| y} in supercollider language.  The-signature for bind is:+-> y) is the notation for lambda expressions+(ie. for function definition, ie. {|x| y} in+supercollider language).  The signature for bind is:  > (>>=) :: (Monad m) => m a -> (a -> m b) -> m b @@ -485,6 +491,15 @@ It is the type of audition that determines the type of a, the type is inferred so there is no need to write it.++> let { (|>) = flip (.)+>     ; a >>=* b = a >>= b |> return+>     ; u1 = sinOsc ar 440 0 * 0.1+>     ; u2 = pinkNoise ar >>=* (* 0.1)+>     ; u3 = B.pinkNoise (uid 0) ar * 1+>     ; u4 = resonz u3 (440 * 4) 0.1+>     ; g = u2 >>=* (+ (u1 + u4)) }+> in g >>= out 0 |> audition  * Unsafe unit generator constructors 
README view
@@ -10,5 +10,9 @@   http://audiosynth.com/   http://gnu.org/software/emacs/ -(c) rohan drape, 2006-2008+(c) rohan drape and others, 2006-2008     gpl, http://gnu.org/copyleft/+    with contributions by henning thielemann+                        & stefan kersten+                        & alex mclean+    see darcs history for details
Sound/SC3/Server/NRT.hs view
@@ -1,8 +1,10 @@ module Sound.SC3.Server.NRT ( encodeNRT -                            , writeNRT ) where+                            , writeNRT+                            , putNRT ) where  import qualified Data.ByteString.Lazy as B import Sound.OpenSoundControl+import System.IO  -- | Encode and prefix with encoded length. oscWithSize :: OSC -> B.ByteString@@ -14,6 +16,10 @@ encodeNRT :: [OSC] -> B.ByteString encodeNRT s = B.concat (map oscWithSize s) --- | Write an list of OSC bundles as an NRT score.+-- | Write a list of OSC bundles as an NRT score. writeNRT :: FilePath -> [OSC] -> IO () writeNRT fn s = B.writeFile fn (encodeNRT s)++-- | Write a list of OSC bundles as an NRT score to a file handle.+putNRT :: Handle -> [OSC] -> IO ()+putNRT h s = B.hPut h (encodeNRT s)
+ Sound/SC3/Server/Process.hs view
@@ -0,0 +1,324 @@+{-# LANGUAGE TypeSynonymInstances #-}+-- | This module includes utilities for spawning an external scsynth process,+-- either for realtime or non-realtime execution.+module Sound.SC3.Server.Process (+    Verbosity(..),+    ServerOptions(..),+    defaultServerOptions,+    NRTOptions(..),+    defaultNRTOptions,+    RTOptions(..),+    defaultRTOptionsUDP,+    defaultRTOptionsTCP,+    EventHandler(..),+    defaultEventHandler,+    withSynth,+    withNRT+) where++import Sound.OpenSoundControl (Transport, TCP, UDP, openTCP, openUDP)+import Control.Concurrent (forkIO)+import Control.Monad (unless)+import Prelude hiding (catch)+import Data.List (isPrefixOf)+import Data.Maybe (fromMaybe)+import System.Exit (ExitCode)+import System.IO (Handle, hGetLine, hIsEOF, hPutStrLn, stderr, stdout)+import System.Process (runInteractiveProcess, waitForProcess)++-- ====================================================================+-- scsynth commandline options++class CommandLine a where+    argumentList :: a -> [String]++-- | Convert a value to an option string.+class Show a => Option a where+    showOption :: a -> String+    showOption = show++-- | String options need special handling (show introduces an additional level+-- of quoting).+instance Option (String) where+    showOption = id++-- | Option instance for Int with default method implementations.+instance Option (Int)++mkOpt :: (Eq b, Option b, Show b) => String -> (a -> b) -> a -> a -> [String]+mkOpt _ f d v | (f v) == (f d) = []+mkOpt o f _ v                  = [o, showOption (f v)]++mkMaybeOpt :: (Option a, Show a) => String -> Maybe a -> [String]+mkMaybeOpt o = maybe [] ((o:) . (:[]) . showOption)++-- ====================================================================+-- * Server options++-- | Used with the 'verbosity' field in 'ServerOptions'.+data Verbosity =+    Silent+  | Quiet+  | Normal+  | Verbose+  | VeryVerbose+  | ExtremelyVerbose+  deriving (Eq, Show)++-- 'Enum' instance for 'Verbosity' for conversion to a commandline option.+instance Enum (Verbosity) where+    fromEnum Silent             = -2+    fromEnum Quiet              = -1+    fromEnum Normal             =  0+    fromEnum Verbose            =  1+    fromEnum VeryVerbose        =  2+    fromEnum ExtremelyVerbose   =  4++    toEnum (-1)                 = Quiet+    toEnum 0                    = Normal+    toEnum 1                    = Verbose+    toEnum 2                    = VeryVerbose+    toEnum x | x >= 4           = ExtremelyVerbose+    toEnum _                    = Silent++-- | Specify general server options used b oth in realtime and non-realtime+-- mode.+data ServerOptions = ServerOptions {+    serverProgram               :: FilePath,    -- ^ Path to the @scsynth@ program+    numberOfControlBusChannels  :: Int,         -- ^ Number of allocated control bus channels+    numberOfAudioBusChannels    :: Int,         -- ^ Number of allocated audio bus channels+    numberOfInputBusChannels    :: Int,         -- ^ Number of physical input channels+    numberOfOutputBusChannels   :: Int,         -- ^ Number of physical output channels+    blockSize                   :: Int,         -- ^ Synthesis block size+    numberOfSampleBuffers       :: Int,         -- ^ Number of allocated sample buffers+    maxNumberOfNodes            :: Int,         -- ^ Maximum number of synthesis nodes+    maxNumberOfSynthDefs        :: Int,         -- ^ Maximum number of synth definitions+    realTimeMemorySize          :: Int,         -- ^ Realtime memory size in bytes+    numberOfWireBuffers         :: Int,         -- ^ Number of unit generator connection buffers+    numberOfRandomSeeds         :: Int,         -- ^ Number of random number generator seeds+    loadSynthDefs               :: Bool,        -- ^ If 'True', load synth definitions from /synthdefs/ directory on startup+    verbosity                   :: Verbosity    -- ^ 'Verbosity' level+} deriving (Eq, Show)++-- | Default server options.+defaultServerOptions :: ServerOptions+defaultServerOptions = ServerOptions {+    serverProgram               = "scsynth",+    numberOfControlBusChannels  = 4096,+    numberOfAudioBusChannels    = 128,+    numberOfInputBusChannels    = 8,+    numberOfOutputBusChannels   = 8,+    blockSize                   = 64,+    numberOfSampleBuffers       = 1024,+    maxNumberOfNodes            = 1024,+    maxNumberOfSynthDefs        = 1024,+    realTimeMemorySize          = 8192,+    numberOfWireBuffers         = 64,+    numberOfRandomSeeds         = 64,+    loadSynthDefs               = True,+    verbosity                   = Normal+}++instance CommandLine (ServerOptions) where+    argumentList v = serverProgram v :+            concat [  mkOpt "-c" numberOfControlBusChannels d v+                    , mkOpt "-a" numberOfAudioBusChannels d v+                    , mkOpt "-i" numberOfInputBusChannels d v+                    , mkOpt "-o" numberOfOutputBusChannels d v+                    , mkOpt "-z" blockSize d v+                    , mkOpt "-b" numberOfSampleBuffers d v+                    , mkOpt "-n" maxNumberOfNodes d v+                    , mkOpt "-d" maxNumberOfSynthDefs d v+                    , mkOpt "-w" numberOfWireBuffers d v+                    , mkOpt "-r" numberOfRandomSeeds d v+                    , mkOpt "-D" (fromEnum . loadSynthDefs) d v+                    , mkOpt "-v" (fromEnum . verbosity) d v ]+        where d = defaultServerOptions++-- ====================================================================+-- * Realtime options++-- | Helper class for polymorphic opening of network connections.+class OpenTransport t where+    openTransport :: RTOptions t -> String -> IO t++instance OpenTransport (UDP) where+    openTransport rtOptions server = openUDP server (udpPortNumber rtOptions)++instance OpenTransport (TCP) where+    openTransport rtOptions server = openTCP server (tcpPortNumber rtOptions)++-- | Realtime server options, parameterized by the OpenSoundControl+-- 'Transport' to be used.+data RTOptions t = RTOptions {+    -- Network control+    udpPortNumber           :: Int,             -- ^ UDP port number (one of 'udpPortNumber' and 'tcpPortNumber' must be non-zero)+    tcpPortNumber           :: Int,             -- ^ TCP port number (one of 'udpPortNumber' and 'tcpPortNumber' must be non-zero)+    useZeroconf             :: Bool,            -- ^ If 'True', publish scsynth service through Zeroconf+    maxNumberOfLogins       :: Int,             -- ^ Max number of supported logins if 'sessionPassword' is set+    sessionPassword         :: Maybe String,    -- ^ Session password+    -- Audio device control+    hardwareDeviceName      :: Maybe String,    -- ^ Hardware device name (JACK client:server name on Linux)+    hardwareBufferSize      :: Int,             -- ^ Hardware buffer size (no effect with JACK)+    hardwareSampleRate      :: Int,             -- ^ Hardware buffer size (no effect with JACK)+    inputStreamsEnabled     :: Maybe Int,       -- ^ Enabled input streams (CoreAudio only)+    outputStreamsEnabled    :: Maybe Int        -- ^ Enabled output streams (CoreAudio only)+} deriving (Eq, Show)++-- | Default realtime server options.+defaultRTOptions :: RTOptions t+defaultRTOptions = RTOptions {+    -- Network control+    udpPortNumber           = 0,+    tcpPortNumber           = 0,+    useZeroconf             = False,+    maxNumberOfLogins       = 16,+    sessionPassword         = Nothing,+    -- Audio device control+    hardwareDeviceName      = Nothing,+    hardwareBufferSize      = 0,+    hardwareSampleRate      = 0,+    inputStreamsEnabled     = Nothing,+    outputStreamsEnabled    = Nothing+}++-- | Default realtime server options (UDP transport).+defaultRTOptionsUDP :: RTOptions UDP+defaultRTOptionsUDP = defaultRTOptions { udpPortNumber = 57110 }++-- | Default realtime server options (TCP transport).+defaultRTOptionsTCP :: RTOptions TCP+defaultRTOptionsTCP = defaultRTOptions { tcpPortNumber = 57110 }++instance CommandLine (RTOptions t) where+    argumentList v =+        concat [ mkOpt      "-u" udpPortNumber d v+               , mkOpt      "-t" tcpPortNumber d v+               , mkOpt      "-R" (fromEnum . useZeroconf) d v+               , mkMaybeOpt "-H" $ hardwareDeviceName v+               , mkOpt      "-Z" hardwareBufferSize d v+               , mkOpt      "-S" hardwareSampleRate d v+               , mkOpt      "-l" maxNumberOfLogins d v+               , mkMaybeOpt "-p" $ sessionPassword v+               , mkMaybeOpt "-I" $ inputStreamsEnabled v+               , mkMaybeOpt "-O" $ outputStreamsEnabled v ]+        where d = defaultRTOptions++-- ====================================================================+-- * Non-Realtime options++-- | Non-realtime server options.+data NRTOptions = NRTOptions {+    commandFilePath     :: Maybe FilePath,  -- ^ Path to OSC command file ('Nothing' for stdin)+    inputFilePath       :: Maybe FilePath,  -- ^ Path to input sound file ('Nothing' for no audio input)+    outputFilePath      :: FilePath,        -- ^ Path to output sound file+    outputSampleRate    :: Int,             -- ^ Output sound file sample rate+    outputHeaderFormat  :: String,          -- ^ Output sound file header format+    outputSampleFormat  :: String           -- ^ Output sound file sample format+} deriving (Eq, Show)++-- | Default non-realtime server options.+defaultNRTOptions :: NRTOptions+defaultNRTOptions = NRTOptions {+    commandFilePath         = Nothing,+    inputFilePath           = Nothing,+    outputFilePath          = "output.wav",+    outputSampleRate        = 44100,+    outputHeaderFormat      = "wav",+    outputSampleFormat      = "int16"+}++instance CommandLine (NRTOptions) where+    argumentList x =+        "-N" : map ($x) [ fromMaybe "_" . commandFilePath+                        , fromMaybe "_" . inputFilePath+                        , outputFilePath+                        , show . outputSampleRate+                        , outputHeaderFormat+                        , outputSampleFormat ]++-- ====================================================================+-- * Event handler++-- | Event handler for handling I/O with external @scsynth@ processes,+-- parameterized by the I/O handle used for sending OSC commands to the+-- server.+data EventHandler t = EventHandler {+    onPutString :: String -> IO (),     -- ^ Handle one line of normal output+    onPutError  :: String -> IO (),     -- ^ Handle one line of error output+    onBoot      :: t -> IO ()           -- ^ Executed with the OSC handle after the server has booted+}++-- | Default event handler, writing to stdout and stderr, respectively.+defaultEventHandler :: EventHandler t+defaultEventHandler = EventHandler {+    onPutString = hPutStrLn stdout,+    onPutError  = hPutStrLn stderr,+    onBoot      = const (return ())+}++-- ====================================================================+-- Process helpers++pipeOutput :: (String -> IO ()) -> Handle -> IO ()+pipeOutput f h = hIsEOF h >>= flip unless (hGetLine h >>= f >> pipeOutput f h)++-- ====================================================================+-- * Realtime scsynth execution++-- | Execute a realtime instance of @scsynth@ with 'Transport' t and return+-- 'ExitCode' when the process exists.+withSynth :: (Transport t, OpenTransport t) =>+    ServerOptions+ -> RTOptions t+ -> EventHandler t+ -> IO ExitCode+withSynth serverOptions rtOptions handler = do+        (_, hOut, hErr, hProc) <- runInteractiveProcess exe args Nothing Nothing+        forkIO $ putStdout0 hOut+        forkIO $ putStderr  hErr+        waitForProcess hProc+    where+        (exe:args) = argumentList serverOptions+                     ++ argumentList rtOptions+        putStdout0 h = do+            eof <- hIsEOF h+            unless eof $ do+                l <- hGetLine h+                if isPrefixOf "SuperCollider 3 server ready.." l+                    then do+                        onPutString handler l+                        fd <- openTransport rtOptions "127.0.0.1"+                        forkIO $ onBoot handler fd+                        -- Spawn more efficient output handler+                        forkIO $ putStdout h+                        return ()+                    else do+                        onPutString handler l+                        putStdout0 h -- recurse+        putStdout = pipeOutput (onPutString handler)+        putStderr = pipeOutput (onPutError  handler)+    +-- ====================================================================+-- * Non-Realtime scsynth execution++-- | Execute a non-realtime instance of @scsynth@ and return 'ExitCode' when+-- the process exists.+withNRT ::+    ServerOptions+ -> NRTOptions+ -> EventHandler Handle+ -> IO ExitCode+withNRT serverOptions nrtOptions handler = do+        (hIn, hOut, hErr, hProc) <- runInteractiveProcess exe args Nothing Nothing+        forkIO $ putStdout hOut+        forkIO $ putStderr hErr+        forkIO $ onBoot handler hIn+        waitForProcess hProc+    where+        (exe:args) = argumentList serverOptions+                     ++ argumentList nrtOptions { commandFilePath = Nothing }+        putStdout = pipeOutput (onPutString handler)+        putStderr = pipeOutput (onPutError  handler)++-- EOF
Sound/SC3/UGen.hs view
@@ -2,6 +2,7 @@                        module Sound.SC3.UGen.Buffer,                        module Sound.SC3.UGen.Chaos,                        module Sound.SC3.UGen.Composite,+                       module Sound.SC3.UGen.Composite.Monadic,                        module Sound.SC3.UGen.Demand,                        module Sound.SC3.UGen.Demand.Monadic,                        module Sound.SC3.UGen.Envelope,@@ -30,6 +31,7 @@ import Sound.SC3.UGen.Buffer import Sound.SC3.UGen.Chaos import Sound.SC3.UGen.Composite+import Sound.SC3.UGen.Composite.Monadic import Sound.SC3.UGen.Demand import Sound.SC3.UGen.Demand.Monadic import Sound.SC3.UGen.Envelope
Sound/SC3/UGen/Composite.hs view
@@ -1,22 +1,13 @@ module Sound.SC3.UGen.Composite where -import Sound.SC3.UGen.Demand.Monadic import Sound.SC3.UGen.Filter import Sound.SC3.UGen.Information import Sound.SC3.UGen.IO import Sound.SC3.UGen.Oscillator-import Sound.SC3.UGen.Noise.Monadic import Sound.SC3.UGen.Panner import Sound.SC3.UGen.Rate import Sound.SC3.UGen.UGen-import Sound.SC3.UGen.UId --- | Demand rate (:) function.-dcons :: (UId m) => UGen -> UGen -> m UGen-dcons x xs = do i <- dseq 1 (mce2 0 1)-                a <- dseq 1 (mce2 x xs)-                dswitch i a- -- | Dynamic klank, set of non-fixed resonating filters. dynKlank :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen dynKlank i fs fo ds s = gen (mceChannels s)@@ -48,7 +39,10 @@  -- | Zero indexed audio input buses. soundIn :: UGen -> UGen-soundIn n = in' 1 AR (numOutputBuses + n)+soundIn (MCE ns) | all (==1) $ zipWith (-) (tail ns) ns =+    in' (length ns) AR (numOutputBuses + head ns)+soundIn n =+    in' 1 AR (numOutputBuses + n)  -- | Pan a set of channels across the stereo field. splay :: UGen -> UGen -> UGen -> UGen -> UGen@@ -56,11 +50,3 @@     where n = fromIntegral (mceDegree i)           m = n - 1           p = map ( (+ (-1.0)) . (* (2 / m)) ) [0 .. m]--tChoose :: (UId m) => UGen -> UGen -> m UGen-tChoose t a = do r <- tiRand 0 (constant (length (mceChannels a))) t-                 return (select r a)--twChoose :: (UId m) => UGen -> UGen -> UGen -> UGen -> m UGen-twChoose t a w n = do i <- twindex t n w-                      return (select i a)
+ Sound/SC3/UGen/Composite/Monadic.hs view
@@ -0,0 +1,21 @@+module Sound.SC3.UGen.Composite.Monadic where++import Sound.SC3.UGen.Demand.Monadic+import Sound.SC3.UGen.Filter+import Sound.SC3.UGen.Noise.Monadic+import Sound.SC3.UGen.UGen+import Sound.SC3.UGen.UId++-- | Demand rate (:) function.+dcons :: (UId m) => UGen -> UGen -> m UGen+dcons x xs = do i <- dseq 1 (mce2 0 1)+                a <- dseq 1 (mce2 x xs)+                dswitch i a++tChoose :: (UId m) => UGen -> UGen -> m UGen+tChoose t a = do r <- tiRand 0 (constant (length (mceChannels a))) t+                 return (select r a)++twChoose :: (UId m) => UGen -> UGen -> UGen -> UGen -> m UGen+twChoose t a w n = do i <- twindex t n w+                      return (select i a)
Sound/SC3/UGen/External.hs view
@@ -11,7 +11,7 @@ atsNoiSynth :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen atsNoiSynth b np ps pk fp sr nr m a nb bs bk = mkOsc AR "AtsNoiSynth" [b, np, ps, pk, fp, sr, nr, m, a, nb, bs, bk] 1 --- | Emulation of AY (aka YM) soundchip, used in Spectrum/Atari.+-- | Emulation of AY (aka YM) soundchip, used in Spectrum\/Atari. ay :: UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen -> UGen ay ta tb tc n c va vb vc ef es ct = mkOsc AR "AY" [ta, tb, tc, n, c, va, vb, vc, ef, es, ct] 1 
Sound/SC3/UGen/MachineListening.hs view
@@ -15,7 +15,7 @@  -- | Extraction of instantaneous loudness in sones. loudness :: UGen -> UGen -> UGen -> UGen-loudness fft smask tmask = mkOsc KR "Compander" [fft, smask, tmask] 1+loudness fft smask tmask = mkOsc KR "Loudness" [fft, smask, tmask] 1  -- | Translate onset type string to constant UGen value. onsetType :: String -> UGen
+ Sound/SC3/UGen/Monadic.hs view
@@ -0,0 +1,9 @@+module Sound.SC3.UGen.Monadic ( module Sound.SC3.UGen.Demand.Monadic+                              , module Sound.SC3.UGen.Composite.Monadic+                              , module Sound.SC3.UGen.FFT.Monadic+                              , module Sound.SC3.UGen.Noise.Monadic ) where++import Sound.SC3.UGen.Composite.Monadic+import Sound.SC3.UGen.Demand.Monadic+import Sound.SC3.UGen.FFT.Monadic+import Sound.SC3.UGen.Noise.Monadic
+ Sound/SC3/UGen/Record/Pitch.hs view
@@ -0,0 +1,46 @@+module Sound.SC3.UGen.Record.Pitch (+    Args(..),+    defaults,+    pitch+) where++import Sound.SC3 (UGen)+import qualified Sound.SC3 as SC3++data Args = Args {+    initFreq :: UGen,+    minFreq :: UGen,+    maxFreq :: UGen,+    execFreq :: UGen,+    maxBinsPerOctave :: UGen,+    median :: UGen,+    ampThreshold :: UGen,+    peakThreshold :: UGen,+    downSample :: UGen+}++defaults :: Args+defaults = Args {+    initFreq = 440,+    minFreq = 60,+    maxFreq = 4000,+    execFreq = 100,+    maxBinsPerOctave = 16,+    median = 1,+    ampThreshold = 0.01,+    peakThreshold = 0.5,+    downSample = 1.0+}++pitch :: Args -> UGen -> UGen+pitch args input = SC3.pitch+                    input+                    (initFreq args)+                    (minFreq args)+                    (maxFreq args)+                    (execFreq args)+                    (maxBinsPerOctave args)+                    (median args)+                    (ampThreshold args)+                    (peakThreshold args)+                    (downSample args)
Sound/SC3/UGen/UGen.hs view
@@ -52,7 +52,8 @@  -- | Multiple channel expansion node constructor. mce :: [UGen] -> UGen-mce = MCE+mce [] = error "mce: empty list"+mce xs = MCE xs  -- | Multiple root graph node constructor. mrg2 :: UGen -> UGen -> UGen
emacs/hsc3.el view
@@ -23,19 +23,21 @@   (list)   "*Arguments to the haskell interpreter (default=none).") -(defvar hsc3-main-modules-  (list)-  "*Modules to load (using :l) into the haskell interpreter.")+(defvar hsc3-run-control+  "~/.hsc3.hs"+  "*Run control file (default=~/.hsc3.hs)")  (defvar hsc3-modules-  (list "Sound.OpenSoundControl"-	"Sound.SC3"-	"Data.List"-	"Control.Monad"-	"Control.Concurrent"-	"System.Directory"-	"System.Random")-  "*Modules to bring into scope (using :m +) into the haskell interpreter.")+  (list "import Control.Concurrent"+        "import Control.Monad"+        "import Data.List"+        "import Sound.OpenSoundControl"+        "import Sound.SC3"+        "import qualified Sound.SC3.UGen.Base as B"+        "import qualified Sound.SC3.UGen.Monadic as M"+        "import qualified Sound.SC3.UGen.Unsafe as U"+        "import System.Random")+  "*List of modules (possibly qualified) to bring into interpreter context.")  (defvar hsc3-help-directory   nil@@ -56,6 +58,16 @@       '()     (cons e (cons (car l) (hsc3-intersperse e (cdr l)))))) +(defun hsc3-write-default-run-control ()+  "Write default run control file if no file exists."+  (if (not (file-exists-p hsc3-run-control))+      (with-temp-file+          hsc3-run-control+        (mapc +         (lambda (s)+           (insert (concat s "\n")))+         hsc3-modules))))+ (defun hsc3-start-haskell ()   "Start haskell."   (interactive)@@ -68,12 +80,9 @@      nil      hsc3-interpreter-arguments)     (hsc3-see-output))-  (if (not (null hsc3-main-modules))-      (hsc3-send-string-       (apply 'concat (cons ":l " (hsc3-intersperse " " hsc3-main-modules)))))-  (if (not (null hsc3-modules))-      (hsc3-send-string-       (apply 'concat (cons ":m + " (hsc3-intersperse " " hsc3-modules))))))+  (hsc3-write-default-run-control)+  (hsc3-send-string (concat ":l " hsc3-run-control))+  (hsc3-send-string ":set prompt \"hsc3> \""))  (defun hsc3-see-output ()   "Show haskell output."@@ -112,8 +121,8 @@   "Transform example text into compilable form."   (with-temp-file f     (mapc (lambda (module)-	    (insert (concat "import " module "\n")))-	  (append hsc3-main-modules hsc3-modules))+	    (insert (concat module "\n")))+	  hsc3-modules)     (insert "main = do\n")     (insert (if hsc3-literate-p (hsc3-unlit s) s)))) 
hsc3.cabal view
@@ -1,12 +1,12 @@ Name:              hsc3-Version:           0.3+Version:           0.4 Synopsis:          Haskell SuperCollider Description:       hsc3 provides Sound.SC3, a haskell module that                     facilitates using haskell as a client to the                     SuperCollider synthesis server.   License:           GPL Category:          Sound-Copyright:         (c) Rohan Drape, 2006-2008+Copyright:         (c) Rohan Drape and others, 2006-2008 Author:            Rohan Drape Maintainer:        rd@slavepianos.org Stability:         Experimental@@ -447,14 +447,15 @@                    Help/UGen/Trigger/trig.help.lhs  Library-  Build-Depends:   base, binary, bytestring, containers, hosc == 0.3,-                   network, random-  GHC-Options:     -Wall -fwarn-tabs -O2+  Build-Depends:   base, binary, bytestring, containers, hosc == 0.4,+                   network, process, random+  GHC-Options:     -Wall -fwarn-tabs   Exposed-modules: Sound.SC3                    Sound.SC3.Server                    Sound.SC3.Server.Command                    Sound.SC3.Server.NRT                    Sound.SC3.Server.Play+                   Sound.SC3.Server.Process                    Sound.SC3.Server.Status                    Sound.SC3.Server.Synthdef                    Sound.SC3.UGen@@ -463,6 +464,7 @@                    Sound.SC3.UGen.Buffer                    Sound.SC3.UGen.Chaos                    Sound.SC3.UGen.Composite+                   Sound.SC3.UGen.Composite.Monadic                    Sound.SC3.UGen.Demand                    Sound.SC3.UGen.Demand.Base                    Sound.SC3.UGen.Demand.Monadic@@ -483,6 +485,7 @@                    Sound.SC3.UGen.Information                    Sound.SC3.UGen.MachineListening                    Sound.SC3.UGen.Math+                   Sound.SC3.UGen.Monadic                    Sound.SC3.UGen.Noise.Base                    Sound.SC3.UGen.Noise.Monadic                    Sound.SC3.UGen.Noise.Unsafe@@ -490,6 +493,7 @@                    Sound.SC3.UGen.Oscillator                    Sound.SC3.UGen.Panner                    Sound.SC3.UGen.Rate+                   Sound.SC3.UGen.Record.Pitch                    Sound.SC3.UGen.UGen                    Sound.SC3.UGen.UId                    Sound.SC3.UGen.Unsafe