Hey guys.
I have started playing around with PD and I came up with a problem.
I want to have 8 toggles, but only one can be on at the same time. If I press button on keyboard, previously on toggle turns off and toggle which button is pressed, turns on and keeps it on until next button press.
-
Toggles to disable other toggles
-
kind of radio ....
-
@Gromit said:
kind of radio ....
Is there longer radios? or maybe 3x8 radio matrix?
How to say, which radio must be active with a key press?
Does every radiobutton have its own output? -
sorry, I dont understand your problem
-
@Gromit said:
sorry, I dont understand your problem
I think You just did. This one works just as I need.
Can I also colour those buttons? The one, which is active and has X in it, goes red for example? And can they be made bigger also? -
-
Hi,
I found this patch- And it workds great but why do i always get the error:trigger i: bad type
thanks.
frank -
And it workds great but why do i always get the error: trigger i: bad type
Because "i" is not a data type in pure data (there is no "integer" in Pd). Probably it was a mistake and it was supposed to be "f" (or "float").
Cheers,
Gilberto -
"i" is not a data type in pure data (there is no "integer" in Pd)
Side question. What does this mean exactly? I mean, we have the [int] object and [expr] by default does integer division. Does this just mean that for anything we think is an integer in pd (like "2") is really just a float in disguise ("2.00000000")?
-
Does this just mean that for anything we think is an integer in pd (like "2") is really just a float in disguise ("2.00000000")
Yep, that's exactly correct. [int] is nothing else but an object that discards the decimal content, but still outputs a float. In Max MSP, on the other hand, there is a distinction between float and integer, which is why a lot of people is confused about Pd.
-
In Max MSP, on the other hand, there is a distinction between float and integer, which is why a lot of people is confused about Pd.
Are there any important consequences as a result of this? I mean, is there anything more than the minor inconvenience of not being able to type an "i" inside a [trigger]? What are people getting confused about when moving from Max to pd?
-
Having an "integer" type is "point"less... that's all Tee He (woof!)
David. -
Having an "integer" type is "point"less... that's all Tee He (woof!)
You;re going to have to explain the joke to me, a poor programming noob
-
@rjp9 woof... woof, woof "decimal" point woof!
-
@rjp9 Well, as far as I know it's just something to get used to but there are no drawbacks. Most programming languages indeed differentiate between floats and integers (Python, FORTRAN, C++, to name a few), but in the case of Pd I never found any limitation from it - it actually makes things more simple as there is a single data type for numbers.
People coming from Max (as was my case, I was a Max users for some years before moving to Pd) will see these error messages and that will look cryptic to them. But nothing that a little googling wouldn't solve
Cheers!
-
@whale-av Ah I get it now. But I still don't see what the big deal is. 5 divided by 3 is the same as 5.0000 divided by 3.0000 right?
-
@gsagostinho Ah ok. Thanks for clearing that up!
-
Yes, that's why integers are pointless unless you are playing with Lego, and even then they have "half" bricks.
David. -
Yes, that's why integers are pointless unless you are playing with Lego, and even then they have "half" bricks.
But in other programming languages they do make sense. You really don't want to mess your floating point numbers with integers, and things could get very complicated very easily. Depending on the manipulation you do, you could easily arrive at 2.999999 instead of 3.000000, and for instance when you are counting iterations of a loop that would be totally non-understandable.
-
True, but that is only because computers (without a little help) cannot recognise that 2.99999999 is in all probability 3. However, as it is possible to know the circumference of the universe to within the radius of a Hydrogen atom using PI calculated to "only" 39 decimal places, it is probable that 2.9999999 is not actually 3, and integers have no place in our universe.
Excel does tend to mess up my VAT calculations sometimes though, and that is also true!
It is amazing what fun you can sometimes have with an old post... woof.
David. -
integers have no place in our universe.
Absolutely true, but floats have no place in our concepts I mean, concepts like grouping things together (3 dogs, 5 cats and not 3.000001 dogs and 4.999999 cats), ordering, sequential things, etc. all need integers. And these are fundamental to most programming languages.
It is amazing what fun you can sometimes have with an old post... woof.
Absolutely!