Hello,
I have a patch window where two data structure templates appear, f-teil
and set-tick (one to indicate some durations, and another with a grid for
seconds). I was using [get f-teil ....] to get parameters from f-teil, but
I noticed that it gets values from ALL data structure objects in the
window, including the ones from the set-tick template. It's weird, because
both templates have very different floats (1st has ~6, other only 3, all
names are different), but [get f-teil ...] always returns (very small)
values for the structures of the set-tick template that it queries.
I thought that [get f-teil ...] would only return values from the f-teil
structures. Or is it normal that it gets values from the whole window? Is
it possible to have several templates in one window, and query different
structures of the same template?
by the way, on ubuntu pd crashes each time that a patch involved with data
strucures is closed (provided that more than one patch with data-s is
open), or sometimes when a patch window is closed. Pd version
0.39-2extended-test3, ubuntu 5.10. Funny, that doesn't happen on windows
xp with the same pd version.
Joao
Hallo, João Miguel Pais hat gesagt: // João Miguel Pais wrote:
I have a patch window where two data structure templates appear, f-teil
and set-tick (one to indicate some durations, and another with a grid for
seconds). I was using [get f-teil ....] to get parameters from f-teil, but
I noticed that it gets values from ALL data structure objects in the
window, including the ones from the set-tick template.
I think, you may have found a bug, an example patch would be nice. Generally [get something ...] should only get values from a "something"-pointer. You can make sure to only send "something"-pointers to this [get something ...] by using [pointer something] instead of a plain [pointer].
Frank Barknecht _ ______footils.org_ __goto10.org__
I have a patch window where two data structure templates appear, f-teil and set-tick (one to indicate some durations, and another with a grid
for seconds). I was using [get f-teil ....] to get parameters from f-teil,
but I noticed that it gets values from ALL data structure objects in the window, including the ones from the set-tick template.I think, you may have found a bug, an example patch would be nice. Generally [get something ...] should only get values from a "something"-pointer. You can make sure to only send "something"-pointers to this [get something ...] by using [pointer something] instead of a plain [pointer].
maybe it's not a bug. I was trying to avoid putting the patch because it's
quite underdeveloped and would maybe take a lot of time to explain (and
need too many extra files).
here it is, I've put some explanations which should be enough. you might
need also my abstractions (https://puredata.org/Members/jmmmp/). the
offending subpatch is player-form.
Joao
Hallo, João Miguel Pais hat gesagt: // João Miguel Pais wrote:
maybe it's not a bug. I was trying to avoid putting the patch because it's
quite underdeveloped and would maybe take a lot of time to explain (and
need too many extra files). here it is, I've put some explanations which should be enough. you might
need also my abstractions (https://puredata.org/Members/jmmmp/). the
offending subpatch is player-form.
Hm, yes it's strange: I deleted all f-teil objects and still I get output from [get f-teil ...]. However if you replace the pointer before that with [pointer f-teil] there is no false output anymore.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hm, yes it's strange: I deleted all f-teil objects and still I get output from [get f-teil ...]. However if you replace the pointer before that with [pointer f-teil] there is no false output anymore.
hmm, not exactly. if in the window all even structs are f-teil, and the
uneven sek-tick, I will only get the even ones. but I must click through
the uneven ones anyway, just no output will come out (is this clear?).
this happens when either the previous or both pointers have the f-teil
argument.
Of course I can put a loop that stops banging [get] only when it gets
output. it's a workaround, but not the good sollution.
Hallo, João Miguel Pais hat gesagt: // João Miguel Pais wrote:
hmm, not exactly. if in the window all even structs are f-teil, and the
uneven sek-tick, I will only get the even ones. but I must click through
the uneven ones anyway, just no output will come out (is this clear?).
this happens when either the previous or both pointers have the f-teil
argument.
You may find attached traversal abstraction useful. They will traverse on a next message through only the pointers specified by the first argument. So if you use an [until] to bang the [next( message for X times, you will land at the Xth pointer of the wanted type. Pointers of different type are automatically skipped.
Frank Barknecht _ ______footils.org_ __goto10.org__
thanks, that is useful. but in the long term the best sollution should be
that the the objects do that themselves, right? I guess it would make
sense a kind of identifier integrated in the object which would do this
work automatically.
You may find attached traversal abstraction useful. They will traverse on a next message through only the pointers specified by the first argument. So if you use an [until] to bang the [next( message for X times, you will land at the Xth pointer of the wanted type. Pointers of different type are automatically skipped.
Ciao
You may find attached traversal abstraction useful. They will traverse on a next message through only the pointers specified by the first argument. So if you use an [until] to bang the [next( message for X times, you will land at the Xth pointer of the wanted type. Pointers of different type are automatically skipped.
it works. one question, do you really need the del? I like to use
GKarman's idea to get an individual structure asap, triggering the patch
with until x. when the del is there the values get messed up (to get
struct 3 I must input 5, usw.)
here's the implementation I did, which is the same as GKarman's: with an
aditional pointer you get only the struct you're after, without having to
go through all before. I removed the del from ds-traverse, and saved it as
ds-traversea.pd.
Joao
Hallo, João Miguel Pais hat gesagt: // João Miguel Pais wrote:
it works. one question, do you really need the del?
The del is there to avoid stack overflows if you have *a lot* of pointers that don't match the desired type. You could of course delete it, if you don't expect to get so many wrong pointers.
Frank Barknecht _ ______footils.org_ __goto10.org__