Audio Reactive Video
Within class we covered triggering and synchronizing visuals with sounds. By using the macintosh built in microphone to pick up the sound, we developed a patch that lip synced a video when sound was picked up. By using several object and message possibilities in Max, we picked a video and set the start and end point. This would be the first and last frame. Then the sound coming in would trigger the motion of the video. The sound flicked and changed the frame from the start to the end point, as the sound was coming in.
T (toggle) – A overall on or off switch.
ezadc~ – This is the object name for the microphone interface.
gain~ – The level controller of the microphone.
meter~ – A visual meter that shows the level of the output sound in dB.
scale – Scale maps an input range of float. The ranges can be specified with hi and lo reversed for invert-mapping. If specified, the mapping can also be exponential.
number – Number is a number-box used to display, input, and output integer numbers. By setting the maximum attribute to the last frame in inspector, so that the video can’t go past this point. Also, when audio is off, the number box will display a good number frame range for a start point.
M (message) frame $1, bang –
jit.qt.movie – The jit.qt.movie object provides a full suite of services for QuickTime movies: playback, editing, import, export, effect generation and direct-to-video-output-component streaming.
M – Read cat.mov – Message displays and sends any given message with the capability to handle specified arguments, in this case read/open cat.mov file.
loadbang – loadbang output is triggered automatically when the file is opened, or when the patch is part of another file that is opened.
Jit.pwindow – The jit.pwindow object takes a Jitter matrix and displays the numerical values as a visual image in a window you can place in any patcher.
T (toggle) > ezadc~ >gain~ >meter~ >scale >number >M (message) frame $1, bang >jit.qt.movie >M – Read cat.mov >loadbang >Jit.pwindow.
v Screen shot of final working patch v
Basic Motion Detection.
This patch we developed in class covers the basics of motion detection. By using the built in camera on the macintosh, we triggered sound by creating a patch that read and translated any motion picked up by the webcam. The patch was set up so a certain amount of motion would trigger one of 4 sound effects. As you can see by the patch if the value was more than 0.05 then change. Small amount of movement would trigger the first sound effect, then more motion picked up by the webcam will change the active sound effect.