Simple Time-Stretching Instrument for Max/MSP
June 24, 2010 at 11:10 pm 4 comments
Often, when a person starts programming in Max/MSP, the first thing he or she wants to do is build an instrument for “time-stretching” samples – increasing the duration of the sample, without altering its pitch. Many new Max users are perplexed to find that there is no native object in MSP that allows one to independently modify the pitch and duration of samples.
Probably the quickest way to remedy this is to grab Nathan Wolek’s Granular Toolkit – a set of external objects designed to enable various types of granular synthesis. The Toolkit includes an object called gran.groove.file~, which is essentially MSP’s standard sample looper, groove~, with independent pitch/duration augmentation built in.
This object has found its way onto quite a few connect_icut tracks but it’s never sounded quite right – a little tinny and washed out. Luckily, the Toolkit includes another object, called gran.cloud.live~, which can be used in conjunction with groove~ for a rather punchier-sounding form of granular pitch/duration augmentation. The Max/MSP patch pictured above uses this technique. It was originally built as a simple stand-alone instrument and has since been integrated into the the main connect_icut Max/MSP set-up.
Here’s what it looks like inside…
The way it works is incredibly straightforward. The signal from a groove~ object is fed through the gran.cloud.live~ object and the controls are set up so that when the duration of the groove~ is changed, the gran.cloud.live~ does a little compensation and the pitch remains constant. Essentially, gran.cloud.live~ does this by busting the live signal up into a bunch of micro-loops (or “grains”), the pitch/duration of which can be adjusted independently.
The MP3 below is a demo of how the instrument sounds. It uses a sample familiar from connect_icut’s “Sea Bells on Sunday” and runs it through a bunch of presets with different durations, pitch-shifts and sizes of grain. You may notice that the particularly nice (or annoying, depending on how you look at it) thing about using the gran.cloud.live~ object is that it has a just-glitchy-enough sound and adds some nutty stereo panning.
connect_icut – “Time-Stretching Demo”
Entry filed under: connect_icut, electronica, Max/MSP, MP3s. Tags: connect_icut, electronica, Max/MSP, MP3s.
1.
Nathan Wolek | June 29, 2010 at 1:05 pm
Thanks for the link to my site. Glad the objects can help you and others make music. Take care!
–Nathan Wolek
2.
Biggie Samuels | June 29, 2010 at 1:15 pm
Thanks Nathan. How’s the native Max 5 version of the Granular Toolkit coming along? 😉
3.
Nathan Wolek | June 29, 2010 at 6:13 pm
I have some plans. What I need is time. *sigh*
4.
Biggie Samuels | July 3, 2010 at 12:21 pm
Time is a big problem with this stuff, innit? I never actually have time to just fool around and experiment in Max/MSP, which would probably make me a much better Max programmer in the long run. I only get into it from time to time when there’s something specific I feel that I need for my music – and I generally just end up hacking something together from various odds and sods.