On 09/23/2013 07:55 PM, Mario Mey wrote:
Thanks for answering!
Who is the OP?
The Original Poster. :)
-Jonathan
Me? Well, if it is me... yes, I would like to have NULL as init value. But, I understand that [change] must work like it works right now. It's OK.
I use "I go bananas" patch to make it work (with [+ 1]). Then, I read Jonathan's reply... that has the same fix (with [* -1]).
Thanks everyone.
El 23/09/13 15:45, Jonathan Wilkes escribió:
From: Alexandre Torres Porres porres@gmail.com To: Mario Mey mariomey@gmail.com Cc: pd-list pd-list@iem.at Sent: Monday, September 23, 2013 12:13 PM Subject: Re: [PD] [change] bug?
that's the way it works alright.
Yes. It's helpful to know that in Pure Data, an object that takes an optional float argument typically sets the value to zero if the user doesn't provide an argument.
It's not a requirement: an external author can set the default value to anything they want. It's just that doing that requires extra work (i.e., manually checking the arguments), whereas defaulting to zero happens automatically.
Anyway, I think the OP might want [change] to default to NULL-- that is, let the next incoming value pass no matter what because there isn't a previous value yet.
That could be handy.You can make your own version of that by first sending a copy of the incoming value through a spigot:
[spigot 1] | [* -1] | [set $1( | [change]
Then set the right inlet of [spigot] to zero and send the incoming value to your [change] object, and it will be guaranteed to pass.
-Jonathan
If your first value sent to it is zero, just initialize it with some other value as the argument cheers
2013/9/23 Mario Mey mariomey@gmail.com If i create [change] and send it a [0(, it outputs nothing. It seems like it has already the 0 value initiated.
I think [change] should not work like this...
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list