Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Csound.Typed.Control.Osc
Description
Open sound control
Synopsis
- data OscRef
- type OscHost = String
- type OscPort = Int
- type OscAddress = String
- type OscType = String
- initOsc :: OscPort -> OscRef
- listenOsc :: forall a. Tuple a => OscRef -> OscAddress -> OscType -> Evt a
- sendOsc :: forall a. Tuple a => OscHost -> OscPort -> OscAddress -> OscType -> Evt a -> SE ()
- class Tuple a => OscVal a
- listenOscVal :: (Tuple a, OscVal a) => OscRef -> String -> a -> SE a
Documentation
type OscAddress = String Source #
Path-like string ("foobar/baz")
type OscType = String Source #
The string 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.
initOsc :: OscPort -> OscRef Source #
Initializes host client. The process starts to run in the background.
listenOsc :: forall a. Tuple a => OscRef -> OscAddress -> OscType -> Evt a Source #
Listens for the OSC-messages. The first argument is OSC-reference.
We can create it with the function initOsc
. The next two arguments are strings.
The former specifies the path-like address to listen the messages. It can be:
/foo/bar/baz
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 :: forall a. Tuple a => OscHost -> OscPort -> OscAddress -> OscType -> Evt a -> SE () Source #
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.
class Tuple a => OscVal a Source #
Minimal complete definition
getOscTypes, getOscRef
Instances
OscVal Sig Source # | |
Defined in Csound.Typed.Control.Osc | |
OscVal Str Source # | |
Defined in Csound.Typed.Control.Osc | |
(OscVal a, OscVal b) => OscVal (a, b) Source # | |
Defined in Csound.Typed.Control.Osc | |
(OscVal a, OscVal b, OscVal c) => OscVal (a, b, c) Source # | |
Defined in Csound.Typed.Control.Osc | |
(OscVal a, OscVal b, OscVal c, OscVal d) => OscVal (a, b, c, d) Source # | |
Defined in Csound.Typed.Control.Osc | |
(OscVal a, OscVal b, OscVal c, OscVal d, OscVal e) => OscVal (a, b, c, d, e) Source # | |
Defined in Csound.Typed.Control.Osc Methods getOscTypes :: (a, b, c, d, e) -> String |