[PD] trouble with data structures

Chuckk Hubbard badmuthahubbard at gmail.com
Wed Jun 7 06:03:47 CEST 2006


If your score gets too long, though, and you have too many of one
before the other, you can get overflows from this.  Because the action
of checking each scalar is a result of the output of the previous
scalar, one "next" message can start an indefinitely long string of
messages.
I find using a 0 ms delay to work for this; the next string is started
as a new command, or at least that's how it seems.  Anyway, it works
as in the attached patch.

This might not be an issue for you, if you are talking about two
separate structures that exist for each note, IF you sort the score
each time, because then there is never more than a couple of one
before the next instance of the other.  But if you start adding
anything else to your score, like tempo markers, bar lines, or any
sort of automation, you might run into this.

-Chuckk

On 6/5/06, Frank Barknecht <fbar at footils.org> wrote:
> Hallo,
> Frank Barknecht hat gesagt: // Frank Barknecht wrote:
> > You forgot to attach the patch, but I guess what's happening is some
> > error in traversing the data structures in the patch.
>
> Okay, I've seen your patch now and indeed what's happeing is what I've
> suspected. One additional note: If you use [pointer] with one or more
> type arguments as suggested, you'l probably want to make sure to skip
> unwanted types and autoamtically advance the traversal with a "next"
> message. You can do this as in attached patch.
>
> Ciao
> --
>  Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 125 52 459 402 12;
#X obj 29 30 inlet;
#X obj 134 274 outlet;
#X msg 121 146 next;
#X msg 165 119 traverse pd-score \, next;
#X obj 108 75 route bang next;
#X obj 294 274 outlet;
#X obj 165 145 pointer \$1;
#X obj 202 213 del 0;
#X obj 202 179 b;
#X msg 99 25 bang;
#X msg 165 26 next;
#X connect 0 0 4 0;
#X connect 2 0 6 0;
#X connect 3 0 6 0;
#X connect 4 0 3 0;
#X connect 4 1 2 0;
#X connect 6 0 1 0;
#X connect 6 1 8 0;
#X connect 6 2 5 0;
#X connect 7 0 2 0;
#X connect 8 0 7 0;
#X connect 9 0 4 0;
#X connect 10 0 4 0;


More information about the Pd-list mailing list