home/ atoms/ osc-bundle-atomic-dispatch

An OSC bundle groups multiple messages with a shared timetag so they are dispatched atomically at the same time

An OSC bundle begins with the marker #bundle followed by a timetag (an NTP timestamp) and a sequence of size-prefixed elements, each of which may be a message or a nested bundle. When the receiver’s time matches the timetag, all messages in the bundle are dispatched simultaneously. The special timetag value of 1 (64-bit, all zeros except the lowest bit) means ‘immediately.’ AbletonOSC’s client.py send_bundle() wraps a list of (address, params) pairs into a bundle with a current-time timetag, so a set of Live parameters change atomically in the same processing cycle rather than arriving as separate UDP datagrams that could be handled across different ticks.

Examples

Python: bundle_builder = OscBundleBuilder(IMMEDIATELY); add each OscMessage; bundle = bundle_builder.build(); client.send(bundle). AbletonOSC client.py: client.send_bundle([(‘/live/track/set/volume’, (0, 0.8)), (‘/live/track/set/mute’, (1, 0))]).

Assessment

Why would you use an OSC bundle rather than two separate OSC messages to simultaneously set two track volumes? What is the special timetag value meaning ‘dispatch immediately’?

“"""Bundles elements that should be triggered at the same time. An element can be another OscBundle or an OscMessage. """”
corpus · abletonosc-osc-control-interface-for-ableton-live-live-objec · chunk 44