expr
Algorithmic composition with math functions
This patch is based on an example in the Max 3.5 Tutorial, chapter 44. It demonstrates a) the use of math functions to generate patterns for musical parameters and b) faster-than-realtime recording of MIDI data in the detonate object.
Metronome with random perturbations of tempo
Single stream of grains from a buffer~
This patch shows several techniques relevant to granular synthesis, playing a stream of short excerpts of recorded sound. (The patch uses one abstraction, called pan~, that's provided in the example titled "Constant-intensity panning subpatch". You'll need to download that abstraction and save it with the name pan~ somewhere in Max's file search path.)
Chaos algorithm for choosing pitches
Mathematicians have observed that certain repeated iterative equations create interesting visual patterns when the results are graphed. Those equations are a part of the study of "chaos theory". This patch uses one such equation, and outputs the results as MIDI pitch values, to make chaotic pitch patterns.
Curve in a transfer function
You can obtain values that change exponentially or logarithmically by using the pow object or by using the pow($f1,$f2) function in the expr object.
Conversion between pitch and frequency
The objects mtof and ftom provide easy conversion between MIDI pitch numbers and their equivalent equal-tempered frequency values.
Tap tempo utility in Max for Live
This patch is, in many ways, identical to the patch shown in "Tap to teach tempo to Max", but in this instance it's implemented in a way that will work as a device in Max for Live. Instead of setting the tempo attribute of the Max transport object, we're setting the tempo property of the live_set object in the Live Object Model.
Tap to teach tempo to Max
This patch implements tap tempo using a "simple moving average" (SMA) calculation of time between taps. The patch alters the transport tempo based on the rate at which you tap the 't' key. The method takes the average of the most recent three time intervals between the most recent four taps. So, once you tap four times, it will set the transport tempo to your tempo, and if you keep tapping it responds to your changes but takes a couple beats to move gradually to your new tempo.
Windowing an audio signal
In signal processing, a "window" is a function (shape) that is nonzero for some period of time, and zero before and after that period. When multiplied by another signal, it produces an output of 0 except during the nonzero portion of the window, when it exposes the other signal. The simplest example is a rectangular window, which is 0, then briefly is 1, then reverts to 0. The windowed signal will be audible only when it is being multiplied by 1––i.e., during the time when the rectangular windowing occurs.