[ANSWERED] How To Make Closed Loops Work
All I want is for a pulse generator to stop after a given number of pulses, but this is proving difficult.
I have a pulse generator hooked up to a gate. that in turn goes to a counter and a comparator, which then triggers back to a toggle which is hooked up to the gate.
However; no matter how I set up my comparator, the pulse continues going through forever.
I've tried "equals=true", "Greater than=false", "less than=true" but no matter what I do the toggle never changes the gate.
I have 6 other gates in the patch which all work fine so I don't really understand what is going on here. It just doesn't seem to want to play.
any troubleshooting advice?
another weird behaviour;
when I just recreated this small section of the patch the pulse generator immediately stops working if the comparator is connected to the gate, whether the trigger has been fired or not.
if I add second counter after th gate it works just fine, and the toggle works as expected, but this does point to a worrying situation.
If upstream actors effect actors which are earlier in the logic path, then that makes troubleshooting a LOT more difficult.
Isadora prevents that you can generate a closed loop. You can get around this by using a "broadcaster" actor at the output side and a "listener" actor at the input side.
As Michel said, it's to do with Isadora detecting a closed loop and locking those actors to prevent an infinite loop. I prefer not to use Broadcasters and Listeners for this because there can be a channel number conflict if you copy some work from one file into another. I usually fool the closed loop detection by adding another actor that goes outside the loop (to make it not be detected as a closed loop), as I did in the Total # of Scenes User Actor.
You'll see in the MIDI Cycler I built for you that there's also a seemingly-superfluous Trigger Value actor coming off the Comparator actor (top right), but I should have labelled that one with the same info about infinite loops for you.
None of this explains the original problem though... just my failed attempt to sandbox and troubleshoot it.
any thoughts on why the comparator wasn't triggering the the toggle for the gate in the original patch?
Could you share your original patch, it is not in the post.
jfg last edited by jfg
Do I understand correctly that when the scene starts, the pulses should not pass after the given number (in your patch 20)?
I think the toggle actor is causing the confusion. Try this:
If you want this to work several times within a scene you have to do a form of reset of the counter actor and a trigger for the new start.
OK, i fixed the problem, but it wasn't what we thought. It turns out that the counter actor cannot keep up with high frequency pulses.
when I slow the pulse generator down it works perfectly. so it's just about fine tuning where it breaks down.
It's currently working ok at 60z but ideally it would be working faster, as I could be plausibly sending 56 signals which would take nearly a second, but I know that 120hz is too fast for the counter to function properly.
I'll do some tuning and see where I end up.
jfg last edited by
To better see what was happening I had reduced the frequency but after that I always tested at 120Hz without a single problem.
for me it falls apart as soon as it goes faster than 60hz, i have no idea why, but I've reorganised how everything is triggering so that 60hz is good enough.
I think I'm past tinkering with this now.
Thanks for your help though.
I'm not sure, if this could be in relation. But is it possible, that the 'General service task' is responsible for this issues? If the 'Target Frame Rate' is at 50fps and the GST at 1, the actors only refresh every single frame, which would be at 50hz. Therefore the GST would need to be at 3x at least, to work with 120hz repetitions. Is it working this way, or am I wrong about it?
jfg last edited by
I have changed both factors, it changes the velocity but it is working.