Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Fd variant of interaction with the scsynth server.
This duplicates functions at Monad
and
at some point at least part of the duplication will be removed.
Synopsis
- async :: Transport t => t -> Message -> IO Message
- maybe_async :: Transport t => t -> Message -> IO ()
- maybe_async_at :: Transport t => t -> Time -> Message -> IO ()
- withSc3 :: (Udp -> IO a) -> IO a
- stop :: Transport t => t -> IO ()
- reset :: Transport t => t -> IO ()
- playGraphdef :: Transport t => Int -> t -> Graphdef -> IO ()
- playSynthdef :: Transport t => Int -> t -> Synthdef -> IO ()
- playUgen :: Transport t => Int -> t -> Ugen -> IO ()
- run_bundle :: Transport t => t -> Time -> Bundle -> IO ()
- nrt_play :: Transport t => t -> Nrt -> IO ()
- nrt_audition :: Nrt -> IO ()
- class Audible e where
- audition_id :: Audible e => Int -> e -> IO ()
- audition :: Audible e => e -> IO ()
- withNotifications :: Transport t => t -> (t -> IO a) -> IO a
- b_getn1_data :: Transport t => t -> Int -> (Int, Int) -> IO [Double]
- b_getn1_data_segment :: Transport t => t -> Int -> Int -> (Int, Int) -> IO [Double]
- b_fetch :: Transport t => t -> Int -> Int -> IO [[Double]]
- b_fetch1 :: Transport t => t -> Int -> Int -> IO [Double]
- serverStatus :: Transport t => t -> IO [String]
- serverSampleRateNominal :: Transport t => t -> IO Double
- serverSampleRateActual :: Transport t => t -> IO Double
- serverStatusData :: Transport t => t -> IO [Datum]
hosc variants
maybe_async :: Transport t => t -> Message -> IO () Source #
If isAsync
then void
async
else sendMessage
.
maybe_async_at :: Transport t => t -> Time -> Message -> IO () Source #
Variant that timestamps synchronous messages.
Server control
reset :: Transport t => t -> IO () Source #
Free all nodes (g_freeAll
) at and re-create groups 1
and 2
.
playUgen :: Transport t => Int -> t -> Ugen -> IO () Source #
Send an anonymous instrument definition using playSynthdef
.
Non-real time
run_bundle :: Transport t => t -> Time -> Bundle -> IO () Source #
Wait (pauseThreadUntil
) until bundle is due to be sent relative
to initial Time
, then send each message, asynchronously if
required.
Audible
class Audible e where Source #
Class for values that can be encoded and sent to scsynth
for audition.
Notifications
withNotifications :: Transport t => t -> (t -> IO a) -> IO a Source #
Turn on notifications, run f, turn off notifications, return result.
Buffer
b_getn1_data :: Transport t => t -> Int -> (Int, Int) -> IO [Double] Source #
Variant of b_getn1
that waits for return message and unpacks it.
withSc3 (\fd -> b_getn1_data fd 0 (0,5))
b_getn1_data_segment :: Transport t => t -> Int -> Int -> (Int, Int) -> IO [Double] Source #
Variant of b_getn1_data
that segments individual b_getn
messages to n elements.
withSc3 (\fd -> b_getn1_data_segment fd 1 0 (0,5))
b_fetch :: Transport t => t -> Int -> Int -> IO [[Double]] Source #
Variant of b_getn1_data_segment
that gets the entire buffer.