vivid- Sound synthesis with SuperCollider

Safe HaskellNone




createSCServerConnection :: SCConnectConfig -> IO Socket Source

You usually don't need to call this function

Use this if to connect on a non-default port or to a server not at localhost

Otherwise the connection is created when it's needed. You can also use this to explicitly create the connection, so the computation is done upfront

The HostName is the ip address or "localhost". The ServiceName is the port

defaultConnectConfig :: SCConnectConfig Source

The default _scConnectConfig_clientId is 1, and sclang's is 0, so you should be able to run vivid side-by-side with the SC IDE out of the box.

defaultMessageFunction :: OSC -> IO () Source

Print all messages other than "/done"s

ignoreMessagesFunction :: OSC -> IO () Source

If you don't want to hear what the server has to say

data SCConnectConfig Source




_scConnectConfig_hostName :: HostName
_scConnectConfig_port :: ServiceName
_scConnectConfig_clientId :: Int32

To prevent NodeId clashes when multiple clients are connected to the same server, each client should have a separate clientId, which keeps the nodeId separate. Sclang's default clientId is 0, and ours is 1, so you can run both at the same time without config.

_scConnectConfig_connProtocol :: ConnProtocol
_scConnectConfig_serverMessageFunction :: OSC -> IO ()

closeSCServerConnection :: IO () Source

Explicitly close Vivid's connection to a SC server.

Day-to-day, you can usually just let your program run without using this.

For example though, if you're running code that uses Vivid in ghci, and you ":r", you'll want to disconnect first -- there are processes running which can step on the toes of your new instance

Also if you want to change the params of your connection (e.g. to connect to a different server), you'll want to disconnect from the other connection first