On 3/17/21 9:39 AM, adam johnson wrote:
Sometimes when using trigger I find myself needing to break out of it
before it completes, simple to work up an abstraction to handle this,
but it got me to wondering why trigger does not have a right inlet to
stop the sequence. Looking at the code, trigger is a for loop as
expected, so it would seem to be a very simple task to add this right
inlet to allow breaking out of the sequence, is there a reason trigger
lacks this? Something so simple and obvious never having been done
suggests I am missing something, is this not as useful as it seems? Am
I missing something about dataflow?

i think so.

[trigger] is not a loop¹.
it's a device to guarantee order-of-execution.
there are other devices to stop dataflow (e.g. [spigot]), and devices to create stoppable loops ([until]), if that is really what you need.

it's hard to say so without an actual example.



fgdmst
IOhannes


¹ as you figured by looking at the code, it is implemented (in C) using a for-loop. but that doesn't make it a loop. if you look deeper, you might find the for-loop translates to CMP and JMP instructions. that doesn't make [trigger] much of a comparator or a a jumper.


_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to