(8I      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHSafeReal valued variant of I.Repeat action until predicate f is J when applied to result.Repeat action until f does not give K when applied to result.Safe Unix/Posix- epoch time in real-valued (fractional) form.NTP, time in real-valued (fractional) form (ie. ntpr).,Type for integer (binary) representation of NTP time.8Constant indicating a bundle to be executed immediately.*Convert a real-valued NTP timestamp to an  timestamp. fmap ntpr_to_ntpi time Convert an * timestamp to a real-valued NTP timestamp.  Difference (in seconds) between NTP and UT epochs. +ntp_ut_epoch_diff / (24 * 60 * 60) == 25567  Convert a  timestamp to an  timestamp. Convert  Unix/Posix to NTP. Convert NTP to  Unix/Posix. Convert  to  Unix/Posix.Convert  to L.Convert L to . The time at 1970-01-01:00:00:00.Convert M to  Unix/Posix.Read current real-valued NTP timestamp. vdo {ct <- fmap utc_to_ut T.getCurrentTime ;pt <- fmap realToFrac T.getPOSIXTime ;print (pt - ct,pt - ct < 1e-5)}The _ limit (in seconds). Values larger than this require a different thread delay mechanism, see /. The value is the number of microseconds in  maxBound::Int.EPause current thread for the indicated duration (in seconds), see .Type restricted .%Pause current thread until the given , see .mSleep current thread for the indicated duration (in seconds). Divides long sleeps into parts smaller than .%Sleep current thread until the given 0. Divides long sleeps into parts smaller than .IDetailed 37-character ISO 8601 format, including fractional seconds and '+0000' suffix.Parse time according to  ;iso_8601_to_utctime "2015-11-26T00:29:37,145875000000+0000" UTC time in . tm <- fmap (utctime_to_iso_8601 . T.posixSecondsToUTCTime) T.getPOSIXTime (length tm,sum [4+1+2+1+2,1,2+1+2+1+2,1,12,1,4],sum [10,1,8,1,12,1,4]) ISO 8601 of . _tm <- fmap ntpr_to_iso_8601 time import System.Process {- process -} rawSystem "date" ["-d",tm] 4ntpr_to_iso_8601 (ntpi_to_ntpr 15708783354150518784) of ISO 8601. Lfmap ntpr_to_ntpi (iso_8601_to_ntpr "2015-11-26T00:22:19,366058349609+0000") Alias for . fmap time_pp time    Safe#5Perhaps a precision value for floating point numbers. #The basic elements of OSC messages.19Four-byte midi message: port-id, status-byte, data, data.3 Type for N" arrays, these are stored with an O length prefix.4Type for ASCII strings (strict P8 Q).5"Type enumerating Datum categories.6Type-specialised R.7Type-specialised S.8Type-specialised T.9Type-specialised U.:'List of required data types (tag,name).;'List of optional data types (tag,name).<"List of all data types (tag,name).=Lookup name of type.>Erroring variant.?,Single character identifier of an OSC datum.@Type and name of  .A  as V if Int32 or Int64. plet d = [Int32 5,Int64 5,Float 5.5,Double 5.5] in map datum_integral d == [Just (5::Int),Just 5,Nothing,Nothing]B  as W- if Int32, Int64, Float, Double or TimeStamp. ylet d = [Int32 5,Int64 5,Float 5,Double 5,TimeStamp 5] in Data.Maybe.mapMaybe datum_floating d == replicate 5 (5::Double)CType generalised Int32. int32 (1::Int32) == int32 (1::Integer) d_int32 (int32 (maxBound::Int32)) == maxBound int32 (((2::Int) ^ (64::Int))::Int) == Int32 0DType generalised Int64. Tint64 (1::Int32) == int64 (1::Integer) d_int64 (int64 (maxBound::Int64)) == maxBoundEType generalised Float. float (1::Int) == float (1::Double) floatRange (undefined::Float) == (-125,128) isInfinite (d_float (float (encodeFloat 1 256 :: Double))) == TrueFType generalised Double. idouble (1::Int) == double (1::Double) double (encodeFloat 1 256 :: Double) == Double 1.157920892373162e77G% of R. 5string "string" == ASCII_String (Char8.pack "string")HFour-tuple variant of ( X 1. %midi (0,0,0,0) == Midi (MIDI 0 0 0 0)I1Message argument types are given by a descriptor. @Char8.unpack (descriptor [Int32 1,Float 1,string "1"]) == ",ifs"JDescriptor tags are comma prefixed.K Variant of Y that deletes trailing zeros. 1map (floatPP (Just 4)) [1,pi] == ["1.0","3.1416"]LPretty printer for . !timePP (Just 4) (1/3) == "0.3333"MPretty printer for vectors. vecPP [1::Int,2,3] == "<1,2,3>"NPretty printer for  . let d = [Int32 1,Float 1.2,string "str",midi (0,0x90,0x40,0x60)] in map (datumPP (Just 5)) d == ["1","1.2","\"str\"","<0,144,64,96>"]O Variant of N that appends the @.P Variant of Z.QGiven 5 attempt to parse   at [. aparse_datum 'i' "42" == Just (Int32 42) parse_datum 'h' "42" == Just (Int64 42) parse_datum 'f' "3.14159" == Just (Float 3.14159) parse_datum 'd' "3.14159" == Just (Double 3.14159) parse_datum 's' "\"pi\"" == Just (string "pi") parse_datum 'b' "[112,105]" == Just (Blob (blob_pack [112,105])) parse_datum 'm' "(0,144,60,90)" == Just (midi (0,144,60,90))RErroring variant of Q.4 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR4 #$!"%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR4546738912 !"#$%&'()*+,-./0:;<=>?@ABCDEFGHIJKLMNOPQR# !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSafe Y"Class for translating to and from  *. There are instances for the direct   field types. d_put (1::Int32) == Int32 1 d_put (1::Int64) == Int64 1 d_put (1::Float) == Float 1 d_put (1::Double) == Double 1 d_put (Char8.pack "str") == ASCII_String (Char8.pack "str") d_put (Lazy.pack [37,37]) == Blob (blob_pack [37,37]) d_put (MIDI 0 0 0 0) == Midi (MIDI 0 0 0 0)4There are also instances for standard Haskell types. 7d_put (1::Int) == Int64 1 d_put (1::Integer) == Int64 1\Error variant of [.]Type specialised [. 5map datum_int32 [Int32 1,Float 1] == [Just 1,Nothing]^Type specialised [._Type specialised [.`Type specialised [.aType specialised [. Gdatum_ascii (d_put (Char8.pack "string")) == Just (Char8.pack "string")bS of [. datum_string (d_put (Char8.pack "string")) == Just "string" map datum_string [string "string",Int32 5] == [Just "string",Nothing]cType specialised [.d\ variant of /.eType specialised [.f  as sequence of N if %, & or (. let d = [string "5",Blob (Lazy.pack [53]),midi (0x00,0x90,0x40,0x60)] in Data.Maybe.mapMaybe datum_sequence d == [[53],[53],[0,144,64,96]]YZ[\]^_`abcdefghijklmnoYZ[\]^_`abcdefYZ[onmlkjihg\]^_`abcdefYZ[\]^_`abcdefghijklmnoSafepStrictly unpack to (s,f).qStrictly unpack to (i,f).rCasting unpack to (s,d).sCasting unpack to (i,d).pqrspqrspqrspqrsSafetAn OSC t is either a } or a y.yAn OSC bundle.}An OSC message.}OSC address pattern. This is strictly an ASCII value, but it is very common to pattern match on addresses and matching on  requires OverloadedStrings.} constructor. It is an ] if the + doesn't conform to the OSC specification.y constructor. It is an ] if the } list is empty.v X .u X .The  of t , if the t is a } this is .Retrieve the set of } s from a t.If t is a } add  timestamp, else ^.If t is a } or a y with an  immediate, time tag and with one element, return the }, else K.Is t immediate, ie. a y with timestamp , or a plain Message. Variant of _ for t.Does } have the specified .Do any of the }s at y have the specified .Does t have the specified , ie.  or .Pretty printer for }.Pretty printer for y.Pretty printer for t.OSC y"s can be ordered (time ascending).tuvwxyz{|}~tuvwxyz{|}~}~yz{|tuvwxtuvwxyz{|}~SafeLift  to  and  to . ;map normalise_datum [Int32 1,Float 1] == [Int64 1,Double 1] A normalised } has only  and  numerical values. `let m = message "/m" [Int32 0,Float 0] in normalise_message m == message "/m" [Int64 0,Double 0] A normalised y has only  and  numerical values.0Map a normalising function over datum at an OSC }.0Map a normalising function over datum at an OSC y.Coerce !, " and ` to a. :map datum_promote [Int32 5,Float 5] == [Double 5,Double 5] as  if , ,  or . ~let d = [Int32 5,Int64 5,Float 5.5,Double 5.5,string "5"] in map datum_floor d == [Int64 5,Int64 5,Int64 5,Int64 5,string "5"]Safe0Map a normalising function over datum at an OSC }.0Map a normalising function over datum at an OSC y. Safe Type specialised bType specialised bType specialised b.Type specialised bType specialised bType specialised bType specialised bType specialised bType specialised bType specialised bType specialised bType specialised b None(The IEEE byte representation of a float. Inverse of .)The IEEE byte representation of a double. Inverse of f64_i64.ITransform a haskell string into a C string (a null suffixed byte string). Inverse of .NTransform a haskell string to a pascal string (a length prefixed byte string). Inverse of . None-Encode a signed 8-bit integer."Encode an un-signed 8-bit integer.Type specialised c. !encode_w16 0x0102 == L.pack [1,2]Little-endian. $encode_w16_le 0x0102 == L.pack [2,1]#Encode an un-signed 16-bit integer. !encode_u16 0x0102 == L.pack [1,2]Little-endian. $encode_u16_le 0x0102 == L.pack [2,1]Encode a signed 16-bit integer.Encode a signed 32-bit integer.Type specialised c."Encode an unsigned 32-bit integer. )encode_u32 0x01020304 == L.pack [1,2,3,4]Little-endian variant of .Little-endian. ,encode_u32_le 0x01020304 == L.pack [4,3,2,1]Encode a signed 64-bit integer."Encode an unsigned 64-bit integer.+Encode a 32-bit IEEE floating point number.Little-endian variant of .+Encode a 64-bit IEEE floating point number.JEncode an ASCII string (ASCII at Datum is an alias for a Char8 Bytetring)."Decode an un-signed 8-bit integer.Decode a signed 8-bit integer.Type specialised d.!Decode an unsigned 8-bit integer.Little-endian variant of .Little-endian variant of .Type specialised d.Decode a signed 16-bit integer.Little-endian variant of .Decode a signed 32-bit integer.Type specialised d."Decode an unsigned 32-bit integer. +decode_u32 (L.pack [1,2,3,4]) == 0x01020304Little-endian variant of .$Little-endian variant of decode_u32. .decode_u32_le (L.pack [1,2,3,4]) == 0x04030201Type specialised d.Type specialised d.+Decode a 32-bit IEEE floating point number.Little-endian variant of .+Decode a 64-bit IEEE floating point number.#Decode an ASCII string, inverse of . of e. of e.f of .f of .Bundle header as a (strict) Q.#Bundle header as a lazy ByteString.RThe number of bytes required to align an OSC value to the next 4-byte boundary. ,map align [0::Int .. 7] == [0,3,2,1,0,3,2,1]---- NoneDecode an OSC }.Decode an OSC y.Decode an OSC t. nlet b = B.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0] in decodePacket b == Message "/g_free" [Int 0]gh with i count.jk with i count. lmnopgj lmnopgj Noneq.Get a 32 bit integer in big-endian byte order.r.Get a 64 bit integer in big-endian byte order.sGet an aligned OSC string.tGet an aligned OSC string.u'Get binary data prefixed by byte count.vGet an OSC datum.w Get an OSC }%, fail if type descriptor is invalid.xGet a sequence of OSC }!s, each one headed by its length.y;Get a bundle. Fail if bundle header is not found in packet. Get an OSC t.Decode an OSC } from a lazy ByteString. nlet b = B.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0] decodeMessage b == Message "/g_free" [Int32 0]Decode an OSC y from a lazy ByteString.,Decode an OSC packet from a lazy ByteString. ~let b = B.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0] decodePacket b == Packet_Message (Message "/g_free" [Int32 0]).Decode an OSC packet from a strict ByteString.qrstuvwxyqrstuvwxyNoneAlign byte string, if required. Encode OSC  . Encode OSC }. Encode OSC } as an OSC blob. Encode OSC y. Encode OSC t.Nonez*Generate a list of zero bytes for padding.{#Nul byte (0) and then zero padding.Builder for an OSC t.Encode an OSC }. plet b = L.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0] encodeMessage (Message "/g_free" [Int32 0]) == bEncode an OSC y.Encode an OSC t.Encode an OSC t to a strict Q. z{|}~ z{|}~None5Converting from and to binary packet representations. X u. X v. X . X .  None?A type-class for values that can be translated to and from OSC ts. X . X .   None 0Abstract over the underlying transport protocol. Encode and send an OSC packet. !Receive and decode an OSC packet. Close an existing connection.Bracket OSC communication.Type restricted synonym for  .Type restricted synonym for  . Variant of   that runs . Variant of   that runs . Variant of   that runs . Variant of   that runs . Variant of   that implements an n second timeout. Wait for a t! where the supplied predicate is J", discarding intervening packets. Wait for a t, where the supplied function does not give K!, discarding intervening packets. . , ie. an incoming } or immediate mode y with one element.A  for variant using  to match on the  of incoming Packets. Variant on  that returns matching }. Variant of  that runs .                NoneTransport connection. is  with a  constraint. is the union of " and  . Receiver monad.!!Receive and decode an OSC packet." Sender monad.#Encode and send an OSC packet.$)Bracket Open Sound Control communication.%Type restricted synonym for #.&Type restricted synonym for #.' Variant of ! that runs .( Variant of ! that runs .) Variant of ! that runs .*Erroring variant.+ Variant of ! that runs ., Wait for a t! where the supplied predicate is J", discarding intervening packets.- Wait for a t, where the supplied function does not give K!, discarding intervening packets.., ./- , ie. an incoming } or immediate mode y with one element.0A - for variant using  to match on the  of incoming Packets.1 Variant on 0 that returns matching }.2 Variant of 1 that runs .3 over .4 over .5  over .6" over . !"#$%&'()*+,-./0123456 !"#$%&'()*+,-./012"# !6543$%&'()*+,-./012 !"#$%&'()*+,-./0123456None 7#The UDP transport handle data type.:6Return the port number associated with the UDP socket.;!Create and initialise UDP socket.<Set option, ie.  or .= Get option.>Make a 7 connection. Tlet t = openUDP "127.0.0.1" 57110 in withTransport t (\fd -> recvT 0.5 fd >>= print)?Trivial 7 server socket. import Control.Concurrent ylet {f fd = forever (recvMessage fd >>= print) ;t = udpServer "127.0.0.1" 57300} in void (forkIO (withTransport t f)) ^let t = openUDP "127.0.0.1" 57300 in withTransport t (\fd -> sendMessage fd (message "/n" []))@*Send variant to send to specified address.A/Recv variant to collect message source address.B7 is an instance of  . 789:;<=>?@AB 789:;<=>?@A 789:B;<=>?@A 789:;<=>?@ABNone{  #$!"%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRtuvwxyz{|}~NoneC#The TCP transport handle data type.FMake a C connection. import Sound.OSC.Core import Sound.OSC.Transport.FD import Sound.OSC.Transport.FD.TCP let t = openTCP "127.0.0.1" 57110 let m1 = message "/dumpOSC" [Int32 1] let m2 = message "/g_new" [Int32 1] withTransport t (\fd -> let f = sendMessage fd in f m1 >> f m2)G A trivial C OSC server.HC is an instance of  .CDEFGHCDEFGCDEHFGCDEFGHNone  #$!"%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRtuvwxyz{|}~    789:;<=>?@ACDEFG None  #$!"%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRtuvwxyz{|}~ !"#$%&'()*+,-./012789:;<=>?@ACDEFG!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        !"#$%&'()*+,!"#$%&'-./01123456789:;<<=>?@ABCDEFAGHIJKILMANOAPDEQRSRTURTVRWURWVAXYAZ[AG\A]^A_`AGaAGbAcdAGeAfgDEDEAXhijkijlRWmRWn oRWpDEq rRWs t u v w x y z { | } ~   AA hosc-0.16-CCCOrDODpHPEmjIfmGoq9VSound.OSC.WaitSound.OSC.TimeSound.OSC.DatumSound.OSC.Datum.DatemSound.OSC.Datum.UnpackSound.OSC.PacketSound.OSC.Datum.NormaliseSound.OSC.Packet.CoerceSound.OSC.Coding.ConvertSound.OSC.Coding.CastSound.OSC.Coding.ByteSound.OSC.Coding.Decode.BaseSound.OSC.Coding.Decode.BinarySound.OSC.Coding.Encode.BaseSound.OSC.Coding.Encode.BuilderSound.OSC.Coding.ClassSound.OSC.Packet.ClassSound.OSC.Transport.FDSound.OSC.Transport.MonadSound.OSC.Transport.FD.UDPSound.OSC.Transport.FD.TCPC ByteStringOInt32Int64FloatDoubleDatumSound.OSC.Core Sound.OSC.FD Sound.OSC timeout_runtilPredicate untilMaybeUTTimeNTPi immediately ntpr_to_ntpi ntpi_to_ntprntp_ut_epoch_diff ut_to_ntpi ut_to_ntpr ntpr_to_ut ntpi_to_utntpr_to_posixtimeposixtime_to_ntprut_epoch utc_to_uttimepauseThreadLimit pauseThreadwaitpauseThreadUntil sleepThreadsleepThreadUntil iso_8601_fmtiso_8601_to_utctimeutctime_to_iso_8601ntpr_to_iso_8601iso_8601_to_ntprtime_pp FP_Precision ASCII_StringBlob TimeStampMidid_int32d_int64d_floatd_doubled_ascii_stringd_blob d_timestampd_midiMIDIBLOBASCII Datum_Typeasciiascii_to_string blob_pack blob_unpackosc_types_requiredosc_types_optional osc_types osc_type_nameosc_type_name_err datum_tagdatum_type_namedatum_integraldatum_floatingint32int64floatdoublestringmidi descriptordescriptor_tagsfloatPPtimePPvecPPdatumPPdatum_pp_typed readMaybe parse_datumparse_datum_err$fEqMIDI $fShowMIDI $fReadMIDI $fEqDatum $fReadDatum $fShowDatumDatemd_putd_get d_get_err datum_int32 datum_int64 datum_float datum_double datum_ascii datum_string datum_blobdatum_timestamp datum_mididatum_sequence $fDatemMIDI$fDatemByteString$fDatemByteString0 $fDatemDouble $fDatemFloat$fDatemInteger $fDatemInt $fDatemInt64 $fDatemInt32 unpackS_sf unpackS_if unpackC_sf unpackC_ifPacketPacket_Message Packet_Bundle packetMessage packetBundleBundle bundleTimebundleMessagesMessagemessageAddress messageDatumAddress_Patternmessagebundlep_bundle p_message packetTimepacketMessagespacket_to_bundlepacket_to_messagepacket_is_immediate at_packetmessage_has_addressbundle_has_addresspacket_has_address messagePPbundlePPpacketPP $fOrdBundle $fEqMessage $fReadMessage $fShowMessage $fEqBundle $fReadBundle $fShowBundle $fEqPacket $fReadPacket $fShowPacketnormalise_datumnormalise_messagenormalise_bundlemessage_coerce bundle_coerce datum_promote datum_floor int_to_word8 int_to_word32 int_to_word16 int_to_int8 int_to_int16 int_to_int32 int8_to_int int16_to_int int32_to_int word8_to_int word16_to_int word32_to_intf32_w32w32_f32f64_w64w64_f64str_cstrcstr_strstr_pstrpstr_str encode_i8 encode_u8 encode_w16 encode_w16_le encode_u16 encode_u16_le encode_i16 encode_i32 encode_w32 encode_u32 encode_w32_le encode_u32_le encode_i64 encode_u64 encode_f32 encode_f32_le encode_f64 encode_str decode_u8 decode_i8 decode_word16 decode_u16decode_word16_le decode_u16_le decode_int16 decode_i16 decode_i16_le decode_i32 decode_word32 decode_u32decode_word32_le decode_u32_le decode_i64 decode_u64 decode_f32 decode_f32_le decode_f64 decode_strread_u32 read_u32_le write_u32 write_u32_lebundleHeader_strict bundleHeaderalign decodeMessage decodeBundle decodePacket get_packetdecodePacket_strictextend encode_datum encodeMessageencode_message_blob encodeBundle encodePacket build_packetencodePacket_strictCoding$fCodingByteString$fCodingByteString0OSCtoPacket fromPacket encodeOSC decodeOSC $fOSCPacket $fOSCBundle $fOSCMessage TransportsendOSC recvPacketclose withTransport sendMessage sendBundlerecvOSC recvBundle recvMessage recvMessagesrecvPacketTimeout waitUntilwaitFor waitImmediate waitMessage waitAddress waitReply waitDatum Connection DuplexOSCRecvOSCSendOSCrecvMessage_err$fTransportReaderT$fDuplexOSCReaderT$fRecvOSCReaderT$fSendOSCReaderTUDP udpSocketudpPort udp_socket set_udp_opt get_udp_optopenUDP udpServersendTorecvFrom$fTransportUDPTCP tcpHandleopenTCP tcpServer'$fTransportTCPbaseSystem.Timeouttimeoutghc-prim GHC.TypesTrueGHC.BaseNothing time-1.6.0.1Data.Time.Clock.POSIX POSIXTimeData.Time.Clock.UTCUTCTimeGHC.WordWord8GHC.IntCharbytestring-0.10.8.1Data.ByteString.InternalData.ByteString.Char8packunpackData.ByteString.LazyGHC.RealIntegral GHC.FloatFloating.Numeric showFFloat Text.ReadreadStringMaybeGHC.Errerrorid Data.Eithereither fromIntegralbinary-0.8.3.0 Data.BinaryencodedecodehGethPutb_taketakeIntb_dropdropsizestorage decode_datumdecode_datum_seqdecode_message_seq getInt32be getInt64be get_string get_ascii get_bytes get_datum get_messageget_message_seq get_bundlepaddingnul_and_padding build_ascii build_string build_bytes build_datum build_messagebuild_bundle_ntpiControl.Monad.IO.ClassMonadIOtransformers-0.5.2.0Control.Monad.Trans.ReaderReaderT&network-2.6.3.2-IsLM4TXcLoRI0fmmBYVyQzNetwork.Socket Broadcast RecvTimeOutliftIO