hsc3-0.4: Haskell SuperCollider



This module includes utilities for spawning an external scsynth process, either for realtime or non-realtime execution.



data ServerOptions Source

Specify general server options used b oth in realtime and non-realtime mode.




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

defaultServerOptions :: ServerOptionsSource

Default server options.

data NRTOptions Source

Non-realtime server options.




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


defaultNRTOptions :: NRTOptionsSource

Default non-realtime server options.

data RTOptions t Source

Realtime server options, parameterized by the OpenSoundControl Transport to be used.




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)


Eq (RTOptions t) 
Show (RTOptions t) 
CommandLine (RTOptions t) 

defaultRTOptionsUDP :: RTOptions UDPSource

Default realtime server options (UDP transport).

defaultRTOptionsTCP :: RTOptions TCPSource

Default realtime server options (TCP transport).

data EventHandler t Source

Event handler for handling I/O with external scsynth processes, parameterized by the I/O handle used for sending OSC commands to the server.




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

defaultEventHandler :: EventHandler tSource

Default event handler, writing to stdout and stderr, respectively.

withSynth :: (Transport t, OpenTransport t) => ServerOptions -> RTOptions t -> EventHandler t -> IO ExitCodeSource

Execute a realtime instance of scsynth with Transport t and return ExitCode when the process exists.

withNRT :: ServerOptions -> NRTOptions -> EventHandler Handle -> IO ExitCodeSource

Execute a non-realtime instance of scsynth and return ExitCode when the process exists.