Impulse #8 – Granular Synthesis

For this blog post I took a tutorial class about Max MSP integrated MC objects and their capabilities for programming granular synthesis. The tutorial series consists of 5 parts and was held by Federico Foderaro who has the YouTube channel Amazing Max Stuff.

Granular Synthesis
Granular synthesis is based on the same principle as sampling, however with samples split into many pieces of around 1 – 100 ms of duration.

First, he gave an introduction to MC objects which allows us to send multiple channels of audio in a single patch cord. So, in general we have the possibility to operate on many channels of audio at the same time while preserving a rather simple patch environment.

First we build the core structure of our audio playback system. Therefore, we need an audio file which is being loaded into a buffer Object and get information about playback time with the info Object.

The following MC objects in Max MSP can process multiple channels in one object:

  • mc.traget – takes on the left side a message which is passed on to the mc.line object and on the right side a channel number to which the message is send.
  • mc.line – counts from 0 to 1 in a given time.
  • mc.play – reference to the loaded buffer and plays the audio file at the triggered channel number.
  • mc.stereo – converts the audio signal into a stereo signal.
  • mc.dac – sends the signal inputs to the audio hardware.

Now we want to be able to play multiple smaller pieces of the audio file at different positions and with different pitch.

For this we will create a random number between 0.001 and 1.000 and multiply it with the audio file length. Then we define the end of our playback by adding for example 50ms to the start and play the file with the same speed of 50ms.

To play multiple samples at the same time we now replace the toggle with a metro Object that sends a bang every 10 ms. To avoid a clicking produced when a file has not finished playing and gets replayed we first duplicate MC target and MC line and then apply an envelop to every sound being played which gets later multiply with the corresponding channel of the audio playback.

Later we can add a parameter to adjust the playback start position with a slider and randomize it with a knob. The pitch variations will be also realized with random number that can be controlled with a second knob and controls the playback speed per channel.

Granular synthesis is characterized by sample lengths of 1 – 100ms, however I found out that for my recording of cracking ice this duration is too small. I still want some sound characteristics of the original file while being able to play multiple versions with different pitch to produce a controllable intensity of cracking ice. Therefore, I adapted the parameters and added a second slider to be able to define a custom playback length that gives the opportunity to incudes important parts of the sample.

The final patch looks like this: