Hi Frank, hi guys,
Many, many thanks for your explanation and your example ! I've finally understood how to use [trigger] objects and store value in a [float] (I have to admit I needed quite a lot of time, a paper and a pen: I must be very slow "thinking in Pd" :)). Indeed, a nice exercise.
I have one question though (not related to [trigger]). In your example, as in Martin's, you use $0-a16 to name the array. I understand $0 is used when building an abstraction and creating multiple instances of this abstraction. My question is how can I configure this array, from the parent (from the patch using the abstraction) ? For instance, I'd like to add "xticks", "ylabel", etc... I usually use a message, like: _________________ [array1 ylabel -1 0 1 (
but the same with $0-a16 obsviously doesn't work, since $0 is not known (I understand it's a counter incremented at each creation). Is this possible to do this ?
Cheers, Seb
Hallo,
Sebastien Lelong hat gesagt: // Sebastien Lelong wrote:
Thanks for your help. I'm getting things that "kind of" scroll...
building
an horrible patch :) Some values are random, I guess I have a problem
when
access extremities of the array. I'm sure there's something simpler, probably using trigger, but I can't figure out how I could use a trigger here. Could you give one last hint ? I guess I need to learn how to
"think"
pure data...
Indeed: Understanding triggering and execution order brings you much closer to "thinking in Pd". There are only two things to remember: The left inlet of (most) objects is hot, the right is cold and lets you use an object as a storage container.
OTOH the right outlet of (most) objects fires before the left one. This holds especially true for the [trigger] object whose main purpose is to control the order in that your patch cords get activated.
Both facts are nicely combined in the scrolling table solution in the attached patch. The top [trigger] object shows how sometimes in Pd you have to think far ahead: Its right outlet stores a number in a float object below that gets used much later.
The lower trigger object (abbreviated as [t ...]) shows another common idiom: It's followed by crossed patch cords. You will often see this when something is stored for a moment and the previously stored value is used instead.
Anyway the attachement shouldn't be to hard to folllow with its comments, but feel free to ask any questions. "Getting it" is important here. :)
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list