Safe Haskell | None |
---|
Monad variant of interaction with the scsynth server.
- send :: SendOSC m => Message -> m ()
- async :: DuplexOSC m => Message -> m Message
- withSC3 :: Connection UDP a -> IO a
- stop :: SendOSC m => m ()
- reset :: SendOSC m => m ()
- playSynthdef :: DuplexOSC m => Synthdef -> m ()
- playUGen :: DuplexOSC m => UGen -> m ()
- run_bundle :: Transport m => Time -> Bundle -> m ()
- performNRT :: Transport m => NRT -> m ()
- class Audible e where
- audition :: Audible e => e -> IO ()
- withNotifications :: DuplexOSC m => m a -> m a
- b_getn1_data :: DuplexOSC m => Int -> (Int, Int) -> m [Double]
- b_getn1_data_segment :: DuplexOSC m => Int -> Int -> (Int, Int) -> m [Double]
- b_fetch :: DuplexOSC m => Int -> Int -> m [Double]
- serverStatus :: DuplexOSC m => m [String]
- serverSampleRateNominal :: DuplexOSC m => m Double
- serverSampleRateActual :: DuplexOSC m => m Double
- serverStatusData :: DuplexOSC m => m [Datum]
hosc variants
send :: SendOSC 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 >> waitReply "/status.reply")
Server control
playSynthdef :: DuplexOSC m => Synthdef -> m ()Source
Send d_recv
and s_new
messages to scsynth.
playUGen :: DuplexOSC m => UGen -> m ()Source
Send an anonymous instrument definition using playSynthdef
.
NRT
run_bundle :: Transport m => Time -> Bundle -> m ()Source
Wait (pauseThreadUntil
) until bundle is due to be sent relative
to the initial 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 :: DuplexOSC m => m a -> m aSource
Turn on notifications, run f, turn off notifications, return result.
Buffer
b_getn1_data :: DuplexOSC 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 :: DuplexOSC 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 :: DuplexOSC m => Int -> Int -> m [Double]Source
Variant of b_getn1_data_segment
that gets the entire buffer.
Status
serverStatus :: DuplexOSC m => m [String]Source
Collect server status information.
serverSampleRateNominal :: DuplexOSC m => m DoubleSource
Read nominal sample rate of server.
withSC3 serverSampleRateNominal
serverSampleRateActual :: DuplexOSC m => m DoubleSource
Read actual sample rate of server.
withSC3 serverSampleRateActual
serverStatusData :: DuplexOSC m => m [Datum]Source
Retrieve status data from server.