This tutorial expands on concepts from Max Tutorial #1 by adding sound to the sequence and creating a clave-like repeated musical pattern. In the first part of the video, we produce a simple, sustained sine tone by using the [cycle~] object, which is a sine wave oscillator. The signal flows through a [gain~] object, which controls the volume, and finally passes to the [dac~] object, a digital-to-analog converter, so that the sound will be audible through your speakers. The frequency of the sine wave is determined by a number box. This time we use “f” as a shortcut to create a floating-point number box so that we can enter decimal values (as opposed to the integer number box we used in the first tutorial).
In order to hear sound in Max, the audio must be turned on in the lower-right corner. The icon will turn blue when the audio is on. Normally the audio should be on when you’re performing or testing, and off when you’re programming. The next step is to build a simple synthesizer by applying an envelope to the sine wave. We can draw the shape of an envelope by using an object called [function], and then passing the output of the second-from-left outlet into an object called [line~]. To draw a shape in [function], the patch must be locked. Then simply click to place points (shift-click to delete a point), and make sure your starting and ending points are all the way to the bottom of the window (the points will turn “hollow”).
In a traditional synthesizer, the envelope generator and sound source are combined using a voltage-controlled amplifier, or VCA. In Max, we can use the multiplication object [*~] as shown in the video. Note that objects whose name ends with a tilde (“~”) are specifically audio objects, whereas other objects do not necessarily relate directly to audio, and so are called control objects. For instance, [function] does not have a tilde, so we have to convert its output to an audio signal by passing it through [line~]. We can trigger the envelope by connecting a button to the top of [function] and clicking on it.
Finally, we can recreate the patch from the first tutorial in order to create an eight-step pattern. We can choose which steps of the pattern should have sound, and then connect them to the envelope generator via the numbered outlets of [sel], as shown. The result is a looping musical pattern. In future tutorials, we will expand this sequencing concept so that we can include different notes.