Hallo, Luke Iannini (pd) hat gesagt: // Luke Iannini (pd) wrote:
Now, the issue I was having crops up when routing the result of a single inlet "matrixed" to multiple outlets back into an inlet. I think it occurs in your copy as well: the first outlet to recieve the input (let's say it was "10101" again) transmits it to the top of the chain, and before your list drip has completed, a new input/row is received that overrides the first (also replacing the contents of the list append at the bottom).
I have attached a modified copy of your patch demonstrating this. Most mods are in the lower left; use my element definitions to see the issue in action. If you disconnect the "loopback" sends (outputs Y&Z
inputs B&C in the lower left) it works fine, but when they are
connected only one output makes it out.
Okay, this is indeed true and it has to do with Pd's "depth first" message passing: Pd tries to walk along a message path until this path ends. E.g. if you have a [t b b] then first everything connected to the right outlet will be worked out completely before the bang from the left outlet of the trigger will fire.
With your loopback setup, walking along will work fine for the outletY-route at first, but as soon as inletB fires, the counter after the matrix in [pd count] will be reset to start at 0 again and the [list] storing the 10101 will be overwritten by what's coming in through inletB (in this case, a 10101 will come in again, but that's just luck, it could be something different). So a lot of stuff will be invalidated by the looped back message.
The solution is to defer the looped back messages until every direct message has finished operations. You can do this easily with [pipe] objects between the [r outlet?] and [s inlet?] objects. [pipe] (and [del] will delay messages for one logical step even, if the delay time is 0. They kind of insert a temporary end point to the depth first message operations.
As a bonus I attached a little GUI abstraction to edit 0/1 matrices of arbitrary size. This might be useful for your patch. It expects Pd at least 0.40 to look nice. It also seems to trigger a bug in Pd and makes the red GOP rectangle appear on the parent somehow.
Frank Barknecht _ ______footils.org_ __goto10.org__