| Safe Haskell | None |
|---|
Sound.SC3.Server.Process
Description
This module includes utilities for spawning an external scsynth process, either for realtime or non-realtime execution, and for connecting to existing processes.
- module Sound.SC3.Server.Process.Options
- data OutputHandler = OutputHandler {
- onPutString :: String -> IO ()
- onPutError :: String -> IO ()
- defaultOutputHandler :: OutputHandler
- data NetworkTransport
- withTransport :: ServerOptions -> RTOptions -> Maybe String -> (NetworkTransport -> IO a) -> IO a
- withSynth :: ServerOptions -> RTOptions -> OutputHandler -> (NetworkTransport -> IO a) -> IO a
- runNRT :: ServerOptions -> NRTOptions -> OutputHandler -> FilePath -> IO ()
- withNRT :: ServerOptions -> NRTOptions -> OutputHandler -> (Handle -> IO a) -> IO a
Documentation
data OutputHandler Source
Handle output of external scsynth processes.
Constructors
| OutputHandler | |
Fields
| |
Instances
defaultOutputHandler :: OutputHandlerSource
Default IO handler, writing to stdout and stderr, respectively.
Arguments
| :: ServerOptions | General server options |
| -> RTOptions | Realtime server options |
| -> Maybe String | Host to connect to (defaults to localhost) |
| -> (NetworkTransport -> IO a) | Action to execute with the transport |
| -> IO a | Action result |
Open a transport to a running scsynth process determined by networkPort.
Arguments
| :: ServerOptions | General server options |
| -> RTOptions | Realtime server options |
| -> OutputHandler | Output handler |
| -> (NetworkTransport -> IO a) | Action to execute with the transport |
| -> IO a | Action result |
Execute a realtime instance of scsynth with Transport t.
The spawned scsynth is sent a /quit message after the supplied action
returns.
GHC Note: in order to call withSynth without blocking all the other threads
in the system, you must compile the program with -threaded.
Arguments
| :: ServerOptions | General server options |
| -> NRTOptions | Non-realtime server options |
| -> OutputHandler | Output handler |
| -> FilePath | NRT score file path |
| -> IO () |
Render a NRT score by executing an instance of scsynth.
Since 0.8.0
Arguments
| :: ServerOptions | General server options |
| -> NRTOptions | Non-realtime server options |
| -> OutputHandler | Output handler |
| -> (Handle -> IO a) | Action |
| -> IO a | Action result |
Execute a non-realtime instance of scsynth and pass the process' input
handle to Action and return the result.
GHC Note: in order to call withNRT without blocking all the other threads
in the system, you must compile the program with -threaded.
Since 0.8.0