[Pd] Stack Overflow

Chuckk Hubbard badmuthahubbard at gmail.com
Sun Mar 26 10:28:50 CEST 2006


Instead of changing the recursion inside my "next" abstraction, I
changed the fact that its output of the requested scalar was what
triggered the search for the next one... an external [until] object
now triggers it to find each scalar.  A bang message is sent to the
"next" object first, to avoid an empty pointer error, and then until
sends the "next" message.  The bang from the pointer at the end of the
list turns it off.
The recursion inside the "next" abstraction is only ever as deep as
the number of scalars before the next requested scalar, which
apparently isn't enough to cause an error for most things.

But I don't understand why the attached patch doesn't work.  Using my
recursive patch, I get no "empty pointer" errors, no matter what I do
in the program, from the abstraction.  However, this [until] version
freezes my system, and the only way that would seem to be possible is
if a "next" message were sent without a "bang" message having been
sent first.


> Actually, playback works fine; it is when the patch steps through the
> score all at once, to transpose all notes, that I run into overflow
> errors.  I'll try deleting all the beat lines and see if it works that
> way, and if so then your solution might work.
>
> -Chuckk
>
-------------- next part --------------
#N canvas 342 169 688 653 12;
#X obj 108 41 inlet;
#X obj 77 339 outlet;
#X msg 108 185 next;
#X obj 108 76 route bang next;
#X obj 183 340 outlet;
#X obj 108 233 pointer \$1;
#X obj 108 153 until;
#X obj 77 284 t p b;
#X msg 164 175 traverse pd-score;
#X obj 108 109 t b b;
#X obj 183 286 t b b;
#X connect 0 0 3 0;
#X connect 2 0 5 0;
#X connect 3 0 9 0;
#X connect 3 1 6 0;
#X connect 5 0 7 0;
#X connect 5 2 10 0;
#X connect 6 0 2 0;
#X connect 7 0 1 0;
#X connect 7 1 6 1;
#X connect 8 0 5 0;
#X connect 9 0 6 0;
#X connect 9 1 8 0;
#X connect 10 0 4 0;
#X connect 10 1 6 1;


More information about the Pd-list mailing list