Friday, 12 April 2013

Tapehead - Sample Playback for Sound Designers

For this, the first post, we're going to look at a simple device which utilises the sample playback capabilities of Max/msp - essentially we are making a playback device. It's fairly basic, but can be expanded on in the future to create a more complex system (more on that later). I'm not going to cover how to re-create this device step-by-step, so this post assumes that you have a basic competence with both Max and msp. If you've gone through some of the tutorials or spent a bit of time noodling around with Max you should feel at home here.

In part, this was inspired by a story which stuck in my head about Frank Warner, sound editor on Raging Bull, Close Encounters and a whole host of other great films. Here is a section from it, part of an interview with Walter Murch in the book Soundscape: The School of Sound Lectures:

'He [Frank Warner] would take one of the reel-to-reel tapes from his huge library and put it on almost at random and move it with his fingers. He'd just move it manually, at various speeds, backwards and forwards across the playback head. Meanwhile , he'd have the recorder turned on, capturing all these random noises.... But he was in the darkness, letting the breeze blow through his brain, waiting for the kernal of an idea that would emerge, fragments of unique sounds on which he could build everything else'

(Murch, 1998)

Being able to play sounds back at different rates is one of the oldest, but still one of the most useful techniques for creative sound design. This device is designed to facilitate simple pitch manipulation in a way that is playful and experimental, embracing a bit of randomness and the unexpected along the way. The idea is to load up a recording, and experiment with just playing back the sample data at different rates and in different directions. There is no musical tuning, no measurements in semitones and cents, just the waveform, playback time and the playback pattern over that time. 

Here is the link to download the patch:

Tapehead 1.0 

You will need either a full version of Max/msp 6 or the Max/msp 6 runtime. Both are available from Cycling '74 here. The runtime version of Max allows you to run patches but not edit them.

(This patch is tested up to Max version 6.08, the current version 6.12 has issues with the replace message to [buffer~] so will not work, if you do have problems try an earlier version)

The best thing to do is load a sound and flick through the presets, try selecting different areas of the file, different playback times and shapes. With the breakpoint editor shift-click removes points and alt-click+drag adjust the curve if in curve mode. You can also drag the manual scrub bar at the top and scan over manually.

So this doesn't exactly break new ground, as this is all possible in most DAW's, but it does provide a convenient tool for experimentation. Also, within your DAW this is usually achieved through editing and off-line effects such as the pitch-bender. This player is capable of changing playback direction and position very quickly and specifically, and can control this using complex playback curves. The other key factor here is that as this process is live, there's no waiting for offline processing. 

I'm not going to explain how every single part of this patch works, but we are going to look at the main playback mechanism at its heart. Max has a range of different objects which can be used for sample playback, all which have slightly different attributes and capabilities. When I first started using Max I remember finding this quite confusing and overly complex, as sample playback is considered a really basic capability of any audio system. However, I soon learnt that with this complexity comes versatility, and that through this Max is capable of creating a range of sample driven instruments or playback systems. 

These are the objects associated with sample playback:


The first on the list, [sfplay~] is the odd one out here, as it plays back from disk. The others all play from an object called [buffer~] so the audio they use is stored in memory, like a sampler. 

With Max I often find that making a connection between two different objects is the inspiration for a device, and that's what happened here. I was tinkering with an object called [function] which is usually used for creating envelopes of different kinds and thought of a slightly unorthodox use for it; driving a [play~] object to playback samples in interesting ways.

Here is a simple patch below which demonstrates the core of this mechanism:

Here's a link to the patch itself:

Tapehead Basic

And here's a step by step rundown of what happens inside:

1. You load a sample into the [buffer~] called soundA  

2. This triggers [info~] to spit out some information about the sample we have stored in our [buffer~]. In this case we are interested in the total time of the sample, or how long it is, at the sample rate which it was recorded.

3. Moving over to the [function] object (the XY graph), we first set a duration which it will cover using the setdomain message. The message box here will add the text setdomain onto the beginning of any message which passes through its left inlet.

4. Trigger playback using the button at the top of the patch. This causes function to pass on information about the breakpoints you've created to [line~]

5. [Line~] generates a signal matching the shape and time which you set for the function. So a straight line from 0-1, left to right is linear playback, forwards. The opposite - a straight line from 1-0, left to right is linear playback, backwards. Between this you can set a playback shape which scans the wave in any way you see fit, backwards or forwards.

6. As the output from [line~] is between 0-1 we use [scale~] to scale the signal up to the length of our sample.

7. The signal then drives the [play~] object, playing back sample data from the [buffer~] and outputting the sound you have created through the [ezdac~].

I've expanded on the device further by adding the manual scrub option, as that can often be a good way of discovering new sounds, and adds more of a physical dimension to the process. I expect everyone who uses this in Protools has accidentally discovered a sound which is more interesting backwards than forwards in this way! The rest of the completed application is composed of UI objects (menus, sliders etc) and other control objects like [preset]. The beauty of this patch is the potential for expandability here. Now we have the main control mechanism in place we can duplicate it to add in other parameters. Multimode filter with envelope control over cutoff and resonance? envelope driven adjustable delay line? Amplitude envelope? Envelope controlled pitchshift? LFO controlled vibrato? Envelope controlled LFO speed? A bank of presets for each effect? Randomised preset recall? It's all possible.

Please feel free to comment. I'll also be expanding the system in a future post, so keep an eye out for that. 


  1. I think this thing is brilliant, so I decided to recreate it as a Max4Live device

    Thanks for all the cool ideas in this blog, I am still trying to get into Max and some good ideas with simple explanations go a long way

    1. That's pretty cool. I'm not a M4l user (yet), but I can see why this would be useful. Just be aware of the CC license terms:

    2. Would it be possible to embed this patch tapehead into the interesting "phonogene" (musique concrete) developed by Tristan Shepherd?

      thank you for your response