home/ atoms/ osc-type-tag-string

Every OSC message carries a type tag string that encodes the data type of each argument

An OSC message is composed of: (1) the address pattern string, (2) a type tag string starting with a comma, then one character per argument, and (3) the argument data. Type tags include: i (int32), h (int64), f (float32), d (float64), s (string), b (blob), T/F (true/false booleans), r (RGBA colour), m (MIDI). All fields are padded to multiples of 4 bytes. The receiver uses the type tag string to know how to parse each argument in the binary datagram. A common error when building custom OSC clients is type mismatch — for instance, TouchOSC sends all numeric values as float by default, which can break handlers expecting int arguments. AbletonOSC’s clip handler works around this with explicit int() casts.

Examples

A message /live/song/set/tempo 128.0 has type tag ‘,f’ (one float). The builder maps Python types to tags via constants such as ARG_TYPE_FLOAT=‘f’, ARG_TYPE_INT=‘i’, ARG_TYPE_STRING=’s’. A message /live/clip/add/notes 0 0 60 0.0 0.5 100 0 has mixed integer and float type tags.

Assessment

A custom OSC client sends track_index as a float (type tag ‘f’) but AbletonOSC expects an int. What happens, and why? Name three OSC type tag characters and their types.

“ARG_TYPE_FLOAT = "f" ARG_TYPE_DOUBLE = "d" ARG_TYPE_INT = "i"”
corpus · abletonosc-osc-control-interface-for-ableton-live-live-objec · chunk 47