[PD] time, metro, triplets and polyrhythms

Damian Stewart damian at frey.co.nz
Thu Mar 23 08:27:34 CET 2006


hi,

I'm about to embark on an external-building exercise involving designing 
and building a timing system and looping envelope editor inspired by the 
looping-envelopes paradigm that Ableton Live uses.

Basically what I want is the ability to subdivide time into 3, 4, 5, or 
7, to any depth, and use this to control looping movement along a 
function; and I want to be able to do this multiple times simultaneously 
without losing sync. As a very simple example, I want to be able to have 
a triplet-based loop that is 1 bar along against a quarternote-based 
loop that is 1.5 bars long, and have both loops synchronised every three 
bars. The bar lines for each would come at the same time, but the first 
would have 3 beats in the bar, and the second would have 4 beats in the 
bar, and the first loop would repeat three times for the second loop's 
twice; at which point they both start again at square 0. If anyone's 
done any kind of polyrhythmic stuff using Live they'll know what I'm 
trying to say I hope :)

Against this looping grid, I want to be able to both rapidly set blocks 
of time to a flat value (a la ctrl-2 ctrl-2 ctrl-2 click in Live), and 
to zoom in on a small section and micro-tweak values (ctrl-1 ctrl-1 
ctrl-1 click in Live), and (this may have to come later) be able to 
switch to an interpolating graph view and edit that instead of being 
fixed to discrete units of time.


Are there any built-in objects or externals I should be investigating 
before or even instead of embarking on this exercise?


The specifics of it are fairly important to me -- what I basically want 
to be able to do is control multiple arpeggiators with non-fixed time 
intervals on each step, all lined up so that I can build multiple 
layered polyrhythms that maintain synchronisation. And it needs to be 
easy to edit in a live situation.

(I am perfectly willing to and capable of duplicating the Ableton Live 
interface if needs be in this respect (I'm much less interested in the 
Live audio engine than I am in the interface) -- I already have a broken 
prototype I built in C++ for a VJ toy based around the WinAmp AVS source 
code, which rendered abstract visual elements and transitions against a 
rigid metronome capable of polyrhythmic sequencing -- visual techno, if 
you will. But it was based on a fairly unsuitable GUI library which I 
had to heavily modify, and then I went and reinstalled my system without 
backing up the modfications (as you do), and thus it is all gone.)


So, (apologies for the mammothosity of this email), I'm looking at at 
least two new objects. The first, we'll call it TimeMachine, will be 
based around a high-frequency timer triggering at some common multiple 
of 2, 3, 5, and 7 times every beat. The second, maybe call it 
LoopingEnvelope, has to decode that raw number and decide based on 
envelope data whether or not to send out a new message of the form 
'float float' that will get passed on to a _line_ object.

How best then to get the timing messages from TimeMachine to 
LoopingEnvelope? Is it ok to send a bajillion messages every second 
between objects, or should I be looking at some kind of hacky non-PD 
shared-memory style technique that forever ties LoopingEnvelope to 
TimeMachine? I figure I can't just disconnect TimeMachine from 
LoopingEnvelope and build LoopingEnvelope around delays because over 
time the start points of multiple LoopingEnvelopes could very well drift 
apart, especially if triplets or seven-ets start getting involved.

-- 
f r e y
live music with computers
http://www.frey.co.nz




More information about the Pd-list mailing list