Shuffle, swing and FunkTempo
What it is#
Delaying every second 16th slightly turns a stiff pattern human — shuffle/swing. Trackers do it with groove or speed settings rather than with note positions (source: s-037-lab).
How to do it#
SID-Wizard#
Tempo is frames per row. Besides a single tempo there is FunkTempo — "two tempos are alternated every pattern step so with funktempo activated the first tempo is for even rows in the pattern and the second tempo is for odd rows" (source: s-witchmaster-creating-chiptunes-with-sid-wizard):
| control | effect |
|---|---|
< > (Shift+,/.) | subtune tempo up/down; [ ] (Shift+:/;) second FunkTempo; C=+T toggle subtune FunkTempo |
$10 xx / $11 xx | set main single tempo / main FunkTempo |
$13 xx / $14 xx | set this track's single tempo / FunkTempo |
$12 xx / $15 xx | launch a tempo program for the tune / for this track |
orderlist $B0–$EF | single track tempo |
Tempo programs (C=+F7/C=+F8 table, Shift+T/Y to select) hold one tempo value $00–$7F per pattern row, so any repeating groove — not just two-value swing — can be written. Different tracks may run at different tempos. The Light player has no tempo programs; the Extra player allows "fast tempo" 0..2 (source: s-sid-wizard-manual).
The book adds the BPM arithmetic: at 4 lines per beat, BPM ≈ 3007.47 / (tempo × 4) on PAL, and a funktempo counts as the mean of its two values (0604 → 5). Tempo programs (C=+F7) take values up to $7F and roll over automatically; a tempo program selected from a pattern effect maps its rows onto the rows of that pattern (source: s-witchmaster-creating-chiptunes-with-sid-wizard).
The 1.6 charts print the arithmetic as lookup tables for tempos $01–$14 against 1–32 lines per beat, which is how you pick a tempo/row-height pair for a target BPM: on PAL, tempo 06 at 4 lines, tempo 08 at 3 lines and tempo 04 at 6 lines all give 125.31 BPM, tempo 05 at 5 lines gives 120.30, and the same tempo 06 at 5 lines on NTSC gives 119.65 (source: s-sid-wizard-charts-and-tables). The charts also name two effects that shift timing without touching tempo at all — $1D delays the whole track by a number of frames (20 ms each) and $1E delays a single note — a per-track or per-note nudge where FunkTempo would move every row (same source; compare defMON's per-channel speed column below).
Inside the tempo machinery (SW 1.97 player.asm)#
From m64's duet research (player.asm 1341–1384, 3586–3696, packdepack.inc; sources: s-duet-research-sidwizard, s-duet-research-sidwizard-deep):
- The runtime tempo table starts with the main tempo/funktempo pair (loaded from the subtune's funktempo bytes at init), then one pair per track, then the tempo programs. A plain byte = tempo for one row then advance; a byte with bit 7 = tempo (&
$7F) then loop — so a single tempo is just a one-byte looping program, and funktempo is a nibble pair written as two entries (hi plain, lo |$80) alternating for ever. A row lasts tempo &$7Fframes; the Normal player needs tempo ≥ 3. - Every subtune owns a funktempo pair at the module's tail; an untouched subtune carries
$86/$83— bit 7 on the left byte means single tempo, so that reads "tempo 6, with 3 parked for the dayC=+Ttoggles funktempo on". - Tempo programs are a saved thing with tight caps: the file stores only the programs (an empty tune saves zero tempo bytes); at most 62 programs, 32 bytes per program, and a total table of 119/113/107/101 bytes for the 1–4-SID formats. In the editor bit 7 is never typable (the loop marker is set by the packer),
INSinserts a$00row andDELcannot remove a terminator. - The tempo-program effects
$12/$15treat operand00as a no-op ("NO TEMPOPROGRAM 0") — program numbering starts at 1.
GoatTracker#
EXY = funktempo from a speedtable entry whose two bytes are the alternating tempos (09 06 corresponds to the old parameter $96; 24 18 is the same feel at 4× multispeed); it applies to all channels, and FXY with $83–$FF overrides the tempo on one channel (F00/F01 recall the funktempo values). Tempo 3 is normally the fastest, but a funktempo entry 02 02 with gate-off timer 1 in every instrument and pulse skipping disabled gives tempo 2 (source: s-goattracker-readme).
CheeseCutter#
Swing hides in the chord table: chord program 0 doubles as the swing-tempo program (a list of tick lengths), enabled by setting the song speed to 0 or 1 — from the editor or with sequence command F0/F1 (cheesecutter). Caveat from the site's own bug list: "Changing between swing tempo and regular tempo mid-song can mess the timing" (source: s-cheesecutter-guide).
defMON#
defMON has no groove list and no funktempo: every sequence step carries its own speed value, per channel, and the value is ticks − 1 (a 2 in the column means 3 ticks). Swing is therefore written by hand into the column — and because the columns are per channel, the drums can run 5 3 5 3 against a straight melody, with everything re-aligning at each sequence break (source: s-chipmusic-defmon-thread).
Under hardware sync that freedom narrows to one choice. The user-port adapter sends six pulses per two sequence steps, so a synced tune has to spend exactly 6 ticks on every two steps: 3+3 straight or 4+2 swung, and nothing else; tempo changes then have to come from the player-call rate rather than from the speed columns (source: s-defmon-wiki-sync-and-stereo).
The smallest possible swing#
In a 256-byte player there is no tempo table to hold two values. A tiny-sid-compo entry does it in one instruction instead: "Note duration are triggered between 2 values during the play" — the duration byte is XORed with a constant ($39 = $08) after every note, so successive notes alternate long, short, long, short (source: s-sidin12-tiny-sid-2-part-3). That is funktempo reduced to its definition.
LSDj#
Grooves are the native mechanism: each groove lists how many ticks every phrase (or table) step lasts. Groove 0 defaults to 6/6; 8/5 makes even steps last 8 ticks and odd steps 5 — swing; other lists give triplets and complex rhythms. In the groove screen A+UP/DOWN changes the swing percentage while keeping the total ticks, so the song speed stays constant (6/6 = 50 % → 7/5 = 58 %). Gxx selects a groove in a phrase or a table (SELECT+DOWN on it edits the groove); tables can run their own groove for rhythmic envelopes. The T tempo command is exact only for 6-tick grooves — otherwise use bpm = desired × ticks/step ÷ 6 — and sync modes expect 6-tick grooves (source: s-lsdj-manual).
Grooves also solve arrangement problems: to shorten the gap between a kick and the bass note that follows it, give the row pair its own groove — in defense-mechanism's example the first tick count of groove 10 is how long the kick lasts and the second how long the bass lasts, "No fancy kick transposition needed!" (source: s-intense-tech-10-kicks-part-1).
Defense Mechanism's groove practice (sources: s-intense-tech-06-groove-and-tick-tricks-part-1, s-intense-tech-07-groove-and-tick-tricks-part-2): a tick is the smallest time unit, its length set by the tempo; a G on a line makes that line last the groove's first value and the following lines the next values. Hypnogram's convention — grooves 01–0C set to 1…12 ticks so G03 reads "three ticks per line", 10–1F for custom feels (G10 = 7/5) — keeps commands legible. Swing lives per channel: 7/5 on the wave channel (kick and bass) against 6/6 elsewhere sits "in-between swung and straight"; 8/4 and 9/3 swing harder; 8/5/7/4 mixes two feels in 24 ticks for a human lead; 3/9 (or 3/9/6/6) makes room for note bends or a three-tick kick before a bass note. LSDj 6 restarts a groove on a repeated G, older versions do not. A 3-tick groove doubles phrase resolution at half the phrase length — H gives it back (H71 = hop to line 1 seven times). Triplets: G08 (8 ticks = 24 ÷ 3) for the three notes, then H00 to skip the last 6-tick line so the next phrase lands on the beat; 3/4 time can be a groove alone (a trick from Zef). Tables take grooves too (2 or 3 ticks for arps and duty changes), and Hop + Groove inside a table gives Hypnogram's dramatic "Zenarchy" sound. Mrwimmer's version of the same idea: G01 on a table's first line with groove 01 = 2/2 halves an arpeggio's speed without doubling rows (source: s-chipmusic-tables-and-chords-threads); aphasia's live tip: with a MIDI keyboard, the lowest possible groove and a high tempo minimise quantisation (source: s-chipmusic-lsdj-faq).
Tempo is not BPM (source: s-painperdu-06-grooves). The TEMPO field sets the tick rate; the groove decides how many ticks a step lasts, so the groove is what sets the musical speed and the feel. Picture the song as an hourglass: "tempo says how fast they will fall, but grooves say how many of them will be in each note" — hold TEMPO at 255 and the music still speeds up, slows down and changes feel as the grooves change. Consequences worth keeping:
- A 16-step phrase is a bar only at groove
6; at grooveC(12 ticks) it is half a bar, at groove3two bars. A ternary bar is 12 steps, not 16, so end it with anHhop. - A groove needs only one value if the speed is constant — the list wraps. A longer list is a per-step tempo map:
12 6 12 6 6 6 2 3is two long notes, two short, two long, and so on, and nothing stops you writing1 6 3 4 F Afor experimental work. - Grooves are per channel, so pulse 1 can run at groove
3while the wave channel runs at6— as long as the tick totals match (eight phrases at3= four phrases at6), "at the end of the day they still sing together". - Triplets by arithmetic: double the tempo and the groove together to keep the BPM (groove
C= 12 ticks), then run the triplet channel at groove8— 12 ÷ 3 × 2. - Tables take grooves too, and that is the space saver: "by default tables run at one tick per step", so a
Gin a table halves what a slow arpeggio costs and lets a percussion table pack more commands into the same time. Pain Perdu credits the trick to Joe Toye of Chiptune Belgium; Mrwimmer describes the same thing above.
Three more things pain-perdu does with grooves, from the walkthroughs:
- The groove reaches into the instruments. A wave-synth instrument's SPEED is ticks per wave frame, so it should be set to the groove's tick count: at groove
6/6, SPEED6puts exactly one wave frame on every step — "this is relevant to the groove, so if you're in groove5 5this is going to be5, for groove7 7this is going to be7" (source: s-painperdu-02-wav-channel-walkthrough; wavetable-programming). - The groove is a resolution knob, not only a feel. For a sidechain recovery, halving the groove to
3makes each step a 32nd, so the same twoEcommands recover twice as fast — "it's almost as if you hear the bass being triggered at the same time as the kick, but this is an illusion being made possible by the fast groove" (source: s-painperdu-04-sidechaining). - Two grooves at once, with the hop that keeps them honest. A chord section at groove
C C(12 ticks per step) against another channel at groove2"time together perfectly, you just have to be a bit of math" — six to one — but the fast channel needs anHhop at the end of its phrase or the two do not land together. In the same song the tempo itself is written as a curve, a newTvalue per phrase from100up through142and150to180and back down to80: "each phrase I'll have a new tempo that goes slightly up very organically … this was really painstaking … [but it] really pays off".Taffects the whole song from whichever channel carries it, so it goes on the second tick of a phrase when aGhas taken the first (source: s-painperdu-03-isometric-sav-walkthrough; arrangement).
defense-mechanism's 2024 version of the kick-into-bass groove is two instruments and two grooves: a wave kick and a separate 808 bass, with a groove of 3 9 — "I want this kick to play for three ticks and then the bass for the next nine" — and a second groove 3 9 6 so the following bar's timing works, returning to groove 0 after. It costs two groove slots and buys independent control of both sounds, plus the W command for how fast the bass decays (source: s-defensemech-every-lsdj-kick; the values are spoken over an auto-transcribed video and are (unverified); instrument-design).
Since version 8 the Z command also randomises a preceding G, so a phrase can switch between a straight and a swung groove by chance — Defense Mechanism expected "very interesting rhythmic consequences" (source: s-intense-tech-14-lets-appreciate-version-8); see randomization-and-probability.
PC trackers#
Necros in 1995 (source: s-tw012-advanced-tracking-tips): the Amiga funk "floating tempo" alternates speeds row by row — A08 on the even rows, A05 on the odd — so the off-beat rows arrive late; the resulting average speed is 1 ÷ ((1/8 + 1/5) ÷ 2), "a bit slower than A06", and the swing amount is coarse. His refinement: alternate fine tempos instead, T60/T90 or T70/T9A, the first about two thirds of the second for a medium swing (his "Realization 2"); experiment from there. Dan Hartrell swings a sax run with A05/A08 (source: s-tw021-tracking-tips).
Alternating Axx speed commands row by row (e.g. speed 7 / speed 5) is the classic method in ST3/IT — every format's speed command can do it (Fxx below 20 in MOD/XM, Axx in S3M/IT), and IT/MPTM also extend single rows by ticks with S6x (XM: the X6x hack) (source: s-openmpt-manual-effect-reference). openmpt's MPTM format replaces the trick with Tempo Swing: in Modern tempo mode a slider per row of the beat lengthens or shortens that row, globally or per pattern; the rows always add up to the tempo, the swing survives tempo changes, plugins get a steady clock and no tempo commands litter the patterns (source: s-openmpt-manual-song-properties). ProTracker's speed is either VBlank ticks or CIA BPM, and FT2's "BPM is correct at speed 06" (sources: s-protracker-23d-help, s-ft2-manual).
Tips & pitfalls#
- Keep the average tempo: 7/5 swings the same bar length as 6/6.
- Strong-beat logic still applies (rhythm-and-groove); shuffle just moves the weak rows later.
- A swung song is a swung clock. Chip sync is counted in steps, not milliseconds: LSDj as master puts a pulse on the link port for every step, so a divider chain downstream inherits whatever groove the song is running (source: s-little-scale-syncing-things-to-lsdj; derived from the divider ratio there), LSDj's own sync modes expect 6-tick grooves, and defMON's adapter fixes 6 ticks per 2 steps. Plan the swing before the rig:
4+2is available under sync,7/5is not.
Related#
rhythm-and-groove · orderlist · sid-wizard · lsdj · defmon · sync · multispeed · tiny-sid-compo
Sources#
s-037-lab · s-sid-wizard-manual · s-witchmaster-creating-chiptunes-with-sid-wizard · s-goattracker-readme · s-intense-tech-10-kicks-part-1 · s-intense-tech-06-groove-and-tick-tricks-part-1 · s-intense-tech-07-groove-and-tick-tricks-part-2 · s-chipmusic-tables-and-chords-threads · s-chipmusic-lsdj-faq · s-openmpt-manual-effect-reference · s-openmpt-manual-song-properties · s-protracker-23d-help · s-ft2-manual · s-tw012-advanced-tracking-tips · s-tw021-tracking-tips · s-intense-tech-14-lets-appreciate-version-8 · s-cheesecutter-guide · s-duet-research-sidwizard · s-duet-research-sidwizard-deep · s-lsdj-manual · s-painperdu-06-grooves · s-defmon-wiki-sync-and-stereo · s-chipmusic-defmon-thread · s-sidin12-tiny-sid-2-part-3 · s-sid-wizard-charts-and-tables · s-painperdu-02-wav-channel-walkthrough · s-painperdu-03-isometric-sav-walkthrough · s-painperdu-04-sidechaining · s-defensemech-every-lsdj-kick · s-little-scale-syncing-things-to-lsdj