mathr / blog / #

Pd Tip #1: use [trigger] to order multiple connections from an outlet

From: O'Reilly: Make Your Own Music Software with Pure Data

I've found that when subpatches are copied and pasted in Pd, the order of the connections can change. After copying, I sometimes have to delete patch cords and reattach them.

No, no, no!! The correct way to handle multiple connections where ordering is important is to use the [trigger] object, which can be abbreviated to [t]. Example: [t a a a] will send its input to its three outlets in turn, from right to left. In this instance, "a" stands for "anything", which means [trigger] will not attempt to convert the type of the input (which it can do, see [trigger]'s help patch by right-clicking on a [trigger] object and selecting "help" from the popup menu).

From Pd Documentation 2.3.3. hot and cold inlets and right to left outlet order

Problems can arise when a single outlet is connected (either directly or through arbitrarily long chains of message passing) to different inlets of a single object. In this case it is indeterminate which order the two inlets will receive their messages.

(my emphasis)

Senser - Burn Out

motherboard 6 wires