Safe Haskell | None |
---|---|
Language | Haskell98 |
Extensions |
|
You probably don't need to use this directly
Representation of Open Sound Control data
- data OSC = OSC ByteString [OSCDatum]
- data OSCDatum
- encodeOSC :: OSC -> ByteString
- decodeOSC :: ByteString -> OSC
- newtype Timestamp = Timestamp Double
- data OSCBundle = OSCBundle Timestamp [Either ByteString OSC]
- encodeOSCBundle :: OSCBundle -> ByteString
- encodeOSCBundles :: [OSCBundle] -> ByteString
- encodeTimestamp :: Timestamp -> ByteString
- utcToTimestamp :: UTCTime -> Timestamp
- addSecs :: Timestamp -> Double -> Timestamp
- diffTimestamps :: Timestamp -> Timestamp -> Double
- initTreeCommand :: OSC
Documentation
An OSC message, e.g.
OSC "/n_free" [OSC_I 42]
OSC_I Int32 | |
OSC_S ByteString | |
OSC_F Float | |
OSC_D Double | This isn't a base type in the OSC standard but the response message from "/status" uses it... |
OSC_B ByteString |
encodeOSC :: OSC -> ByteString Source #
decodeOSC :: ByteString -> OSC Source #
This is stored as the number of seconds since Jan 1 1900. You can get
it with getTime
encodeOSCBundles :: [OSCBundle] -> ByteString Source #
Encode OSC bundles, specifically for NRT synthesis.
(It's more than just "mconcat . map encodeOSCBundle
").
Note also that the last action is when the song ends - so if you want e.g. a note to hold at the end you need to add a "wait"
utcToTimestamp :: UTCTime -> Timestamp Source #