Split kit and keys; KEYS GEN with MOTIF, 303, TURING, ARP
Some checks failed
check / check (push) Has been cancelled

- genome(seed, salts) now has three parts with their own RNG streams:
  shared (steps, form, swing, arc, layback, fill odds, phase offset),
  kit (density, frame, accent cycle, free snare) and keys (scale/root,
  progression, motif, hocket, bass tone, note lengths, range). ROLL KEYS
  now renews the harmony too; ROLL KIT leaves the keys alone.
- Keys generators share one signature and can fix note lengths:
  MOTIF (the old line), 303 (acid bass, answers in the rests, drone or
  silent pad), TURING (8/16-bit shift register, DRIFT flips bits, 16-bar
  window), ARP (triad/7th arpeggio, roots on kicks).
- Pages: KIT GEN, KEYS GEN; ROLL shows KIT / KEYS; slots keep both gens.
- Flash record v3 (old settings ignored). Bring-up golden checksums updated.
- C port matches; host test and ASan/UBSan pass.

Intended music change: every seed sounds different (genome split, new
generators). Vectors regenerated with npm run vectors; the case grid now
crosses all kit and keys generators, with TURING runs past its window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 21:50:41 +03:00
parent c2c8a55642
commit 346c820b10
26 changed files with 64270 additions and 42622 deletions

View File

@@ -24,17 +24,13 @@ The synth runs in poly mode on one channel, so bass, melody and pad share one vo
## The genome
`genome(seed)` picks, once per seed:
`genome(seed, salts)` picks, in three parts. Each part has its own random stream, so ROLL KIT and ROLL KEYS each renew one half only.
- **steps**: 16 most of the time, sometimes 12, 14 or 20 (bar length = steps × 16th)
- **form**: AAAB, AABA, ABAB, AAAA, ABAC or ABAA over a 4-bar phrase
- **scale and root**: any of the 21 scales below, any root. The ROOT and SCALE pages override them; AUTO keeps the seed's pick.
- **progression**: one chord root per bar of the phrase (e.g. i–vi–iv–v)
- **frame**: where the main kick and snare live (below)
- **swing**: none, light, medium, heavy or triplet feel
- **arc**: flat, build (bars 1–2 thin out) or break (bar 3 strips back)
- **accent cycle**: off, or an accent every 3, 5 or 7 sixteenths running across the bar line
- **motif length** (3–5 notes), **hocket mask**, **bass degree**, **melody phase offset**, **layback** (snares sit a little late), densities, fill odds
| Part | Renewed by | Picks |
|---|---|---|
| shared | SEED | **steps** (16 mostly; 12, 14 or 20), **form** (AAAB, AABA, ABAB, AAAA, ABAC, ABAA), **swing** (none to triplet feel), **arc** (flat, build, break), **layback** (snares sit late), melody/perc phase offset, fill odds |
| kit | SEED, ROLL KIT | kit density, **frame** (below), **accent cycle** (off, or every 3, 5 or 7 sixteenths across the bar line), free-snare settings |
| keys | SEED, ROLL KEYS | **scale and root** (any of the 21 below; the ROOT and SCALE pages override them), **progression** (one chord root per bar, e.g. i–vi–iv–v), keys density, motif length, hocket mask, bass colour tone, note-length style, range |
### Frames
@@ -81,7 +77,7 @@ Bass, melody and pad follow the scale. Chords stack every other scale note, so t
## Generators
Selected on the GEN page. They only change the kit; the synth tracks are the same for all of them.
Kit generators, selected on the KIT GEN page.
- **EUCLID**: Euclidean rhythms. Kick E(k,n) with a rotation that keeps the one, hats and perc often on their own cycle length (polymeter).
- **SKELETON**: the frame, plus a few kick moves and hat patterns. The most "drummer-like".
@@ -89,6 +85,21 @@ Selected on the GEN page. They only change the kit; the synth tracks are the sam
- **AUTOMATA**: a 1-D cellular automaton decides the hits inside the frame.
- **AMENIZER**: the four bars of the Amen break, velocities included, with its own humanising and chopping (below).
## Keys generators
Selected on the KEYS GEN page. All of them follow the bar's chord in the current scale and are split over BASS, MEL A, MEL B and PAD.
| Name | BASS | MEL A / B | PAD |
|---|---|---|---|
| **MOTIF** | the chord root on the kicks, a colour tone on alternate kicks, an approach note into the next bar | a 3–5 note motif stated and answered, hocket split | the bar's triad |
| **303** | a 16-step acid line looped over the bar: gates, accents, octave jumps, slides; moves with the chord root | 1–2 note answers in the bass's rests | silent, or a drone on the key's root |
| **TURING** | the chord root wherever the shift register's bit 0 is set; another bit lifts it an octave | the register read as a scale degree, hocket split | the bar's triad |
| **ARP** | the chord root on every kick | the chord (triad or 7th) arpeggiated up, down, up-down or shuffled, alternating A / B | the arpeggio's chord |
- **303**: ENERGY opens more gates. DRIFT variants flip accents, slides and octaves. A slide is a note held into the next one; whether it glides is up to the synth's glide or legato setting.
- **TURING**: an 8- or 16-bit register stepping every 16th. DRIFT flips the bit coming round (0 = locked loop, a quarter of the knob ≈ one flip a bar). Flips stick for 16 bars, then fall away.
- **ARP**: 8ths at low density, 16ths at high, and 16ths in fill bars.
## Sections
The form says which bars are A, B or C. B and C are transformations of A rather than new patterns, so the phrase hangs together. The transforms: kick answer, hat doubling, thin the first half, perc shift, ghost pickups, snare drag, drop the one, half-time switch.