hsc3-process-0.0.0: Create and control scsynth processesSource codeContentsIndex
Sound.SC3.Server.Process
Description
This module includes utilities for spawning an external scsynth process, either for realtime or non-realtime execution.
Synopsis
module Sound.SC3.Server.Process.Options
commandLine :: CommandLine a => ServerOptions -> a -> [String]
data EventHandler t = EventHandler {
onPutString :: String -> IO ()
onPutError :: String -> IO ()
onBoot :: t -> IO ()
}
_onBoot
_onPutString
_onPutError
defaultEventHandler :: EventHandler t
withSynth :: (Transport t, OpenTransport t) => ServerOptions -> RTOptions -> EventHandler t -> IO ExitCode
withNRT :: ServerOptions -> NRTOptions -> EventHandler Handle -> IO ExitCode
Documentation
module Sound.SC3.Server.Process.Options
commandLine :: CommandLine a => ServerOptions -> a -> [String]Source
Construct the scsynth command line from ServerOptions and either RTOptions or NRTOptions.
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.
Constructors
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
_onBoot
_onPutString
_onPutError
defaultEventHandler :: EventHandler tSource
Default event handler, writing to stdout and stderr, respectively.
withSynth :: (Transport t, OpenTransport t) => ServerOptions -> RTOptions -> EventHandler t -> IO ExitCodeSource

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

NOTE: When compiling executables with GHC, the -threaded option should be passed, otherwise the I/O handlers will not work correctly.

withNRT :: ServerOptions -> NRTOptions -> EventHandler Handle -> IO ExitCodeSource
Execute a non-realtime instance of scsynth and return ExitCode when the process exists.
Produced by Haddock version 2.4.2