Safe Haskell | None |
---|
Monad class implementing an Open Sound Control transport.
- class Monad m => SendOSC m where
- class Monad m => RecvOSC m where
- recvPacket :: m Packet
- class (SendOSC m, RecvOSC m) => DuplexOSC m
- class (DuplexOSC m, MonadIO m) => Transport m
- type Connection t a = ReaderT t IO a
- withTransport :: Transport t => IO t -> Connection t a -> IO a
- sendMessage :: SendOSC m => Message -> m ()
- sendBundle :: SendOSC m => Bundle -> m ()
- recvOSC :: (RecvOSC m, OSC o) => m (Maybe o)
- recvBundle :: RecvOSC m => m Bundle
- recvMessage :: RecvOSC m => m (Maybe Message)
- recvMessages :: RecvOSC m => m [Message]
- waitUntil :: RecvOSC m => (Packet -> Bool) -> m Packet
- waitFor :: RecvOSC m => (Packet -> Maybe a) -> m a
- waitImmediate :: RecvOSC m => m Packet
- waitMessage :: RecvOSC m => m Message
- waitAddress :: RecvOSC m => Address_Pattern -> m Packet
- waitReply :: RecvOSC m => Address_Pattern -> m Message
- waitDatum :: RecvOSC m => Address_Pattern -> m [Datum]
Documentation
class Monad m => RecvOSC m whereSource
Receiver monad.
recvPacket :: m PacketSource
Receive and decode an OSC packet.
type Connection t a = ReaderT t IO aSource
Transport connection.
withTransport :: Transport t => IO t -> Connection t a -> IO aSource
Bracket Open Sound Control communication.
Send
sendMessage :: SendOSC m => Message -> m ()Source
Type restricted synonym for sendOSC
.
sendBundle :: SendOSC m => Bundle -> m ()Source
Type restricted synonym for sendOSC
.
Receive
recvOSC :: (RecvOSC m, OSC o) => m (Maybe o)Source
Variant of recvPacket
that runs fromPacket
.
recvBundle :: RecvOSC m => m BundleSource
Variant of recvPacket
that runs packet_to_bundle
.
recvMessage :: RecvOSC m => m (Maybe Message)Source
Variant of recvPacket
that runs packet_to_message
.
recvMessages :: RecvOSC m => m [Message]Source
Variant of recvPacket
that runs packetMessages
.
Wait
waitMessage :: RecvOSC m => m MessageSource
waitFor
packet_to_message
, ie. an incoming Message
or
immediate mode Bundle
with one element.
waitAddress :: RecvOSC m => Address_Pattern -> m PacketSource
A waitFor
for variant using packet_has_address
to match on
the Address_Pattern
of incoming Packets
.
waitReply :: RecvOSC m => Address_Pattern -> m MessageSource
Variant on waitAddress
that returns matching Message
.
waitDatum :: RecvOSC m => Address_Pattern -> m [Datum]Source
Variant of waitReply
that runs messageDatum
.