Adam Rokhsar’s Max frame subtraction example

Uses video frame subtraction in jitter to control playback of audio clip.


folder: frame-subtraction

patch: frameSubtraction_example.maxpat

You will also need an audio file: aiff, wav, etc., to load into a Max buffer.


You will also need the cv.jit library (computer vision):

Add the location of these files to your path in Max using Options | File Preferences.

Note: When I loaded the patch in Mac OS 10.8 – the computer automatically downloaded and installed Java updates.


  • Load an audio file for playback
  • Try setting minimum summed pixels to 150,000 or less for greater effect – depending on amount of light in the room