People's movement controlling the volume of a sound

roba.mostafa's picture

Hi All, I am designer new to QC trying to figure out ways to make interesting interactive projects.

Currently I am trying to make a sound react to people's motion in the environment, through macbook's built-in camera. Meaning that, If there is motion, there is sound, and if there is no motion the volume is gradually decreased until zero.

Also, a step further I want to control the volume through people's proximity from the camera...

I would really appreciate a detailed help, as I am beginner and not into coding.

Through research, I knew that I could use difference blend mode for motion detection but I didn't know how, so this is it so far...


cybero's picture
Re: People's movement controlling the volume of a sound

I might be wrong but I think you are going about this entirely the wrong way. Maybe try this which is based upon an example that was uploaded earlier in the now fast dwindling history of mankind by a man called dust [lower case only, please]. I have then strapped in that darned example drum kit but just simplified matters so that you have the essential XML for the hand detection, a sound file that triggers because the OpenCV [Kineme OpenCV Tools] image can be analysed and lo and behold motion detected, a structure created and that structure read, fed through a range min max and then that reliable range of occasionally happening values causes that drum sound file to play once. Not exactly what you were looking for but a place to start and bespoke what you really want. Happy Easter to you and all those souls that drift on bye.

[After thoughts - you could be looking for a Core Image related routine - this might be of interest then ---]

roba.mostafa's picture
Re: People's movement controlling the volume of a sound

THANK YOU SO MUCH IT WORKED! I continued developing from there! For some reason, dust's composition never worked with me, although it worked with other people.

happy easter to you too :)