Forums > MaxMSP

Issues with counter in a loop

Jul 25 2010 | 12:59 pm

dear list,

I am having a problem with counter inserted in a loop which I don’t quite understand. It is illustrated with the follwing patch :

— Pasted Max Patch, click to expand. —

I would expect it to read three lines of text and then stop, but instead it is crashing max.

What I don’t understand either is that when debugging the sequence of events, the last outlet of counter keeps reporting a carry count, and counter resets its count to 0 after the first iteration.

Thanks and Regards

Jul 25 2010 | 3:14 pm

Try resetting using the third inlet on [counter] as demonstrated in the patch below.


-- Pasted Max Patch, click to expand. --

Jul 25 2010 | 3:37 pm


there were two posters, whose solutions i regularly lurked: AlexHarker and tim lloyd, now there’s three (+Luke Hall)

Brendan (Lurkio)

Jul 25 2010 | 3:38 pm


in this regard I think the behaviour of the different inlets is confusing. I would have expected that A and B (see patch) would be equivalent (A works, and B produces a stack overflow)

— Pasted Max Patch, click to expand. —


Jul 25 2010 | 7:08 pm

That is really weird. Looks like A and B should work the same. Not sure what I’m missing.

BTW, a HUGE thanks to C74 for starting to intercept stack overflows like this, it’s such an improvement to how it worked in the past… crash!

Jul 25 2010 | 7:09 pm

A well placed deferlow fixes this. I would have expected that a defer would have also fixed it, though, and am vaguely curious why it took a deferlow. Not enough to look into that, mind you, but still vaguely curious.

-- Pasted Max Patch, click to expand. --

Jul 25 2010 | 7:44 pm

I think the slight delay when accessing a [text] may be the issue, I’ve ran into vaguely similar situations in the past. It might not have time to fully output its line before it gets another line command, or… something.

Jul 25 2010 | 8:15 pm

I thought it might be "something," :-)

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > MaxMSP