Motion sensor to control playback
I couldn’t find anything that touched on this subject.
I’m a complete newbie at using Max/MSP, but I have a project that I’d like to realize if it is in fact doable and hope somebody can give me some hints or a helping hand.
There’s two steps to it. First off I’d like to use a webcam as a motion sensor that’ll in turn work as a trigger for playback. I have a specific soundfile that I only want played every 20secs when there’s noone in the room – i.e. when the webcam doesn’t detect any movement. What would this entail?
Next thing is, I guess, a lot simpler: I want to set up another soundfile to be looped infinitely. So I guess a straight forward looper function?
In case it makes any difference then I’m using OSX.
Thanks a lot!
> I couldn’t find anything that touched on this subject.
Sure, there’s probably not your exact project in the forums, tutorials etc. But the individual elements of it (webcam input, motion detection, sound playback, etc) are very basic functionalities and operations. Look for those in the tutorials, help patches and the forum and you’ll be able to piece your project together.
Yeah, I know it's probably fairly simple functionalities. And so far I've been able to work out how to set up the infinite looping of a single file, and detecting the webcam (although following the tutorial was useless as somehow the vdevlist wasn't understood by the umenu?) and then tried following the jitter recipe 32 for setting up some motion detecting. That's where the trail seems to run cold for me; I can't find any information on how to stop playback when motion is detected and resume playback in intervals once that's not the case any more.
As far as I've been able to gather it's kind of a simpler version of the Video Trigger patch made by a guy named Zach Poff (http://www.cycling74.com/forums/topic.php?id=17805), but inversed. But figuring out how that's working has been fruitless.
Basically the .png shows what I've been able to get to, but that's the extend of it.
Hope someone will be able to provide some advice or a pointer in the right direction.