hosc-0.15: Haskell Open Sound Control

Safe Haskell | None
Language | Haskell98

Sound.OSC.Class

Description

Typeclass for encoding and decoding OSC packets.

Synopsis

- class OSC o where
- encodeOSC :: (Coding c, OSC o) => o -> c
- decodeOSC :: (Coding c, OSC o) => c -> Maybe o

# Documentation

class OSC o where Source #

A type-class for values that can be translated to and from OSC `Packet`s.

Minimal complete definition

toPacket, fromPacket

Methods

toPacket :: o -> Packet Source #

fromPacket :: Packet -> Maybe o Source #

Instances

OSC Packet Source # |
Methods toPacket :: Packet -> Packet Source # fromPacket :: Packet -> Maybe Packet Source #
OSC Bundle Source # |
Methods toPacket :: Bundle -> Packet Source # fromPacket :: Packet -> Maybe Bundle Source #
OSC Message Source # |
Methods toPacket :: Message -> Packet Source # fromPacket :: Packet -> Maybe Message Source #

encodeOSC :: (Coding c, OSC o) => o -> c Source #

`encodePacket` `.` `toPacket`.

decodeOSC :: (Coding c, OSC o) => c -> Maybe o Source #

`fromPacket` `.` `decodePacket`.