aleks.max - a Tiny MaxMSP Bundle

21 Okt 2023






Since 2011, I've been working with audio, video, and data processing through a visual programming language called MaxMSP (Max), a technology and software developed by Miller Puckett and currently being maintained by Cycling '74. I've solved a great deal of problems using Max, and, as a result, my work has generated a lot of unique patches, systems, and code snippets.

Aleks.max is my tiny and ever-growing library of self-contained Max (v8) abstractions (code snippets). It's an effort to clean up and publish some of my Max code that I believe can be useful to others. Currently, the bundle includes objects for data processing/plotting, realtime multi-channel audio, and video analysis. Below, you will find a complete list of abstractions plus descriptions detailing their main functionalities.

The source code is currently stored and maintained on my alex.max GitHub repository. Feel free to report issues and download the code from there.


  1. - Realtime rendering of motiongram with openGL
  2. aleks.ksync - Synchronize oscillators with the kuramoto model
  3. aleks.multiplot.js - Dynamic list plotting and visualization tool
  4. aleks.scaleui - Automatically adjust window Zoom according to the window size

Type: Abstractions
Dependencies: XRAY max package

Generate/print real-time motiongrams and videograms (spectral mean images) with openGL jitter. These images are temporal representations of motion in videos over time.

Any video source is fine. You can add different noise reduction filters, adjust the brightness, and configure the printing rate. The abstraction uses (and starts) the audio thread for precision printing and timing. You can also specify if you want to conduct the main vector mean calculations on the GPU (via []) or CPU (via [xray.jit.mean]). The CPU version is the default and what's generally recommended (this is also documented by the Cyling74 website).

Use for realtime rendering of motiongram with openGL

Jensenius, Alexander Refsum (2005). Developing Tools for Studying Musical Gestures within the Max/MSP/Jitter Environment. Proceedings of the International Computer Music Conference, p. 282-285.

VideoAnalysis - Analyzing Music-related Body Motion

AudioVideoAnalysis - Realtime Spectral Analysis of Audio and Video


Type: Abstraction
Contributors: Balint Laczko

A multi-channel Max-native DSP abstraction for synchronizing n-number of oscillators (sine waves) using the Kuramoto model. The model describes the synchronization behavior of a system of interacting oscillators.

Specify the number of oscillators as the object argument and define their states (on/off) and frequencies as mc.sig~ inputs. Toggle sine waves at arbitrary times and commence the synchronization process by providing a k-value (coupling constant) greater than 0. The higher this k-value, the quicker the synchronization process occurs.

Use aleks.ksync to couple and synchronize oscillators with the kuramoto model.

Daniels, B. (2005). Synchronization of Globally Coupled Nonlinear Oscillators: The Rich Behavior of the Kuramoto Model. ResearchGate.


Type: jsui file

An easy-to-use dynamic plotting tool for visualizing lists of numbers in Max. The object is an upgraded and enhanced version of Timothy Place's plot.js built with the [jsui] Max object.

To use it, create a [jsui] object in Max and load it with the aleks.multiplot.js file.

The interface can plot an arbitrary number of lists and will render the content of each list (the number values) on the Y-axis and the list indices on the X-axis. You can also design the plotting interface in many cool ways, assign a custom color to your lists, add axis titles and labels, and write the data directly to a Max dictionary.

Use aleks.multiplot for dynamic list plotting and visualization in Max.

Tidemann, A., & Lartillot, O. (2021). Towards New Analysis And Visualization Software for Studying Performance Patterns in Hardanger Fiddle Music. 2nd Nordic Sound and Music Conference, 2.


Type: Abstractions

Make the Max patching window automatically adjust Zoom according to the window size. Perfect for standalone Max application builds where you want a dynamic and resizable user interface.

You can choose from two scaling philosophies; "continuous" or "ondemand". The continuous version reads and updates/scales the window size continuously (as a sub-process) when initiated by a "start" message. You can also specify the update rate in ms. The "ondemand" version only updates/scales the window size when it receives bangs.

Use aleks.scaleui to automatically adjust window Zoom according to the window size in Max.