
The OpenSoundControl object interfaces directly with the udpsend and udpreceive objects and is specifically designed for OSC message management.The udpsend and udpreceive objects provide a means for sending and receiving data buffers using the UDP socket internet protocol.Any other character in an OSC Address Pattern can match only the same character.A comma-separated list of strings enclosed in curly braces (e.g., "foo,bar") in the OSC Address Pattern matches any of the strings in the list.(An exclamation point anywhere besides the first character after the open bracket has no special meaning.) An exclamation point at the beginning of a bracketed string negates the sense of the list, meaning that the list matches any character not in the list.(A minus sign at the end of the string has no special meaning.) Two characters separated by a minus sign indicate the range of characters between the given two in ASCII collating sequence.Inside square brackets, the minus sign (-) and exclamation point (!) have special meanings: A string of characters in square brackets (e.g., "") in the OSC Address Pattern matches any character in the string.A '*' in the OSC Address Pattern matches any sequence of zero or more characters.A '?' in the OSC Address Pattern matches any single character.The contents can be either an OSC Message or an OSC Bundle (bundles can contain other bundles). An OSC Bundle Element consists of an int32 indicating the contents size in bytes (must be a multiple of 4) followed by the contents.An OSC bundle consists of the OSC-string "#bundle", followed by an OSC-timetag and zero or more OSC Bundle Elements.Example #2: OSC Address Pattern "/foo" and 5 arguments: an int32 = 1000, an int32 = -1, the string "hello", a float32 = 1.234, and a float32 = 5.678:.Example #1: "/oscillator/4/frequency 440.0" represented by 32-byte message:.

OSC type tags begin with a comma (',') followed by one or more of the characters 'i', 'f', 's', or 'b' that correspond to the data types int32, float32, OSC-string, or OSC-blob.The type tag string specifies the data type(s) for the argument(s) to follow.When an OSC server receives an OSC message, the server invokes a method or procedure specified by the message address pattern.OSC messages can go to more than one destination and "wildcard" symbols such as '?', '*', characters inside '', and comma-delimited lists of strings inside '' can be used to match multiple address strings (see "OSC Pattern Matching" below).OSC addresses follow a URL or directory tree structure, such as /voices/synth1/osc1/modfreq.The address pattern is a string that starts with a '/', followed by a message routing or destination.


An OSC message has the following general format:.The contents of an OSC packet must either be an OSC Message or an OSC Bundle.The size of an OSC packet is always a multiple of 4 bytes (or 32 bits).Anything that receives an OSC packet is referred to as an OSC server.Anything that sends an OSC packet is referred to as an OSC client.The fundamental unit of an OSC transmission is an OSC packet.OSC-blob (32-bit byte count followed by that many bytes and then padded with zeroes so that total length in bytes is a multiple of 4).OSC-string (ascii characters followed by a NULL, then padded with 0-3 NULL characters so that total length in bytes is a multiple of 4).seconds and picoseconds since midnight on 1 January 1900) OSC-timetag (64-bit int representing Internet NTP timestamps.OSC supports the following message argument data types:.a query system to dynamically determine the capabilities of an OSC server and get documentation."bundles" of messages whose affect must occur simultaneously.a pattern-matching language to specify multiple recipients of a single message.OSC uses an open-ended, dynamic, URL-style symbolic naming scheme.That said, OSC packets are most typically sent and received using UDP sockets.Open Sound Control (OSC) is a communication protocol that is independent from any specific transport mechanism.

Up: MUMT 306: Week #9 Previous: The Standard MIDI File Format
