Welcome to the second tutorial exploring Cycling 74’s Max, Gen and the OWL! Today, Cherif will talk you through making a simple but great sounding tape-style delay effect (with feedback and low pass filter) for the OWL. This can be used to delay sound, meetings, aging and most life events. We hope you enjoy it.
You can download the gendsp file, or test the patch, here: https://www.rebeltech.org/patch-library/patch/TapeDelay
- We will begin with the template, which you can download from our GitHub (it’s called DevTemplate). We rename the Max patch something (eg SimpleDelay.maxpat), and do the same with the gendsp file (we call it SimpleDelay.gendsp). After renaming the gendsp file, rename the [gen~] object accordingly – in our case, [gen~ @gen SimpleDelay].
Note: you know have to use Exp rather than E to get parameter E, unlike in the screenshots. E will give you the mathematical constant e.
- The first object we need is [delay]. We give this an argument to set the maximum length of delay we will be working with. This is sample based, and because the OWL is working at 48000 Hz, we use the argument 48000 to give us 1 second of delay to play with. We set an attribute for the feedback of 1 – this configures the delay to accept feedback. So, the object should look like [delay 48000 @feedback 1]. We can then connect the signal that we want to delay, coming from the left channel via [in 1], to the left inlet of [delay].
3. We’re working between 0 and 1 with dial or CV on the OWL. We can get the input from dial A from [param @name A @min 0 @max 1]. To scale this correctly so the input can work with our delay time we multiply it by 48000 using [* 48000]. We then connect this to the right inlet of [delay] so it can be used to change the delay time.
- This needs a bit of adjusting to work well, however. As it is, we’ll have a ‘stepped’ control, rather than something smooth. The input from our the dial / CV A on the OWL is being updated 48000 every second – you have to move those coffee-jittering hands too smoothly to keep up with that!
If you want to, you can see this jitteryness with the [scope~] object, by connecting back to the main Max patch using an [out 3].
This jittery, stepped movement will give us a glitchy sound in our delay, which for now we don’t want. So, we need to do what’s known as ‘smoothing’ or ‘slewing’. We can do this with the object. We give it two arguments for the slew rate as it ascends or descends. A higher value gives a slower slew. Higher values feel smoother but less responsive. We will use the argument 3000 for both. We will get a good ‘tape-style’ delay from this, whereby the delay time affects the pitch of the delayed sound.
5. The next thing we want to do is set up feedback. This is how much of the delayed signal goes back into the delay. So, we basically need a volume control between the delay output and the original, which we can set up and have controlled by the dial / CV B, which we get from [param @name B @min 0 @max 1]. We don’t need to scale this.
6. To mix the wet and dry signals – that is, the undelayed and the delayed signal – we use an object called – you guessed it – [mix]. This is a simple cross-fader. We can connect the two inputs we want to fade between into the first two inlets, and use the third inlet for the balance input. This is between 0 and 1, so we can connect the input from dial / CV D to control this.
7. So, we’ve got a delay pedal! It works, but we can make it more interesting. For instance, we could put a filter in there. With Gen, you have to make your own filters. It’s a hard life, we hear you say. Nonsense! We can find out the maths of a filter by looking at the [onepole~] Max object. It’s basically a feedback loop with one sample of delay.
8. To get one sample of delay, we use the [history] object which does just that. We will use the [mix] object to mix the filtered input. We can use the input from dial / CV C to control the mix and the amount of filtered input. For this feedback loop to work the delayed signal has to be always mixed with the original signal, so the CV input to [mix] can’t go above one. So, we constrain the input with the [clip] object, using the arguments to constrain the input between 0 and 0.99. Another [clip] object can stop the filter from ‘blowing up’ with too much feedback, if we insert it into the first feedback loop we made earlier.
We made a slight mistake in the video, and for the patch to work properly, check the screenshot below. We need to connect the output from the [mix] object in the filter loop, NOT the output from the  object in the feedback loop, to our final [mix] object!
- Next up, we need to make this stereo! We do this with some duplication.
So, there you have it! A tape-style delay with filters, written in Max, that you can run on the OWL! Upload this patch to the OWL using the online compiler at www.rebeltech.org.
Even if you don’t have an OWL, you can test the delay in the browser.
You can find more instructions about compiling Gen patches for the OWL at http://www.rebeltech.org/2016/11/owl-max-tutorial-1-getting-started/