Re: getting started with hsc (supercollider)

Hello Alex,
alex
withSC3 reset
Doing this is so common there is a keybinding for it, C-cC-k (Hsc -> SCSynth -> Reset scsynth). To make a test sound run the following:
audition (sinOsc AR 440 0 * 0.1)
This ought to play a quiet sine oscillator at A440. To see the server status type C-cC-w (Hsc -> SCSynth -> Display status). To stop the sound reset the server, ie. type C-cC-k. For expressions that don't fit on one line select the region and type C-cC-e (Hsc -> Expression -> Run region). This writes the region in a do block in a main procedure to a temporary file [2], loads the file and then runs main.
let f = sinOsc AR (xLine KR 1 1000 9 RemoveSynth) 0 * 200 + 800 audition (sinOsc AR f 0 * 0.1)
(To select a region use the mouse or place point at one end, type C-Space and move point to the other end.) To find help on a UGen or on a SuperCollider server command put point over the identifier and type C-cC-h (Hsc -> Help -> Hsc help). This opens the help file, which ought to have working examples in it, the above graph is in the sinOsc help file. To stop ghci type C-cC-x (Hsc -> Haskell -> Quit haskell). It may have been a mistake to just use .lhs as the extension, however it is not a disaster because the Hsc mode is a derivative of the haskell mode. Perhaps it ought to be changed to .hsc. Hope this is clear-ish, please send through any questions, bug reports or patches! Regards, Rohan [1] To get this loaded I have the following in ~/.emacs: (push "~/ext/src/haskell/fptools/fptools/CONTRIB/haskell-modes/emacs" load-path) (load "haskell-site-file.el") (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) (add-hook 'haskell-mode-hook 'turn-on-haskell-indent) (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci))) [2] The file is written to /tmp/hsc.lhs, the preamble imports the following modules, this is enough to run the help file examples. import Sound.OpenSoundControl import Sound.SC3 import Control.Monad import System.Random
participants (1)
-
Rohan Drape