Safe Haskell | None |
---|
Monad variant of interaction with the scsynth server.
- send :: Transport m => Message -> m ()
- wait :: Transport m => String -> m Message
- async :: Transport m => Message -> m Message
- withSC3 :: Connection UDP a -> IO a
- stop :: Transport m => m ()
- reset :: Transport m => m ()
- playSynthdef :: Transport m => Synthdef -> m ()
- playUGen :: Transport m => UGen -> m ()
- run_bundle :: Transport m => Double -> Bundle -> m ()
- performNRT :: Transport m => NRT -> m ()
- class Audible e where
- audition :: Audible e => e -> IO ()
- withNotifications :: Transport m => m a -> m a
- b_getn1_data :: Transport m => Int -> (Int, Int) -> m [Double]
- b_getn1_data_segment :: Transport m => Int -> Int -> (Int, Int) -> m [Double]
- b_fetch :: Transport m => Int -> Int -> m [Double]
- serverStatus :: Transport m => m [String]
- serverSampleRateNominal :: Transport m => m Double
- serverSampleRateActual :: Transport m => m Double
- serverStatusData :: Transport m => m [Datum]
hosc variants
send :: Transport m => Message -> m ()Source
Synonym for sendMessage
.
withSC3 :: Connection UDP a -> IO aSource
Bracket SC3
communication. withTransport
at standard SC3 UDP
port.
import Sound.SC3.Server.Command
withSC3 (send status >> wait "/status.reply")
Server control
playUGen :: Transport m => UGen -> m ()Source
Send an anonymous instrument definition using playSynthdef
.
NRT
run_bundle :: Transport m => Double -> Bundle -> m ()Source
Wait (pauseThreadUntil
) until bundle is due to be sent relative
to initial UTCr
time, then send each message, asynchronously if
required.
performNRT :: Transport m => NRT -> m ()Source
Audible
Class for values that can be encoded and send to scsynth
for
audition.
Notifications
withNotifications :: Transport m => m a -> m aSource
Turn on notifications, run f, turn off notifications, return result.
Buffer
b_getn1_data :: Transport m => Int -> (Int, Int) -> m [Double]Source
Variant of b_getn1
that waits for return message and unpacks it.
withSC3 (b_getn1_data 0 (0,5))
b_getn1_data_segment :: Transport m => Int -> Int -> (Int, Int) -> m [Double]Source
Variant of b_getn1_data
that segments individual b_getn
messages to n elements.
withSC3 (b_getn1_data_segment 1 0 (0,5))
b_fetch :: Transport m => Int -> Int -> m [Double]Source
Variant of b_getn1_data_segment
that gets the entire buffer.
Status
serverStatus :: Transport m => m [String]Source
Collect server status information.
serverSampleRateNominal :: Transport m => m DoubleSource
Read nominal sample rate of server.
serverSampleRateActual :: Transport m => m DoubleSource
Read actual sample rate of server.
serverStatusData :: Transport m => m [Datum]Source
Retrieve status data from server.