[PD] Patchmatrix Execution Order Issues

Luke Iannini (pd) lukexipd at gmail.com
Wed Jan 17 12:44:50 CET 2007

OK, this is about the 16th hour (2 nights now) I've spent attempting
to debug this, so I'm capitulating and asking for help : ).

There was a discussion of a signal patchmatrix a while back.  I'm
attempting to make a message-based version of the same thing.

Attached is a version completely stripped of all but the essentials,
to demonstrate the issue hopefully as clearly as possible:
I'm using IEMMatrix to store the patchbay configuration.  In the
example, there are 3 inputs and 3 outputs.  The "patmatel" object is
simply to set matrix elements to 1 or 0.

When an input comes in a particular inlet, say inlet 1, column 1 is
retrieved from the matrix.  The contents of column 1 enable or disable
the 3 outlets.  E.g., if inlet 1 is meant to go to outlets Y and Z
(but not X), column 1 would contain 0 1 1.

Next, inlet 1's actual value is sent to the 3 spigots, which either
allow it through or block it.

This will of course all be clearer if you are viewing the patch.
Assuming you are now:  in column 1 of the patchmatrix on the upper
left, enable outputs 2(Y) and 3(Z) (such that the matrix looks like
0 0 0
1 0 0
1 0 0

Now, in the top right, send "10101" to input A (this is an arbitrary
value for demonstration).  Over on the right, you'll see that it
reaches output Z but not output Y.  This (as it is easier to determine
now - my actual configuration is a 9inx17out matrix that connects most
of my library of patches, hence the 16 hours of debugging) is because:
 output Z feeds back to input C, thus retrieving column 3 of the
patchmatrix, which is set to send to no outlets at all (0 0 0).
Apparently, by the time "10101" reaches output Y's spigot, it has
already closed.

If anyone is still following... how can I make this work?  I guess I
need to delay the inputs from arriving until the outlets are finished
transmitting, but I'm a bit lost as to how to do that elegantly.

An [mtx_spigot] object would be great for this type of thing : ).  I
have it on my list to attempt an abstraction of such an object.
[mtx_mul~] works just like I'd want the message-based version to.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WhatIsThisBare.pd
Type: application/octet-stream
Size: 1933 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070117/3fbe08c4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WhatIsThisCommented.pd
Type: application/octet-stream
Size: 2421 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070117/3fbe08c4/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WhatIsThisDebug.pd
Type: application/octet-stream
Size: 2520 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070117/3fbe08c4/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sft.patmatel.pd
Type: application/octet-stream
Size: 955 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070117/3fbe08c4/attachment-0003.obj>

More information about the Pd-list mailing list