Safe Haskell | None |
---|
This module includes utilities for spawning an external scsynth process, either for realtime or non-realtime execution.
- module Sound.SC3.Server.Options
- data OutputHandler = OutputHandler {
- onPutString :: String -> IO ()
- onPutError :: String -> IO ()
- defaultOutputHandler :: OutputHandler
- withTransport :: Transport t => (ServerOptions -> RTOptions -> IO t) -> ServerOptions -> RTOptions -> (t -> IO a) -> IO a
- withSynth :: Transport t => (ServerOptions -> RTOptions -> IO t) -> ServerOptions -> RTOptions -> OutputHandler -> (t -> IO a) -> IO a
- openTCP :: ServerOptions -> RTOptions -> IO TCP
- openUDP :: ServerOptions -> RTOptions -> IO UDP
- withNRT :: ServerOptions -> NRTOptions -> OutputHandler -> (Handle -> IO a) -> IO a
Documentation
module Sound.SC3.Server.Options
data OutputHandler Source
Handle output of external scsynth
processes.
OutputHandler | |
|
defaultOutputHandler :: OutputHandlerSource
Default IO handler, writing to stdout and stderr, respectively.
withTransport :: Transport t => (ServerOptions -> RTOptions -> IO t) -> ServerOptions -> RTOptions -> (t -> IO a) -> IO aSource
withSynth :: Transport t => (ServerOptions -> RTOptions -> IO t) -> ServerOptions -> RTOptions -> OutputHandler -> (t -> IO a) -> IO aSource
Execute a realtime instance of scsynth
with Transport
t.
The spawned scsynth
is sent a /quit
message after the supplied action
returns.
NOTE: When compiling executables with GHC, the -threaded
option should
be passed, otherwise the I/O handlers will not work correctly.
openTCP :: ServerOptions -> RTOptions -> IO TCPSource
openUDP :: ServerOptions -> RTOptions -> IO UDPSource
withNRT :: ServerOptions -> NRTOptions -> OutputHandler -> (Handle -> IO a) -> IO aSource
Execute a non-realtime instance of scsynth
and return ExitCode
when
the process exists.