csound-expression-4.9.1: library to make electronic music

Safe HaskellNone



Open Sound Control.



initOsc :: OscPort -> SE OscRef

Initializes host client. The process starts to run in the background.

listenOsc :: Tuple a => OscRef -> OscAddress -> OscType -> Evt a

Listens for the OSC-messages. The first argument is OSC-reference. We can create it with the function oscInit. The next two arguments are strings. The former specifies the path-like address to listen the messages. It can be:


The latter specifies the type of expected arguments. The string can contain the characters "bcdfilmst" which stand for Boolean, character, double, float, 32-bit integer, 64-bit integer, MIDI, string and timestamp.

The result is an event of messages. We can run a callback on it with standard function runEvt:

runEvt :: Evt a -> (a -> SE ()) -> SE ()

sendOsc :: Tuple a => OscHost -> OscPort -> OscAddress -> OscType -> Evt a -> SE ()

Sends OSC-messages. It takes in a name of the host computer (empty string is alocal machine), port on which the target machine is listening, OSC-addres and type. The last argument produces the values for OSC-messages.