vivid- Sound synthesis with SuperCollider
Safe HaskellNone



A VividAction m => m a can either be run immediately, be scheduled to run at a precise future time, or be used for non-realtime synthesis.

Note that at the moment VividAction has MonadIO, but this won't be true in upcoming versions (as early as the next release) - so don't get used to it!



class (Monad m, MonadIO m) => VividAction (m :: * -> *) where Source #


callOSC :: OSC -> m () Source #

Send an OSC message to the SuperCollider server

callBS :: ByteString -> m () Source #

Send a ByteString to the SuperCollider server. You usually want to use call instead.

sync :: m () Source #

Blocks until the server finishes processing commands

waitForSync :: SyncId -> m () Source #

As the user, you probably don't want to use this:

Many commands already include a "sync" -- e.g. makeBuffer already syncs.

When you do want to do an explicit sync you probably want to use sync instead, or callOSCAndSync

wait :: Real n => n -> m () Source #

Wait, in seconds

getTime :: m Timestamp Source #

newBufferId :: m BufferId Source #

newNodeId :: m NodeId Source #

newSyncId :: m SyncId Source #

fork :: m () -> m () Source #

defineSD :: SynthDef a -> m () Source #

Send a synth definition to be loaded on the SC server

Note that this is sort of optional -- if you don't call it, it'll be called the first time you call synth with the SynthDef


Instances details
VividAction IO Source # 
Instance details

Defined in Vivid.GlobalState

VividAction Scheduled Source # 
Instance details

Defined in Vivid.Actions.Scheduled

VividAction NRT Source # 
Instance details

Defined in Vivid.Actions.NRT

VividAction (ReaderT SCServerState IO) Source # 
Instance details

Defined in Vivid.Actions.IO

callOSCAndSync :: VividAction m => OSC -> m () Source #

Send an OSC message and wait for it to complete before returning

oscWSync :: VividAction m => (SyncId -> m ()) -> m () Source #

Maybe can dedupe with callOSCAndSync