Monday, October 08, 2012

Max for Live Basics Tutorial 3: Delay Line Audio Effect

Overview
The aim of this tutorial is to cover the basics of creating a delay line audio effect in Max for Live. This tutorial should be seen as a starting point that can be expanded upon. This tutorial assumes that you have read Max for Live Basics 1 as well as Max for Live Basics 2

Max for Live is an extension for Ableton Live. This allows users to load patches made in Cycling 74's Max inside of Ableton as Live devices. Max is a graphical programming language whereby patches are created by connecting various objects together. Each object performs a specific function, and multiple objects - interconnected in specific ways - can perform complex operations.

In Max for Live, three categories of devices can be created:
• Audio effects
• MIDI effects
• Instruments

An audio effect takes an audio signal as an input and outputs an audio signal.

A MIDI effect takes MIDI data as an input and outputs MIDI data.

An instrument takes MIDI data as an input and outputs an audio signal.

This tutorial will cover how to create a digital delay effect with feedback.

video












Basics: Digital Delay Line

Let's begin with working on a track that already has a sample or software synth on it - just something that makes some sound so that we can test our effect as we go.


Add a blank Max Audio Effect device, found in Live Devices > Audio Effects. 


Notice that the blank Max Audio Effect has two objects. The plugin~ object represents audio going into the device. The plugout~ object represents audio coming out of the device. The outlet / inlet on the left had side represents the left channel of audio.  The outlet / inlet on the right had side represents the right channel of audio. Open up the device in Max.


Save the device in the Max Audio Effects folder. I named mine Seb.ExampleAudioEffect. 


Remove the clutter of unnecessary comments and make the patching window larger. 


Create a tapin~ 2000 object. This represents the input of a delayed audio memory, used in delay effects such as a simple delay effect unit. The number 2000 represents the delay time in milliseconds. Connect the left outlet of the plugin~ object to the inlet of the tapin~ 2000 object.


Create a second tapin~ 2000 object. Connect the right outlet of the plugin~ object to this second tapin~ 2000. 


Create a  tapout~ 2000 object. This represents the input of a delayed audio memory, used in delay effects such as a simple delay effect unit. The number 2000 represents the delay time in milliseconds. Connect the outlet of the tapin~ 2000 object to the inlet of the tapout~ 2000 object. This connection simply links the two together so that they share the same audio memory - it is not an audio signal connection as such.


Create another  tapout~ 2000 object. This represents the input of a delayed audio memory, used in delay effects such as a simple delay effect unit. The number 2000 represents the delay time in milliseconds. Connect the outlet of the second tapin~ 2000 object to the inlet of the second tapout~ 2000 object. This connection simply links the two together so that they share the same audio memory - it is not an audio signal connection as such. 


Connect the outlet of the tapout~ 2000 object to the left inlet of the plugout~ object. This will route the audio signal to the output of the device. 


Connect the outlet of the second tapout~ 2000 object to the right inlet of the plugout~ object. This will route the audio signal to the output of the device. 


Create a live.numbox


Change the type to float. Change the Range / Enum to 0. 2000. 


Connect the left outlet of the live.numbox to the inlet of the tapin~ 2000 object. 


Connect the left outlet of the live.numbox to the inlet of the other tapin~ 2000 object. Thus, the live.numbox can control the delay time of the plugin.


Finally, add a comment to label the live.numbox correctly. 


Save your device and try it out in Ableton!












Extension: Adding Feedback

Like many delay effects, we might want feedback in this one too! Add two *~ objects. 


Connect the outlets of each of the tapout~ 2000 objects to each of the  *~ objects.


Route the output of each *~ object back to its respective tapin~ 2000 object. 


Create a live.numbox so that we can control the feedback amount. 


Change the Unit Style of the live.numbox to Float. Change the Range / Enum to 0. 1.


Connect the left outlet of the live.numbox to the right inlet of both of the *~ objects. The basic idea is: our audio signal is sent to the tapin~ 2000 object; then it is delayed; then it comes out of the tapout~ object; then it is routed to a gain stage (the *~ object); then the output from this signal is fed back to its own input stage, thus creating delayed feedback. 


Save your device and try it out in Live!











Exercises
• Add a filter in the feedback loop (hint objects: filtergraph, biquad~, *~, umenu)
• Control the delay time with a sinewave instead of a live.numbox (hint objects: cycle~, tapout~, +~, *~, i, f)
• Create a multi-tap delay (an effect with multiple delay lines

0 comments: