Why the left print never updates in this example, always showing 10 20, the creation arguments?
-
Variables $1, $2 inside abstraction
-
The [f $2] objects are independent. They are initialized the same but they update separately. You will have to connect the right inlet to the left [f $2]'s cold inlet.
Also [t f b] instead of [t b b].
hjh
-
Oh, perfect, my mistake: I thought that every object with a $1 would be instantaneously updated with the value that comes from the first inlet, objects with $2 with the values from the second inlet and so on, even if isolated. And the [t f b] also makes sense, since it's like the number information is lost, transformed into a bang, leaving the creation argument $1 immovable.
-
@Cmaj7 This should work:
And yes, dollar sign arguments are more like placeholders than actual variables. They get initialized when the patch is loaded and from there on are simply floats or symbols.
-
@ingox Nice, that solves an issue of the previous solution. The $1 was being initialized as 0.
-
regardless the syntax and the way how pd uses $ signs... i would always use independent objects in different places for different jobs - for readability.
for example "default value", "argument to patcher" and "current value" in an abstraction could look like this:
and you´d do that before doing anything else to the parameter value in question (i.e. your pack above or whatever)
now whenever you create an abstraction you will do that thing for every parameter - and it will replicate perfectly the behaviour of compiled externals.
-
oh, btw.
about the original question/patch: you simply forgot to loadbang your $ arguments, that´s all.
-
This post is deleted!
-
@Obineg Hi, I don't get how a loadbang would solve the issue in the original patch, even with the [t b b]. Where would it be connected?
-
seems i did not fully read your question.
in your original patch there seem to be 2 errors:
-
the t b b will not let the "6" pass through, but instead convert it to bang. you might want to use t i i.
-
without loadbang the argument will be executed inside the f object, but not sent out.
you might soon run into a third problem, which is that numbers in the 2nd input of the abstraction will not execute the list, because pack´s 2nd inlet is cold.
-