Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Osc data types.
Synopsis
- type DatumType = Char
- type Ascii = ByteString
- ascii :: String -> Ascii
- ascii_to_string :: Ascii -> String
- type Blob = ByteString
- blob_pack :: [Word8] -> Blob
- blob_pack_int :: [Int] -> Blob
- blob_unpack :: Blob -> [Word8]
- blob_unpack_int :: Blob -> [Int]
- data MidiData = MidiData !Word8 !Word8 !Word8 !Word8
- midi_pack :: [Word8] -> MidiData
- midi_pack_int :: [Int] -> MidiData
- midi_unpack_int :: MidiData -> [Int]
- type Time = Double
- data Datum
- osc_types_required :: [(DatumType, String)]
- osc_types_optional :: [(DatumType, String)]
- osc_types :: [(DatumType, String)]
- osc_type_name :: DatumType -> Maybe String
- osc_type_name_err :: DatumType -> String
- datum_tag :: Datum -> DatumType
- datum_type_name :: Datum -> (DatumType, String)
- datum_integral :: Integral i => Datum -> Maybe i
- datum_floating :: Floating n => Datum -> Maybe n
- int32 :: Integral n => n -> Datum
- int64 :: Integral n => n -> Datum
- float :: Real n => n -> Datum
- double :: Real n => n -> Datum
- string :: String -> Datum
- midi :: (Word8, Word8, Word8, Word8) -> Datum
- blob :: [Word8] -> Datum
- signatureFor :: [Datum] -> String
- descriptor :: [Datum] -> Ascii
- descriptor_tags :: Ascii -> Ascii
Datum
type Ascii = ByteString Source #
Type for Ascii strings (strict Char8 ByteString)
ascii_to_string :: Ascii -> String Source #
Type-specialised unpack.
blob_pack_int :: [Int] -> Blob Source #
Type-specialised pack.
blob_unpack :: Blob -> [Word8] Source #
Type-specialised unpack.
blob_unpack_int :: Blob -> [Int] Source #
Type-specialised unpack.
Four-byte midi message: port-id, status-byte, data, data.
midi_pack_int :: [Int] -> MidiData Source #
Type-specialised pack.
midi_unpack_int :: MidiData -> [Int] Source #
Type-specialised unpack.
A real-valued time stamp. For Osc proper this is an Ntp64 time in real-valued (fractional) form. For SuperCollider Nrt programs this is elapsed time since the start of the score. This is the primary form of timestamp used by hosc.
The basic elements of Osc messages.
Int32 | |
Int64 | |
Float | |
Double | |
AsciiString | |
| |
Blob | |
TimeStamp | |
| |
Midi | |
Datum types
osc_types_required :: [(DatumType, String)] Source #
List of required data types (tag, name).
osc_types_optional :: [(DatumType, String)] Source #
List of optional data types (tag,name).
osc_type_name_err :: DatumType -> String Source #
Erroring variant.
Generalised element access
Constructors
int32 :: Integral n => n -> Datum Source #
Type generalised Datum
.
>>>
int32 (1::Int32) == int32 (1::Integer)
True
>>>
d_int32 (int32 (maxBound::Int32)) == maxBound
True
>>>
int32 (((2::Int) ^ (64::Int))::Int) == Int32 0
True
int64 :: Integral n => n -> Datum Source #
Type generalised Int64.
>>>
int64 (1::Int32) == int64 (1::Integer)
True
>>>
d_int64 (int64 (maxBound::Int64)) == maxBound
True
float :: Real n => n -> Datum Source #
Type generalised Float.
>>>
float (1::Int) == float (1::Double)
True
>>>
floatRange (undefined::Float)
(-125,128)
>>>
isInfinite (d_float (float (encodeFloat 1 256 :: Double)))
True
double :: Real n => n -> Datum Source #
Type generalised Double.
>>>
double (1::Int) == double (1::Double)
True
>>>
double (encodeFloat 1 256 :: Double) == Double 1.157920892373162e77
True
string :: String -> Datum Source #
AsciiString
of pack.
>>>
string "string" == AsciiString (ByteString.Char8.pack "string")
True
Descriptor
signatureFor :: [Datum] -> String Source #
Message argument types are given by a signature.
>>>
signatureFor [Int32 1,Float 1,string "1"]
",ifs"
descriptor :: [Datum] -> Ascii Source #
The descriptor is an Ascii encoded signature.
>>>
descriptor [Int32 1,Float 1,string "1"] == ascii ",ifs"
True
descriptor_tags :: Ascii -> Ascii Source #
Descriptor tags are comma
prefixed.