-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell Open Sound Control -- -- hosc provides Sound.OpenSoundControl, a haskell module implementing a -- subset of the Open Sound Control byte protocol. @package hosc @version 0.3 module Sound.OpenSoundControl.Cast -- | The IEEE byte representation of a float packed into an integer. f32_i32 :: Float -> Int32 -- | Inverse of f32_i32. i32_f32 :: Int32 -> Float -- | The IEEE byte representation of a double packed into an integer. f64_i64 :: Double -> Int64 -- | Inverse of f64_i64. i64_f64 :: Int64 -> Double -- | Transform a haskell string into a C string (a null suffixed byte -- string). str_cstr :: String -> [Word8] -- | Inverse of str_cstr. cstr_str :: [Word8] -> String -- | Transform a haskell string to a pascal string (a length prefixed byte -- string). str_pstr :: String -> [Word8] -- | Inverse of str_pstr. pstr_str :: [Word8] -> String module Sound.OpenSoundControl.Byte -- | Encode a signed 8-bit integer. encode_i8 :: Int -> ByteString -- | Encode a signed 16-bit integer. encode_i16 :: Int -> ByteString -- | Encode a signed 32-bit integer. encode_i32 :: Int -> ByteString -- | Encode an unsigned 16-bit integer. encode_u32 :: Int -> ByteString -- | Encode a signed 64-bit integer. encode_i64 :: Integer -> ByteString -- | Encode an unsigned 64-bit integer. encode_u64 :: Integer -> ByteString -- | Encode a 32-bit IEEE floating point number. encode_f32 :: Double -> ByteString -- | Encode a 64-bit IEEE floating point number. encode_f64 :: Double -> ByteString -- | Encode an ASCII string. encode_str :: String -> ByteString -- | Decode a signed 8-bit integer. decode_i8 :: ByteString -> Int -- | Decode a signed 16-bit integer. decode_i16 :: ByteString -> Int -- | Decode a signed 32-bit integer. decode_i32 :: ByteString -> Int -- | Decode an unsigned 32-bit integer. decode_u32 :: ByteString -> Int -- | Decode a signed 64-bit integer. decode_i64 :: ByteString -> Integer -- | Decode an unsigned 64-bit integer. decode_u64 :: ByteString -> Integer -- | Decode a 32-bit IEEE floating point number. decode_f32 :: ByteString -> Double -- | Decode a 64-bit IEEE floating point number. decode_f64 :: ByteString -> Double -- | Decode an ASCII string. decode_str :: ByteString -> String module Sound.OpenSoundControl.Time -- | UTC time is represented as a real number. type UTC = Double -- | NTP time is represented as an integer. type NTP = Integer -- | Convert a real-valued NTP timestamp to an NTP timestamp. ntpr_ntp :: Double -> NTP -- | Convert UTC timestamp to NTP timestamp. utc_ntp :: UTC -> NTP -- | The time at 1970-01-01:00:00:00. utc_base :: UTCTime -- | Read current UTC timestamp. utc :: IO UTC -- | Read current NTP timestamp. ntp :: IO 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). encodeOSCNTP :: 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