Safe Haskell | None |
---|---|
Language | Haskell98 |
Monad variant of interaction with the scsynth server.
- async :: DuplexOSC m => Message -> m Message
- async_ :: DuplexOSC m => Message -> m ()
- maybe_async :: DuplexOSC m => Message -> m ()
- maybe_async_at :: DuplexOSC m => Time -> Message -> m ()
- sc3_default_udp :: IO UDP
- withSC3 :: Connection UDP a -> IO a
- withSC3_ :: Connection UDP a -> IO ()
- stop :: SendOSC m => m ()
- reset :: SendOSC m => m ()
- type Play_Opt = (Node_Id, AddAction, Group_Id, [(String, Double)])
- play_graphdef_msg :: Play_Opt -> Graphdef -> Message
- playGraphdef :: DuplexOSC m => Play_Opt -> Graphdef -> m ()
- play_synthdef_msg :: Play_Opt -> Synthdef -> Message
- playSynthdef :: DuplexOSC m => Play_Opt -> Synthdef -> m ()
- playUGen :: DuplexOSC m => Play_Opt -> UGen -> m ()
- run_bundle :: Transport m => Time -> Bundle -> m ()
- nrt_play :: Transport m => NRT -> m ()
- nrt_play_reorder :: Transport m => NRT -> m ()
- nrt_audition :: NRT -> IO ()
- class Audible e where
- audition_at :: Audible e => Play_Opt -> e -> IO ()
- 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]]
- b_fetch1 :: DuplexOSC m => Int -> Int -> m [Double]
- b_fetch_hdr :: Transport m => Int -> Int -> m ((Int, Int, Int, Double), [[Double]])
- b_query1_unpack_generic :: (DuplexOSC m, Num n, Fractional r) => Int -> m (n, n, n, r)
- b_query1_unpack :: DuplexOSC m => Buffer_Id -> m (Int, Int, Int, Double)
- c_getn1_data :: DuplexOSC m => (Int, Int) -> m [Double]
- n_query1_unpack_f :: Transport m => (Message -> t) -> Node_Id -> m t
- n_query1_unpack :: Transport m => Node_Id -> m (Maybe (Int, Int, Int, Int, Int, Maybe (Int, Int)))
- n_query1_unpack_plain :: Transport m => Node_Id -> m [Int]
- g_queryTree1_unpack :: Transport m => Group_Id -> m Query_Node
- serverStatus :: DuplexOSC m => m [String]
- serverSampleRateNominal :: DuplexOSC m => m Double
- serverSampleRateActual :: DuplexOSC m => m Double
- serverStatusData :: DuplexOSC m => m [Datum]
hosc variants
maybe_async :: DuplexOSC m => Message -> m () Source #
If isAsync
then async_
else sendMessage
.
maybe_async_at :: DuplexOSC m => Time -> Message -> m () Source #
Variant that timestamps synchronous messages.
sc3_default_udp :: IO UDP Source #
Local host (ie. 127.0.0.1
) at port 57110
.
withSC3 :: Connection UDP a -> IO a Source #
Bracket SC3
communication, ie. withTransport
sc3_default_udp
.
import Sound.SC3.Server.Command
withSC3 (sendMessage status >> waitReply "/status.reply")
Server control
Composite
reset :: SendOSC m => m () Source #
Runs clearSched
and then frees and re-creates groups 1
and 2
.
type Play_Opt = (Node_Id, AddAction, Group_Id, [(String, Double)]) Source #
(node-id,add-action,group-id,parameters)
playUGen :: DuplexOSC m => Play_Opt -> 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.
nrt_play_reorder :: Transport m => NRT -> m () Source #
Variant where asynchronous commands at time 0
are separated out and run before
the initial time-stamp is taken. This re-orders synchronous
commands in relation to asynchronous at time 0
.
nrt_audition :: NRT -> IO () Source #
Audible
class Audible e where Source #
Class for values that can be encoded and send to scsynth
for audition.
Notifications
withNotifications :: DuplexOSC m => m a -> m a Source #
Turn on notifications, run f, turn off notifications, return result.
Buffer & control & node variants.
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.
b_fetch1 :: DuplexOSC m => Int -> Int -> m [Double] Source #
First channel of b_fetch
, errors if there is no data.
withSC3 (b_fetch1 512 123456789)
b_fetch_hdr :: Transport m => Int -> Int -> m ((Int, Int, Int, Double), [[Double]]) Source #
Combination of b_query1_unpack
and b_fetch
.
b_query1_unpack_generic :: (DuplexOSC m, Num n, Fractional r) => Int -> m (n, n, n, r) Source #
b_info_unpack_err
of b_query1
.
b_query1_unpack :: DuplexOSC m => Buffer_Id -> m (Int, Int, Int, Double) Source #
Type specialised b_query1_unpack_generic
.
withSC3 (b_query1_unpack 0)
c_getn1_data :: DuplexOSC m => (Int, Int) -> m [Double] Source #
Variant of c_getn1
that waits for the reply and unpacks the data.
n_query1_unpack :: Transport m => Node_Id -> m (Maybe (Int, Int, Int, Int, Int, Maybe (Int, Int))) Source #
Variant of n_query
that waits for and unpacks the reply.
g_queryTree1_unpack :: Transport m => Group_Id -> m Query_Node Source #
Variant of g_queryTree
that waits for and unpacks the reply.
Status
serverStatus :: DuplexOSC m => m [String] Source #
Collect server status information.
serverSampleRateNominal :: DuplexOSC m => m Double Source #
Read nominal sample rate of server.
withSC3 serverSampleRateNominal
serverSampleRateActual :: DuplexOSC m => m Double Source #
Read actual sample rate of server.
withSC3 serverSampleRateActual
serverStatusData :: DuplexOSC m => m [Datum] Source #
Retrieve status data from server.