Hi David~
Smoothing control signals can be done by using a line object.
[inlet jittery_signal] | [pack f 100] (100 ms linear smoother) | [line] | [outlet smooth_signal]
You can also easily experiment with different forms of interpolation if you scale your control range over the interval [0, 1]. A quartic interpolation would simply be like this:
[inlet scaled_line] | [expr pow($f1, 4)] | [outlet quartic_envelope]
For averaging, I believe that .hc has made some nice ones for his HID library that would suit your purposes. Or, you could use a list of however many "control samples" you'd want to average, and then operate on them with fbar's list-abs. Or, you could do something like this with iemmatrix too. There are even some control rate objects like lowpass filters and such. There's a ton of possibilities!
~Kyle
On 10/6/06, David Powers cyborgk@gmail.com wrote:
Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
I also wonder, how the hell I would set it up for a real performance - Experimental music concerts here tend to be in small alternative sorts of venues, with not much space.
~David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list