-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell Open Sound Control -- -- Haskell implementation of the Open Sound Control byte protocol @package hosc @version 0.1 module Sound.OpenSoundControl.Cast f32_i32 :: Float -> Int32 i32_f32 :: Int32 -> Float f64_i64 :: Double -> Int64 i64_f64 :: Int64 -> Double -- | C strings are null suffixed byte strings. str_cstr :: String -> [Word8] cstr_str :: [Word8] -> String -- | Pascal strings are length prefixed byte strings. str_pstr :: String -> [Word8] pstr_str :: [Word8] -> String module Sound.OpenSoundControl.Byte encode_i8 :: Int -> ByteString encode_i16 :: Int -> ByteString encode_i32 :: Int -> ByteString encode_u32 :: Int -> ByteString encode_i64 :: Integer -> ByteString encode_u64 :: Integer -> ByteString encode_f32 :: Double -> ByteString encode_f64 :: Double -> ByteString encode_str :: String -> ByteString decode_i8 :: ByteString -> Int decode_i16 :: ByteString -> Int decode_i32 :: ByteString -> Int decode_u32 :: ByteString -> Int decode_i64 :: ByteString -> Integer decode_u64 :: ByteString -> Integer decode_f32 :: ByteString -> Double decode_f64 :: ByteString -> Double decode_str :: ByteString -> String module Sound.OpenSoundControl.Time -- | UTC time is represented as a real number. type UTC = Double -- | Read current UTC timestamp. utc :: IO UTC -- | NTP time is represented as an integer. type NTP = Integer -- | Read current NTP timestamp. ntp :: IO NTP -- | Convert a real-valued NTP timestamp to an NTP timestamp. ntpr_ntp :: Double -> NTP -- | Convert UTC timestamp to NTP timestamp. utc_ntp :: UTC -> NTP module Sound.OpenSoundControl.OSC -- | An OSC packet. data OSC Message :: String -> [Datum] -> OSC Bundle :: Double -> [OSC] -> OSC -- | The basic elements of OSC messages. data Datum Int :: Int -> Datum Float :: Double -> Datum Double :: Double -> Datum String :: String -> Datum Blob :: [Word8] -> Datum -- | Encode an OSC packet. encodeOSC :: OSC -> ByteString -- | Encode an OSC packet (NTP epoch). encodeOSC_NTP :: OSC -> ByteString -- | Decode an OSC packet. decodeOSC :: ByteString -> OSC instance Eq OSC instance Show OSC instance Eq Datum instance Show Datum instance Ord OSC module Sound.OpenSoundControl.Transport -- | Abstract over the underlying transport protocol. class Transport t send :: (Transport t) => t -> OSC -> IO () recv :: (Transport t) => t -> IO OSC close :: (Transport t) => t -> IO () -- | Bracket OSC communication. withTransport :: (Transport t) => IO t -> (t -> IO a) -> IO a -- | Wait for an OSC message with the specified address, discarding -- intervening messages. wait :: (Transport t) => t -> String -> IO OSC module Sound.OpenSoundControl.Transport.UDP -- | The UDP transport handle data type. data UDP -- | Make a UDP connection. openUDP :: String -> Int -> IO UDP instance Eq UDP instance Show UDP instance Transport UDP module Sound.OpenSoundControl.Transport.TCP -- | The TCP transport handle data type. data TCP -- | Make a TCP connection. openTCP :: String -> Int -> IO TCP -- | A trivial TCP OSC server. tcpServer :: Int -> (TCP -> IO ()) -> IO () instance Eq TCP instance Show TCP instance Transport TCP module Sound.OpenSoundControl