...that deal with pure data
You are not logged in.
The [& 255] is really just the same as [mod 256].
The & is often faster than mod or % in many programming languages, though not in pd. It's just some kind of habit in this case. Except that if you use the GridFlow external, then doing [# &] on many values in one message can be a lot faster than [# %] or [# rem]. It's because & is an integer-only operation, and pd is a float-only language (except in GridFlow).
I've been using [f]x[+ 1] counters for a long time, and occasionally [+]x[t] counters, but in both cases, if there is not a reset using a [mod]-like object or [sel] or [moses] or other, then it gets stuck when it gets at 16777216.
Another topic related to Challenge #1 is my trick for making a stereo oscillator with exponential decay, from a single [cpole~] and no signal input. Well, it's not really mine, but I've never seen it as a pd patch before I did it.
I already posted something like it in the «fewest objects» thread, but it was as a [fexpr~] single-object-does-everything kind of patch. Now try to do it with [cpole~], [dac~] as the only signal-objects.
is there a write-up somewhere of how [cpole~] works? that would be handy, as it's not exactly the most intuitive thing to come to grips with.
here's a little delay/feedback thing (thanks to focalt for triggering that idea with his midi looper questions)
[cpole~] works the way it's written in its help file, but if you want a totally different explanation of it, let's say that its outlets represent x,y of a moving point in 2 dimensions, the first two inlets (let's call them a,b) represent a motion, and the other two inlets represent a transformation... let's call them u and v.
The x,y get rotated and scaled by computing xu-vy and xv+uy. This causes a rotation by atan2(v,u) and a scaling by sqrt(uČ+vČ). Then a,b are added, to move the dot (plain translation), and that becomes the new x,y and the new output.
So, it's the same idea as [rpole~], but using complex numbers, which introduces a 2nd dimension to each signal, and a rotation concept.
someone one day will explain it to me in a simpler way, i'm sure.
i need something more in the form of: "Jenny has 3 cakes, and Margie has 4 cakes. Together they have 7 cakes"
the bits i can maybe makes sense of are:
sqrt(uČ+vČ) : this seems like an equation to find the side length of a triangle if the other 2 sides are known.
i hated trigonometry, and didn't pay too much attention, but with this bit:
atan2(v,u) , i'm kind of guessing that u and v are also along the x and y axes ?
in that case, there is a right angle, and some dim memory tells me that i can use that to find the other angles if i know 2 side length or a side length and an opposite angle or whatever. Sorry, i should have paid more attention in trig classes.
...actually now it is coming back a bit.
i don't understand the difference between a motion and a translation though.
Well, «motion» is more vague... I mean the kind of motion that is done by just adding, and this is translation.
Yes, (u,v) are in the same plane as (x,y) and (a,b).
The right angle idea you found is because the y axis is at a right angle with the x axis. It'd take a longer explanation to show it all, but in short, the meaning of xu-vy and xv+uy involves several right angles.
The formulas for the amounts of rotation and scaling are actually a reversal of :
u = scaling*cos(rotation)
v = scaling*sin(rotation)
You can indeed see u and v as sides of a right triangle for which you are figuring out the long side.
I don't know Jenny and Margie, but I bet that they aren't in grade 11. I like explaining things simply, but there are limits to what is possible to explain simply, in a few minutes, in a little box, in a foreign language, to a stranger. ;)
1 - Awesome stuff (all of them)
2 - I still have a lot of Pd to learn...
that's a great one! very interesting to try tweaking the sliders to make long sequences.
anyone got any ideas for challenge number 2? we'll probably launch it early next year, but it'd be good to get some ideas in.
great. Now someone please suggest a new challenge.
ha ha , that's awesome. +1 vote from me on that.