# Max

## Frequency modulation

Frequency modulation refers to using the output of a low-frequency oscillator to continually alter (modulate) the frequency of another oscillator. This example provides the user control of the amplitude and frequency of both the "carrier" oscillator (the one we hear directly) and the "modulator" oscillator (the effect of which we hear indirectly). The output of the modulating oscillator is added to a constant (the main frequency), thus causing the carrier frequency to fluctuate up and down around that central frequency.

## Event timing with transport

This patch shows a simple use of a transport-governed metronome to trigger events at a constant rate. The metro object that has the argument '4n' will be governed by the transport because its interval is specified in a tempo-relative, music-based "note values" format. (Just for the sake of comparison, the patch includes another metro that is unaffected by the transport because its interval is specified in milliseconds.) The transport-governed metro will only run when the transport is on.

## Generate classic waveforms

There are certain wave types that are historically used in electronic music, known as "classic" waveforms: sine, sawtooth, square, and triangle. These are the four waveforms generated by the classic Moog synthesizer oscillators, and are still quite useful in computer music.

## Calculate pitchbend transposition

This patch shows how to calculate pitch bend transposition.

## Envelope with the function object

The line~ object calculates and performs that interpolation, sending out a signal that arrives at a specified destination value in a specified amount of time. Once the signal arrives at that value, it stays there until it receives another message telling it to transition linearly to a new signal value.

## MIDI Scale and Crescendo

This patch uses a counter to send out MIDI pitch and velocity values using makenote and noteout. Once the counter reaches 12 a 0 message is sent to the toggle attached to the metro stopping it.

## Play one MIDI note

This patch will send out a MIDI command to play middle C (60) when the "c" key on the computer keyboard is pressed.

## Random "one-hand" MIDI note playing

This patch will output random MIDI note values stored within the table. The range and offset of values are determined by the top-right random object and drunk object respectively.

## Present different views of a subpatch

The bpatcher object allows a patch to show a window onto the contents of a subpatch. The portion of the subpatch that will be shown in the bpatcher window can be changed by an offset message to the bpatcher or to a thispatcher object inside the subpatch.

## How pack handles the list message

The pack object is useful for combining int, float, and/or symbol messages into a single space-separated list. Messages that come in each inlet of pack are stored until a message comes in the left inlet, triggering output of the entire list.