hsc3-0.20: Haskell SuperCollider
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Sc3.Server.Transport.Fd

Description

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

hosc variants

async :: Transport t => t -> Message -> IO Message Source #

Send a Message and waitReply for a /done reply.

maybe_async_at :: Transport t => t -> Time -> Message -> IO () Source #

Variant that timestamps synchronous messages.

withSc3 :: (Udp -> IO a) -> IO a Source #

Bracket Sc3 communication.

Server control

stop :: Transport t => t -> IO () Source #

Free all nodes (g_freeAll) at group 1.

reset :: Transport t => t -> IO () Source #

Free all nodes (g_freeAll) at and re-create groups 1 and 2.

playGraphdef :: Transport t => Int -> t -> Graphdef -> IO () Source #

Send d_recv and s_new messages to scsynth.

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.

nrt_play :: Transport t => t -> Nrt -> IO () Source #

Perform an Nrt score (as would be rendered by writeNrt). In particular note that all timestamps must be in NTPr form.

Audible

class Audible e where Source #

Class for values that can be encoded and sent to scsynth for audition.

Minimal complete definition

play_id

Methods

play_id :: Transport t => Int -> t -> e -> IO () Source #

play :: Transport t => t -> e -> IO () Source #

Instances

Instances details
Audible Graphdef Source # 
Instance details

Defined in Sound.Sc3.Server.Transport.Fd

Methods

play_id :: Transport t => Int -> t -> Graphdef -> IO () Source #

play :: Transport t => t -> Graphdef -> IO () Source #

Audible Synthdef Source # 
Instance details

Defined in Sound.Sc3.Server.Transport.Fd

Methods

play_id :: Transport t => Int -> t -> Synthdef -> IO () Source #

play :: Transport t => t -> Synthdef -> IO () Source #

Audible Ugen Source # 
Instance details

Defined in Sound.Sc3.Server.Transport.Fd

Methods

play_id :: Transport t => Int -> t -> Ugen -> IO () Source #

play :: Transport t => t -> Ugen -> IO () Source #

audition :: Audible e => e -> IO () Source #

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.

b_fetch1 :: Transport t => t -> Int -> Int -> IO [Double] Source #

Status

serverStatus :: Transport t => t -> IO [String] Source #

Collect server status information.

serverSampleRateNominal :: Transport t => t -> IO Double Source #

Read nominal sample rate of server.

serverSampleRateActual :: Transport t => t -> IO Double Source #

Read actual sample rate of server.

serverStatusData :: Transport t => t -> IO [Datum] Source #

Retrieve status data from server.