MAX MSP Research Diary January - February 2025.

In January of this year, I was very kindly awarded Creative Scotland Funding to spend two months researching and developing a MAX MSP Performance system.  With this goal in mind, I contacted Max Certified Trainer Duncan Wilson (AKA Ned Rush) for help. We had weekly lessons throughout January and February, where I would bring problems and questions and ask Duncan for solutions. I learned so much from him in that period and wouldn’t have been able to progress without his expertise and teaching. It was a great experience and I feel that the more time I spent in the world of MAX 9 the more ideas appeared, not necessarily technical ones, but more musical ideas that could now be expressed as I wanted them to be.

I designed a curriculum based on what I wanted the system to be capable of and each week I’d try to improve it. Progress was non-linear. I have included a summary of my weekly notes below, plus links to my YouTube page where you can see clips of my progress. The clips show various system interactions. Some contain the raw output of the system playing MIDI notes into an Ableton Operator Kick Drum Patch and other clips are a system overview either showing the system providing a function in the context of a track or a visual that will be part of my live setup.

Examples of my Research Notes:

Max MSP Concepts & Terminology – Week 1 Bipolar vs. Unipolar for Controlling Parameters

  • ●  Bipolar signals range from +1 to 0 to -1.

    • ○  Used for modulation where values need to swing around a midpoint.

    • ○  Example: Panning (-1 = Left, 0 = Center, +1 = Right).

    • ○  Example: An LFO (Low-Frequency Oscillator) modulating pitch ±5 semitones.

    • ○  Bipolar oscillators produce symmetrical waveforms around zero (e.g., sine

      waves).

  • ●  Unipolar signals range from 0 to +1 (or another positive value).

    • ○  Used when negative values don’t make sense (e.g., volume control).

    • ○  Example: A unipolar LFO controlling filter cutoff (0 = closed, 1 = open).

    • ○  Example: Envelope generators (like ADSR) usually output unipolar values.

      Duty Cycle for Subdivision

  • ●  The duty cycle refers to the percentage of time a waveform is "high" vs. "low" in one full cycle.

  • ●  In square waves, the duty cycle affects pulse width modulation (PWM).

    • ○  50% duty cycle → Even on/off time (standard square wave).

    • ○  25% duty cycle → Shorter "on" phase, creating a thinner, more nasal tone.

  • ●  Use case: In a step sequencer, changing the duty cycle controls note lengths (subdivision of a beat).

    Amplitude vs. Instantaneous Amplitude

Peak Amplitude → The highest positive or negative value a waveform reaches.
○ Example: If a waveform swings between -0.5 and +0.5, the peak amplitude is

0.5.
Instantaneous Amplitude → The exact amplitude at any given moment in time.

  • ○  Example: At time = 0.25 sec, a sine wave’s amplitude might be 0.3, but its peak might be 1.0.

  • ○  Useful for real-time audio analysis (e.g., compression, envelope following).

    Arguments vs. Attributes

Arguments → Values that initialize an object when it is created. ○ Example: cycle~ 440 (440 Hz sine wave oscillator).

○ Arguments cannot be changed dynamically (you must delete and re-add the object).

Attributes → Modifiable settings that can be changed dynamically, usually with @. ○ Example: gain~ @interp 1 (turns on interpolation, smoothing gain

changes).

Max MSP Shortcuts & UI Features

  • ●  Deleting Patch Cords → Hold Option (Mac) while selecting a patch cord.

  • ●  Quickref Menu → Hover over an inlet/outlet to see allowed inputs/outputs.

  • ●  Object Action Icon → Small button next to an object that provides controls.

  • ●  Plugins Menu → Found in the left sidebar, giving access to VSTs and built-in effects.

  • ●  Snippets → Reusable code blocks for quick access.

How to use: Click on an object, then click the paperclip icon. The snippet appears in the left sidebar under "Snippets."

Useful Max MSP Objects Audio Playback & Buffering

buffer~ → Stores an audio file in memory for playback.
○ Example: buffer~ mySample 5000 (creates a buffer named mySample

for 5000 ms of audio).
groove~ → Reads from a buffer~ with pitch and speed control.

○ Example: Play a sample with adjustable speed. Waveform Generators

cycle~ → Generates a continuous sine wave.
○ Example: cycle~ 440 (creates a 440 Hz sine tone).

  • ●  rect~ → Generates a square wave (useful for PWM synthesis).

  • ●  saw~ → Produces a sawtooth wave (rich in harmonics).

  • ●  tri~ / triangle~ → Generates a triangle wave (softer than a square wave).

    Control Signals & Modulation

line~ → Creates smooth ramps between values (useful for amplitude or filter sweeps).

○ Example: line~ 0, 1 500 (fade-in over 500 ms).
mtof / mtof~ → Converts MIDI note numbers to frequency (Hz). ○ Example: mtof 60 outputs 261.63 Hz (Middle C).

sig~ → Outputs a constant signal value (useful for modulation).

○ Example: sig~ 0.5 (always outputs 0.5). Recording & Sample Playback

  • ●  sfplay~ → Plays audio files from disk.

  • ●  sfrecord~ → Records audio to disk.

  • ●  playlist~ → A UI object for selecting and playing multiple sound files.

    Routing & Selection

  • ●  selector~ → Switches between multiple audio inputs.

  • ●  panel → A GUI element for designing visual interfaces.

    Operators & Special Objects

!/ or !- Reversed operations (negation or inversion).
○ Example: !- 1 flips an input (1 becomes 0, 0 becomes 1).

attrui → Allows dynamic attribute control.
○ Example: Use attrui to adjust a filter's cutoff frequency in real-time.

Practical Applications

1. Creating an LFO for Filter Modulation
Use cycle~ to create an LFO and map it to a low-pass filter cutoff:
cycle~ 0.5 // Slow LFO
*~ 500 // Scale modulation
+~ 500 // Offset to make the range 500-1000 Hz

2. Generating a Kick Drum
A basic synthesized kick drum using cycle~ and line~:


cycle~ 60 // Base frequency
line~ 60, 30 50 // Quick pitch drop over 50ms

*~ env        // Apply envelope

3. Using Loadbang to Initialize a Patch

Ensure values are set at startup:

| message 440

| cycle~

This starts the sine wave at 440 Hz when the patch loads.

 

Max MSP Concepts & Terminology – Week 2 Function Object

  • ●  The function object is used to create breakpoint envelopes that output values over time.

  • ●  Used for envelope generation, shaping amplitude, pitch, or filter modulation.

  • ●  Can be linked to line~ or curve~ to smoothly interpolate values.

    Example:
    function 0 0, 500 1, 1000 0

    line~

● This creates an envelope that ramps up to 1 over 500ms and then decays to 0 over 1000ms.

Shape Object

  • ●  Introduced in Max 8, shape is similar to line and curve.

  • ●  Generates ramped values with different easing functions.

  • ●  Unlike line~, shape provides additional interpolation curves for smooth

    transitions.

  • ●  Example use case: Creating glides or dynamic modulations with a more organic

    feel.

    What~ Object

    • ●  The what~ object reports when a ramp or phasor cycle resets.

    • ●  Used for detecting loop points in LFOs, sequences, or phase-based processes.

    • ●  Works well with phasor~ to sync events at specific points in a waveform cycle.

      Delta in Max MSP

    • ●  Delta refers to the change between two consecutive values in a signal or process.

    • ●  Often used to detect sudden drops or resets in values.

      Example:

delta~
< 0  // Detects negative jumps

● This detects a drop in a waveform (e.g., detecting beat triggers or phase resets).

VExpr Object
● vexpr applies math operations to entire lists of numbers.

● Useful for vector-based operations (applying formulas to an array).

Example:
vexpr $i1 * 2

● This doubles every element in an input list.

+=~ Operator

  • ●  In signal processing, +=~ accumulates signal values over time.

  • ●  Useful for creating integrators, cumulative modulations, and certain types of

    feedback loops.

    Modulo 16

  • ●  The % operator performs modulo arithmetic (remainder division).

  • ●  Modulo 16 is often used for creating step-based sequences.

    Example:
    counter 0 15

    % 16

● This creates a looping sequence from 0 to 15.

Poke~ Object
● poke~writessample-by-sampleintoabuffer~.

  • ●  Allows real-time audio manipulation (e.g., custom delay effects).

  • ●  Example use case: Implementing granular synthesis or live sampling.

    Seqq — (Triple Dash) for Unique Buffers

  • ●  Using --- in a buffer name ensures each instance gets a unique buffer.

  • ●  Prevents conflicts when multiple copies of a patch are used.

    Example:
    buffer~ mybuffer---

● Each instance of the patch gets its own independent buffer.

Difference Between --- in Gen and Max

  • ●  In Max, --- is used to ensure unique buffer names.

  • ●  In Gen~, the --- convention may apply differently when working with data objects

    inside gen~.

  • ●  Use case: Ensuring separate processing per instance of a Gen-based synth or

    sampler.

    Transforming a Patcher into a Bpatcher

  • ●  bpatcher allows embedding a subpatcher inside a parent patch.

  • ●  Improves organization by keeping complex patches modular.

  • ●  Steps:

    1. Save a subpatch as a .maxpat file.

    2. Create a bpatcher and load the file into it.

    3. Use offset attributes to resize the UI elements inside.

    Wavetable Oscillator

  • ●  Uses a preloaded buffer~ to read waveform data cyclically.

  • ●  More flexible than basic oscillators (cycle~), allowing custom waveforms.

    Example:

buffer~ mywavetable
wave~ mywavetable

Scheduler in Overdrive

  • ●  "Overdrive on" → Prioritizes timing-critical events (e.g., metro, phasor).

  • ●  Helps keep audio-rate processes more precise.

  • ●  Found under: Options > Overdrive.

    Metro Out of Time

● If metro is out of sync, Overdrive might be off, or the transport might be in a

different tempo.

Try:
transport 1

metro 250

● This syncs metro to the transport clock.

Translate ms to Hz Object

  • ●  Converts milliseconds (ms) to frequency (Hz) for LFOs and oscillators.

  • ●  Formula: 1000 / ms = Hz.

    Example:
    expr 1000 / $f1

● Converts input delay time (ms) into frequency (Hz).

Slide~ Object for Decay
● slide~smooths changes in a signal, creating a glide or decay effect.

Example: max CopyEdit noise~

slide~ 10 100

● This creates a gradual fade instead of sudden jumps.

Delay Object (Transport-Synced)
● delay works with transport for Ableton-style tempo-synced delays.

Example:
delay 500 @transport 1

● This delays an event by 500ms, syncing to the transport clock.

Pipe Object


● pipe delays lists of numbers (unlike delay, which delays events).

Use case: Delaying MIDI notes or sequencer steps.

Example: max CopyEdit pipe 250

● Delays incoming values by 250ms.

Count Object


● count is used for sequencing numbers cyclically.

Example: max CopyEdit count 0 15

● Counts from 0 to 15 and then loops.

Master Clock & Sequence Length (10s)

  • ●  Deciding how the master clock works is crucial for syncing different modules.

  • ●  Example approach:

    • ○  Use phasor~ as a master timing source.

    • ○  Create a sequence that lasts exactly 10 seconds using timepoint.

      Ramp-Based Transport
      ● phasor~can act as a transport with time-based ramping.

      Example: phasor~ 0.1

● Generates a ramp every 10 seconds (0.1 Hz).

Timepoint Object
● Triggers an event at a specific time in the transport.

Example:
timepoint 5000 bang

● Sends a bang at 5 seconds in the transport timeline.

Phasor & Rate Object
● phasor~generates a ramping signal(used for sequencing).

● rate~modifiesaphasor~speeddynamically.

Example:

phasor~ 1

rate~ 0.5

● This halves the phasor speed.

Function Inspector (Set to Curve Mode)
● Open function Inspector, change Mode to curve for smoother transitions.

Hold Option + Apply Curve
Shortcut to adjust curve tension when editing a function envelope.