[Haskell-cafe] Re: Livecoding music in Haskell
Henning Thielemann
lemming at henning-thielemann.de
Fri Nov 10 17:26:11 EST 2006
On Wed, 8 Nov 2006, Rohan Drape wrote:
> import Sound.SC3
> import Control.Concurrent (forkIO)
>
> ping f a = out 0 (sinOsc AR f 0 * e)
> where c = EnvNum (-4.0)
> e = envGen KR 1 a 0 1 removeSynth (envPerc 0.1 0.6 1 [c,c])
>
> latency = 0.01
>
> bundle t m = OscB (t + latency) m
>
> pinger = do now <- utc
> at (fromIntegral (ceiling now)) f
> where f t = do fd <- sc
> send' fd (bundle t [s_new "ping" (-1) AddToTail 1])
> putStrLn "Sending ping"
> return 1.0
>
> main = do fd <- sc
> putStrLn "Sending Ping Instrument"
> sync' fd (d_recv' "ping" (ping 440 0.1))
> putStrLn "Resetting scsynth"
> reset fd
> putStrLn "Starting schedule thread"
> forkIO pinger
> putStrLn "Delaying main thread"
> pause 30
> putStrLn "End of delay, exiting"
When I run this, then SuperCollider emits the error
FAILURE ew Command not found
Do you use some new feature? (I could even not tell you my SuperCollider
version, 'scsynth --version', 'scsynth -v' and the like, don't tell me.
:-(
More information about the Haskell-Cafe
mailing list