[sdiy] continuously variable swing

WeAreAs1 at aol.com WeAreAs1 at aol.com
Wed Jul 13 08:10:00 CEST 2005



OK, here's the deal.  Just so you're clear, your Roland drum machine has both 
MIDI clock and DIN Sync clock.  Both DIN Sync and MIDI clock operate at a 
rate of 24 clocks per quarter note.  That is, your drum machine's patterns will 
advance by one quarter note for every 24 clocks it receives.  It will advance 
by one eighth note for every 12 clocks, and one sixteenth for every 6 clocks.  
You can extrapolate the triplet subdivisions from these numbers, too -- 
Quarter note triplets get 32 clocks; 1/8th note triplets get 16; 1/16th triplets get 
8 clocks, etc.

Typically, when you are trying to add swing to a groove, you are dealing 
either with swung 1/8th notes (as in typical swinging jazz), or swung 1/16th notes 
(as found in much hip-hop and funk).  To achieve the swing, you basically 
need to delay the onset of every other note.  With 1/8th notes, you would be 
delaying the "and" beats.  With 1/16th notes, you would delay the "e" and "ah" 
beats.  (if you don't know what those are, do some research on basic music theory 
-- the info is out there on the web).

The problem, as you have already noted, is that there are also a bunch of 
clocks (MIDI or DIN Sync) that happen *between* the beats you're actually 
hearing.  Therefore, if you want to delay every second 1/8th note, you can't just 
delay the 13th, 37th, 61st, and 85th clock pulses (which are the clock pulses 
that the "and's" fall on), you also need to delay the other 11 preceding clock 
pulses -- this way those four important "and" pulses will arrive at the right 
time, and not be confused by the 11 that came before.  Also, you still need to 
have clock pulses #1, 24, 48, and 64 arrive as they normally would, that is, 
undelayed.

The same situation exists with the sixteenth notes, except that you're 
dealing with 6 clocks between swung notes, rather than 12.

To do this with discrete hardware logic would be possible, but it would 
definitely be a bit of a complex circuit.  It might be more easily accomplished in 
the realm of software/firmware in some kind of PIC or AVR-type microprocessor. 
 Of course, you'd want to have your swing amount be variable, and that also 
increases the complexity of the problem.

In order to get a decent range of swing variation, you would basically need 
to remove every other 12 (or 6) clocks from the clock pulse stream, then insert 
12 of your own newly-generated clocks -- but they'd have to be sent out as a 
very fast burst of 12 in series, and the burst would be sent at the 
appropriate moment to get the desired swing effect.  You'd also have to make sure you 
didn't ever delay the burst by too much, because then those delayed clocks would 
start interfering with the clocks for the non-swung downbeats.  Keeping the 
swing amount (or "percentage") constant at different tempos also presents an 
interesting technical challenge -- think about it for a minute, and you'll 
probably see what I mean.

I think it would be very cool to have a "swingalyzer" device that would allow 
you to add continuously variable swing to clocked sequences (for instance, on 
analog CV sequencers that expect one clock pulse per sequence step).  
However, most drum machines already have fairly sophisticated options for swing, so 
I'm not so sure that there's much need there.

Michael Bacich



More information about the Synth-diy mailing list