This page documents my work and experiments done during the "Max and I, Max and Me" course. Feel free to copy, but give attribution where appropriate.
other peoples work to investigate
- F.Z._Aygüler AN EYE TRACKING EXPERIMENT
- Does social distancing change the image of connections between friends, family and strangers? (includes patch walkthrough)
- Paulina Magdalena Chwala (VR, OSC, Unity)
homework 1: theremin
I did build a simple Theremin to get to know the workflow with Max. Move your mouse cursor around to control the pitch and volume.
File:simple_mouse_theremin.maxpat
Objects used:
retrieve images from a camera
This simple patch allows you to grab (still) images from the camera.
File:2021-04-23_retrieve_images_from_camera_JS.maxpat
Objects used:
color based movement tracker
This movement tracker uses color as a marker for an object to follow. Hold the object in front of the camera an click on it to select an RGB value to track. The object color needs to be distinctly different from the background in order for this simple approach to work. This patch yields both a bounding box and its center point to process further.
The main trick is to overlay the video display area (jit.pwindow) with a color picker (suckah) to get the color. A drop-down menu is added as a convenience function to select the input camera (e.g. an external one vs. the build-in device). The rest is math.
File:2021-04-23_color_based_movement_tracker_JS.maxpat
The following objects are used
- metro - steady pulse to grab images from camera
- jit.grab - actually grab an image from the camera upon a bang
- prepend - put a stored message in front of any input message
- umenu - a drop-down menu with selection
- jit.pwindow - a canvas to display the image from the camera
- suckah - pick a colour from the underlying part of the screen (yields RGBA as 4-tuple of floats (0.0 .. 1.0))
- swatch - display a colour (picked)
- vexpr - for (C-style) math operations with elements in lists
- findbounds - search values in a given range in the video matrix
- jit.lcd - a canvas to draw on
- send & receive - avoid cable mess
homework 2: video theremin
Assignment: Combine your first patch with sound/video conversion/analysis tools
This patch combines the previously developed color-based movement tracker with the first theremin.