[win32 pd0.35-17]
when i calc with object "+" (like 54 + 10 i get 64) but when i calc with object "-" (like 54 - 10 i get -44)
so the calc is OK, but it puts a "minus"(-) in front of the number ?!?!? if this a feature; how can i "take" that minus away ???
thnx -andre
Andre Schmidt wrote:
[win32 pd0.35-17]
ok. hit me if i am very wrong, but i guess this is not related to the pd-release.... (my assumptions sounds arrogant to me, though)
when i calc with object "+" (like 54 + 10 i get 64) but when i calc with object "-" (like 54 - 10 i get -44)
well, this looks to me, like you were not calculating "54-10" but "10-54". The order does not matter when adding (a+b=b+a), but it does matter when subtracting (a-b != b-a) How does your patch look ?
The following calculates 44 for me::
=--- =---
|54( |10(
=--- =---
| |
=------=
| - |
=-------
|
=-----
|44 |
=-------
so the calc is OK, but it puts a "minus"(-) in front of the number ?!?! if this a feature; how can i "take" that minus away ???
eg by multiplying with "-1" or by reversing the order....
thnx
-andre
uuuups, (how stupid from me) yep, i calculated wrong way :)
but i wanted to subtract x from y (x = dynamic, y = static) so i had to bang y every time x changes to get result... or (what i now use, THNX) just multiply with -1 (so i dont need to bang y)
-andre
----- Original Message ----- From: "IOhannes m zmoelnig" zmoelnig@iem.kug.ac.at To: "Andre Schmidt" andre@vju.info Cc: "PD-LiST" pd-list@iem.kug.ac.at Sent: Monday, April 15, 2002 4:09 PM Subject: Re: [PD] minus; bug or feature?
Andre Schmidt wrote:
[win32 pd0.35-17]
ok. hit me if i am very wrong, but i guess this is not related to the pd-release.... (my assumptions sounds arrogant to me, though)
when i calc with object "+" (like 54 + 10 i get 64) but when i calc with object "-" (like 54 - 10 i get -44)
well, this looks to me, like you were not calculating "54-10" but "10-54". The order does not matter when adding (a+b=b+a), but it does matter when subtracting (a-b != b-a) How does your patch look ?
The following calculates 44 for me:: =--- =--- |54( |10( =--- =--- | | =------= | - | =------- | =-----
|44 | =-------so the calc is OK, but it puts a "minus"(-) in front of the number ?!?! if this a feature; how can i "take" that minus away ???
eg by multiplying with "-1" or by reversing the order....
thnx
-andre
Andre Schmidt hat gesagt: // Andre Schmidt wrote:
uuuups, (how stupid from me) yep, i calculated wrong way :)
but i wanted to subtract x from y (x = dynamic, y = static) so i had to bang y every time x changes to get result... or (what i now use, THNX) just multiply with -1 (so i dont need to bang y)
A common idiom for this in PD is to use a [t b f] object like in the attached patch on the left. But beware of the common mistake using triggers as illustrated on the right.
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\
Andre Schmidt hat gesagt: // Andre Schmidt wrote:
when i calc with object "+" (like 54 + 10 i get 64) but when i calc with object "-" (like 54 - 10 i get -44)
so the calc is OK, but it puts a "minus"(-) in front of the number ?!?!? if this a feature; how can i "take" that minus away ???
On Linux, that one works correct. ciao,