From d4a1b7142735420125abbf6057c6425b9e65dedf Mon Sep 17 00:00:00 2001 From: type-two Date: Thu, 9 Jul 2026 19:40:10 +1000 Subject: [PATCH] =?UTF-8?q?=E2=AC=A2=20Euclidean=20fills=20=E2=80=94=20the?= =?UTF-8?q?=20world's=20oldest=20rhythms,=20from=20the=20arithmetic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Live 12's Euclidean generator (manual §11.3.5) on the groove grid: spread N pulses as evenly as possible over the pattern, with adjustable steps (cycle length) and rotation, tiled into the 16-step grid. E(3,8) tresillo, E(5,8) cinquillo, E(4,16) four-on-the-floor — one control fills any groove or gate lane (note lanes fill the root). Verified live: E(4,16)→[0,4,8,12], E(3,8)→[0,3,6,8,11,14], E(5,16)→[0,4,7,10,13]. Self-check guards the canonical patterns. Grimoire + integrated manual updated to match. Co-Authored-By: Claude Opus 4.8 --- GODSTRUMENT_MANUAL_SOURCE.md | 3 +- viz/index.html | 56 +++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/GODSTRUMENT_MANUAL_SOURCE.md b/GODSTRUMENT_MANUAL_SOURCE.md index 91288b1..f011ca0 100644 --- a/GODSTRUMENT_MANUAL_SOURCE.md +++ b/GODSTRUMENT_MANUAL_SOURCE.md @@ -538,7 +538,7 @@ Learn these seven gestures and the whole planet is under your hands: - **Press `T` — tracks, for making actual songs.** A conventional tracks-and-clips view for anyone who finds the cathedral overwhelming: every voice is a **track**, eight **bars** run across, and each cell cycles **● live** (the world plays that lane) → **A** → **B** → **C** (clip patterns on the groove grids — A and B come pre-seeded so it makes music immediately) → **silent**. Double-click any clip to edit its groove in the piano roll. Press **▶** and the arrangement loops on the godtime clock — the planet still plays *through* your song, because live lanes stay wired to the world. Arrangements **save with your patch**, play out over MIDI like everything else, and **export .mid** hands you a Standard MIDI File of the note lanes to drag into Ableton, Logic, anything. Not a DAW — a sketchpad where the world sits in on your session. The panel earns its keep like one, too: a **🎛 tracks button** sits bottom-right always; **drag the panel's top edge to resize** (remembered); the top bar **tabs between clips and grooves** — the grooves tab is a full-size pattern editor (pick a track, pick a letter, big piano roll or 16 steps; double-clicking any clip jumps you straight there); and **right-click any track name for that voice's full routing menu** — every cable, every level, patch and unpatch without leaving the panel. -- **The Groove — one feel for the whole pattern.** The grooves tab carries Ableton's Groove Pool, reduced to the 16-step grid: **swing** lays the off-beats back, **humanize** is a touch of random timing so nothing is machine-stiff, **velocity** lets each hit breathe in loudness, and an **amount** master scales the lot — with one-click presets (*straight, swing 16, MPC 8-4, drunk*). Under the roll sit two expression lanes: **velocity** (how hard each step hits) and **chance** (how likely each step fires at all — drop a step to 40% and it plays four times in ten, so the loop varies itself). The feel and the per-step shaping **save with your patch**. +- **The Groove — one feel for the whole pattern.** The grooves tab carries Ableton's Groove Pool, reduced to the 16-step grid: **swing** lays the off-beats back, **humanize** is a touch of random timing so nothing is machine-stiff, **velocity** lets each hit breathe in loudness, and an **amount** master scales the lot — with one-click presets (*straight, swing 16, MPC 8-4, drunk*). Under the roll sit two expression lanes: **velocity** (how hard each step hits) and **chance** (how likely each step fires at all — drop a step to 40% and it plays four times in ten, so the loop varies itself). The feel and the per-step shaping **save with your patch**. And any lane takes a **⬢ Euclidean fill** — say how many *pulses* to spread across the steps and they distribute themselves as evenly as possible (E(3,8) is the tresillo, E(5,8) the cinquillo, E(4,16) four-on-the-floor), with *steps* and *rotate* to taste: the oldest rhythms of the world fall straight out of the arithmetic. - **⤳ Follow actions — the song composes itself.** Give any clip (A/B/C) a **follow action** in the grooves tab — *play again, next, any, any other, stop* — with a **chance**, and once the arrangement is playing that clip can hand off to another at the bar line instead of just repeating. Set two clips to "any other" and they trade the lane back and forth; sprinkle a low-chance divert and the piece drifts. As Ableton's manual puts it, "structures that repeat but can also be surprising… never exactly repeat." A ⤳ marks any clip that can divert. Nothing changes for arrangements without follow actions — they loop exactly as written. @@ -971,3 +971,4 @@ Every feed the world sends is one of eight temperaments; the shape dictates how - **The Groove** — Ableton's Groove Pool on the 16-step grid: `swing` (delays the off-beats), `humanize` (the manual's Random timing jitter), `velocity` (per-note deviation), and an `amount` master (0..130%). Presets: straight / swing 16 / mpc 8-4 / drunk. Applied globally in the clock + `seqTick`; travels with the patch. - **Per-step expression** — a `velocity` lane (how hard each step hits) and a `chance` lane (0..100% probability the step fires) under the piano roll, per voice. Drop a step's chance and the loop varies itself. - **⤳ Follow Actions** — each arranger clip (A/B/C) can hand off to another at the bar line by chance: again / next / any / any-other / stop. A live overlay diverts playback without rewriting the authored grid; arrangements with no follow actions loop exactly as written. Turns an 8-bar loop into a self-composing structure. +- **⬢ Euclidean fills** — Live 12's Euclidean generator (§11.3.5): spread N `pulses` as evenly as possible over the pattern, with adjustable `steps` (cycle length) and `rotate`. E(3,8) tresillo, E(5,8) cinquillo, E(4,16) four-on-the-floor — the world's oldest rhythms falling straight out of the arithmetic. Fills any groove or gate lane. diff --git a/viz/index.html b/viz/index.html index ba89bb9..b392e20 100644 --- a/viz/index.html +++ b/viz/index.html @@ -197,6 +197,8 @@ #arranger .gctl input[type=range] { width: 74px; accent-color: #7fa0e6; height: 3px; } #arranger .gctl .gval { color: #aebbdc; font-size: 10px; min-width: 30px; } #arranger .gpreset { font-size: 10px; padding: 2px 7px; opacity: 0.85; } + #arranger .eunum { width: 44px; background: rgba(20,26,40,0.8); color: #cfe0f5; + border: 1px solid rgba(120,150,220,0.3); border-radius: 4px; font-size: 11px; padding: 1px 4px; } #arranger .emrow { gap: 6px; align-items: center; margin-top: 4px; } #arranger .exprlane { display: grid; grid-template-columns: repeat(16, 26px); gap: 3px; margin: 4px auto 8px; height: 52px; align-items: end; } @@ -954,7 +956,7 @@
  • One Source, many Spirits, one Matter. That is the whole architecture: the Source is the world's data, the same for everyone; the Spirit is the skin — the belief system through which you read it; the Matter is the sound. Choose your spirit, and the same planet plays through it. The shelf so far, each rendered from its own published lore, literally and without frills: the Tree of Life (Hermetic Qabalah, Golden Dawn attributions — ten sephirot on three pillars, all twenty-two canonical paths, Mercury's data at Hod, the Moon's at Yesod, the body of the world at Malkut); the Lodge (from published Masonic sources only — Worshipful Master in the East, Wardens West and South, the North dark, Boaz and Jachin at the porch where your own hands stand as the candidate, the Blazing Star, the Volume of the Sacred Law as humanity's open book, and music given to the South, for Beauty holds the arts); the Hermetic ladder of the seven planetary gates, lead to silver; Yggdrasil and its nine worlds, the dwarves keeping the markets in Nidavellir; the Sufi lata'if, where the wind data literally breathes at Ruh, spirit-as-breath; and the Wu Xing, five phases in their generating ring and controlling star, the metal birds of the air routed to Metal; and the Spread — the Celtic Cross of the tarot (Waite's published layout), dealt live and never finished: the heavens in what crowns you, the deep debts and quake-roots in what is beneath you, the retrogrades in what is behind you, births and seasons in what is before you, money and fire in your hopes and fears — and your own hands in the Querent's place, because you are the one asking. Right-click the sky → skin to turn the wheel of traditions. Each map stands as its true figure — the Tree as a tree, the Lodge as a lodge — and every station opens into mind mode with its own scale under your hands. Newest on the shelf: the wheel — the astrologer's own view, twelve signs in a circle with 0° Aries at the ascendant's place, every feed routed to its sign by traditional rulership (wildfires to Aries, your holdings to Taurus, the word to Gemini, the far-travelling planes to Sagittarius…), the live planets riding the rim, your natal chart on the inner ring, and the aspects drawn as chords across the circle — red the squares and oppositions, green the trines and sextiles, gold the conjunctions, dashed where the living sky strikes your natal points. And everywhere else, those same aspects now draw as faint cables between the planets' own spheres in any skin — the sky's geometry made visible in whatever cosmology you're standing in. And every Spirit now speaks its own tongue: the sephirot in Hebrew (כתר, חכמה, בינה…), the chakras in Devanagari (सहस्रार, अनाहत…), the lata'if in Arabic (قلب, روح, سر…), the nine worlds in Old Norse (ásgarðr, miðgarðr, helheimr…), the planetary gates in their glyphs (☽ ☿ ♀ ☉ ♂ ♃ ♄), the five phases in their characters (木 火 土 金 水). The lore, in the letters it was written in. Two more Spirits joined the shelf: the runes — the Elder Futhark, all twenty-four in the Kylver-stone row, ringed as a rune-band, every feed seated by its rune-poem meaning (wealth's strife at ᚠ fehu, Odin's word at ᚨ ansuz, the giant's blow at ᚦ thurisaz for the quakes, need's narrow band at ᚾ nauthiz for hunger and want, the lot-cup ᛈ perthro holding your natal fate, and your raised hands at ᛉ algiz, the warding rune that is itself a figure with arms lifted); and the Wheel of the Year — the eight Celtic festivals at their true solar longitudes (the astronomical reckoning: quarters at the equinoxes and solstices, cross-quarters at fifteen degrees of the fixed signs), deaths and the deep things at Samhain where the veil thins, births at Imbolc, the fires and the dance and the bond at Beltane, the great fair of commerce and chatter at Lughnasadh — with the live sun walking the rim, showing exactly where the year stands today. Honesty note kept from the scholarship: the unified eightfold wheel is a modern synthesis of the attested Irish fire festivals and older solstice customs — true lore, honestly labeled. And newest of all, the first Spirit with no temple: the artist — Kandinsky's Concerning the Spiritual in Art (1911) taken at its word, his colour-sound table rendered as a wireframe easel. Six pigments squeezed round the palette — gelb the trumpet blown louder and louder (the news, the markets' mania), orange the Angelus bell (the clocks, the hours), rot the drumbeat (your heartbeat, the quakes, the flame), grün the violin's placid middle strings (the weather at rest), blau deepening from flute toward the organ (the whole heavenly circle), violett the bassoon (the retrogrades, Saturn, the sorrows) — with weiß, the great silence pregnant with possibility, waiting as the canvas itself (your unpainted chart lives there, and your own hands hold the brush), and schwarz, the pause after which nothing follows, at the palette's edge with the deaths and the debt. His four great contrasts strung dashed between the drops, and as each colour's data sings, its paint strokes itself up onto the canvas — the world painting, live. Labels in German, the tongue he wrote it in. And beside the easel now hangs the bagua — the I Ching's eight trigrams in the King Wen "Later Heaven" ring, south at the top as the old compasses have it, every feed seated by the Shuogua's own attributions: the earthquakes at ☳ zhèn, the trigram that literally means thunder-shock; the word at ☱ duì, for "Dui is the mouth and tongue"; the moon's data at ☵ kǎn, the sun's at ☲ lí; and your own hands at ☶ gèn, for the Shuogua says plainly: Gen is the hand. And at the centre, the oracle never rests: the two loudest trigrams of the moment stack into a live hexagram — the strongest below as the ground of the moment, the second above — drawn line by line in their own colours and named from all sixty-four by the King Wen table, re-cast as the world's weather shifts. When the planet falls silent it settles at hexagram 11, Peace: heaven below, earth above. The book that reads itself, forever.
  • The groove grids — sequence the voices. Open any voice's tab (shift-click it) and there's a 16-step grid on the godtime clock. The note voices (lead, bass) get a mini piano roll — eight rows of minor pentatonic, click to place a note, click again to clear — and while your groove is on, your melody replaces the data's: bitcoin lets go of the lead and you take it. Every other voice gets an 808-style gate row that rhythmically chops the world's signal — the reverb, the grit, the percussion breathing in your pattern while the planet still decides how hard. Grooves ride the godtime tempo (lock the dial, or let your heart drive it), and they save with your patch. And the sources get the grid too, with a different power: sample & hold — while a source's groove is on, the world's number is only sampled on your lit steps and held between them, so a smooth drifting feed becomes stepped, rhythmic, quantized in time. Bitcoin arpeggiating in your pattern. The wind as a sequence. If an out port is chosen in ⚙, godtime also sends MIDI clock (24 ppqn), so a DAW can slave its tempo to the planet — or to your pulse. And the grids play outward too: with an out port chosen, piano-roll notes go out as real MIDI on the lead and bass channels (each note one sixteenth long), and the mind-mode console plays on its own third channel — so your grooves and your chakra-scale jams drive Ableton, Strudel, or hardware exactly as they drive the built-in synth. The three mouths drink at once: ♪ for the browser synth, the out port for MIDI, both or neither — there is no switch, only where you point the sound.
  • Press T — tracks, for making actual songs. A conventional tracks-and-clips view for anyone who finds the cathedral overwhelming: every voice is a track, eight bars run across, and each cell cycles ● live (the world plays that lane) → ABC (clip patterns on the groove grids — A and B come pre-seeded so it makes music immediately) → silent. Double-click any clip to edit its groove in the piano roll. Press and the arrangement loops on the godtime clock — the planet still plays through your song, because live lanes stay wired to the world. Arrangements save with your patch, play out over MIDI like everything else, and export .mid hands you a Standard MIDI File of the note lanes to drag into Ableton, Logic, anything. Not a DAW — a sketchpad where the world sits in on your session. The panel earns its keep like one, too: a 🎛 tracks button sits bottom-right always; drag the panel's top edge to resize (remembered); the top bar tabs between clips and grooves — the grooves tab is a full-size pattern editor (pick a track, pick a letter, big piano roll or 16 steps; double-clicking any clip jumps you straight there); and right-click any track name for that voice's full routing menu — every cable, every level, patch and unpatch without leaving the panel.
  • -
  • The Groove — one feel for the whole pattern. The grooves tab carries Ableton's Groove Pool, reduced to the 16-step grid: swing lays the off-beats back, humanize is a touch of random timing so nothing is machine-stiff, velocity lets each hit breathe in loudness, and an amount master scales the lot — with one-click presets (straight, swing 16, MPC 8-4, drunk). Under the roll sit two expression lanes: velocity (how hard each step hits) and chance (how likely each step fires at all — drop a step to 40% and it plays four times in ten, so the loop varies itself). The feel and the per-step shaping save with your patch.
  • +
  • The Groove — one feel for the whole pattern. The grooves tab carries Ableton's Groove Pool, reduced to the 16-step grid: swing lays the off-beats back, humanize is a touch of random timing so nothing is machine-stiff, velocity lets each hit breathe in loudness, and an amount master scales the lot — with one-click presets (straight, swing 16, MPC 8-4, drunk). Under the roll sit two expression lanes: velocity (how hard each step hits) and chance (how likely each step fires at all — drop a step to 40% and it plays four times in ten, so the loop varies itself). The feel and the per-step shaping save with your patch. And any lane takes a ⬢ Euclidean fill — say how many pulses to spread across the steps and they distribute themselves as evenly as possible (E(3,8) is the tresillo, E(5,8) the cinquillo, E(4,16) four-on-the-floor), with steps and rotate to taste: the oldest rhythms of the world fall straight out of the arithmetic.
  • ⤳ Follow actions — the song composes itself. Give any clip (A/B/C) a follow action in the grooves tab — play again, next, any, any other, stop — with a chance, and once the arrangement is playing that clip can hand off to another at the bar line instead of just repeating. Set two clips to "any other" and they trade the lane back and forth; sprinkle a low-chance divert and the piece drifts. As Ableton's manual puts it, "structures that repeat but can also be surprising… never exactly repeat." A ⤳ marks any clip that can divert. Nothing changes for arrangements without follow actions — they loop exactly as written.
  • 📽 The stage — send the visual to any screen. Right-click the sky → the stage and a clean black mirror window opens, fed live from the canvas. Drag it to a projector, an AirPlay display, a second monitor — macOS treats it like any window — and double-click for fullscreen. The stage has a camera: the whole view by default (whatever you're in — a skin, the wheel, mind mode's POV), or right-click any node → project this node and the camera glides after that one sphere through its orbits, or project its station to frame a whole wheel and its satellites. Change cameras live from the menus while the projector runs; the audience sees the camera breathe from subject to subject.
  • 🕸 The commune — play together, properly. Right-click the sky → the commune. This is for signed-in players: your session rides the connection, so the hub knows exactly who everyone is — no impostors, no setup, no Bluetooth. One of you hosts: name the room, then ✉ invite the others by their username (they must be on the site — invitations reach the present). The invited see the invitation arrive live and join or decline; anyone may leave whenever they wish, and if the host leaves, the room closes with them. Then the sections: members claim voices (right-click any voice, or the panel's picker), or the host allocates them — this bass to her, those pads to him, the godtime itself to whoever conducts — and the hub enforces it: only the section's holder can speak for it. From that moment your levels, mutes, grooves and arranger lanes for what you hold follow your hands on every screen, same living room or opposite sides of the earth. The world — the Source — stays identical for everyone, because it always was. Three people, one planet, one instrument.
  • @@ -1289,6 +1291,21 @@ const groove = Object.assign({ amount: 1, preset: "straight" }, GROOVE_PRESETS.straight); let arrExprMode = "none"; // grooves-tab expression lane: none|velocity|chance let seqRawStep = -1, seqStepOnset = 0; // swing/humanize onset within the current 16th + // Euclidean rhythms (Live 12 MIDI Generators §11.3.5): spread `pulses` hits as + // evenly as possible over `len` steps, then tile + rotate into the 16-step grid. + // E(3,8) tresillo, E(5,8) cinquillo, E(4,16) four-on-floor — cosmic math as beat. + const euclidP = { pulses: 5, len: 16, rot: 0 }; + function euclidHit(i, pulses, len) { // Bresenham even-distribution (maximally-even, = Euclidean up to rotation) + return Math.floor(i * pulses / len) !== Math.floor((i - 1) * pulses / len); + } + function euclidFill(dst, pulses, len, rot, isNote) { + pulses = clamp(Math.round(pulses), 0, len); + for (let i = 0; i < 16; i++) { + const j = (((i - rot) % len) + len) % len; + const hit = pulses > 0 && euclidHit(j, pulses, len); + dst[i] = hit ? (isNote ? 0 : 1) : (isNote ? -1 : 0); // note lanes fill the root; gates fill 1 + } + } let midiClockPhase = 0; // 24-ppqn accumulator for MIDI clock out const SEQ_ROWS = [0, 3, 5, 7, 10, 12, 15, 17]; // minor pentatonic, two octaves, low->high const seqRootFor = (key) => /bass/.test(key) ? 36 : 60; @@ -1589,6 +1606,31 @@ fr.appendChild(fhint); body.appendChild(fr); + // --- Euclidean fill (§11.3.5): spread N pulses evenly across the pattern --- + const euRow = document.createElement("div"); euRow.className = "arow grow"; + const euL = document.createElement("span"); euL.className = "glbl"; euL.style.minWidth = "auto"; euL.textContent = "⬢ euclid"; + euRow.appendChild(euL); + const mkEuNum = (label, get, set, min, max) => { + const w = document.createElement("span"); w.className = "gctl"; + const l = document.createElement("span"); l.className = "glbl"; l.style.minWidth = "auto"; l.textContent = label; + const n = document.createElement("input"); n.type = "number"; n.min = String(min); n.max = String(max); + n.value = String(get()); n.className = "eunum"; + n.oninput = () => { set(clamp(Math.round(+n.value || 0), min, max)); + euclidFill(steps, euclidP.pulses, euclidP.len, euclidP.rot, nSel.isNote); paintG(); }; + w.appendChild(l); w.appendChild(n); + return w; + }; + euRow.appendChild(mkEuNum("pulses", () => euclidP.pulses, v => euclidP.pulses = v, 0, 16)); + euRow.appendChild(mkEuNum("steps", () => euclidP.len, v => euclidP.len = v, 2, 16)); + euRow.appendChild(mkEuNum("rotate", () => euclidP.rot, v => euclidP.rot = v, 0, 15)); + const euBtn = document.createElement("button"); euBtn.className = "midibtn"; euBtn.textContent = "fill"; + euBtn.onclick = () => { euclidFill(steps, euclidP.pulses, euclidP.len, euclidP.rot, nSel.isNote); paintG(); }; + euRow.appendChild(euBtn); + const euHint = document.createElement("span"); euHint.className = "albl"; + euHint.textContent = "spread the pulses evenly — E(3,8) tresillo · E(5,8) cinquillo · E(4,16) four-on-floor"; + euRow.appendChild(euHint); + body.appendChild(euRow); + const steps = arrBank(arrSelKey, nSel.isNote)[arrSelLetter]; const rows = nSel.isNote ? SEQ_ROWS.length : 1; const grid = document.createElement("div"); @@ -2190,6 +2232,18 @@ Math.random = _rnd; if (_hadF) arr.follow["__t"] = _f; else delete arr.follow["__t"]; if (_hadG) arr.grid["__t"] = _g; else delete arr.grid["__t"]; + // euclidean generator — canonical patterns + const eu = new Array(16).fill(9); + euclidFill(eu, 3, 8, 0, false); + if (eu.slice(0, 8).join("") !== "10010010") f.push("euclid-tresillo"); // E(3,8) + euclidFill(eu, 4, 16, 0, false); + if (eu.join("") !== "1000100010001000") f.push("euclid-4onfloor"); // E(4,16) + euclidFill(eu, 0, 16, 0, false); + if (eu.some(x => x !== 0)) f.push("euclid-empty"); // no pulses = silent + const er0 = new Array(16), er1 = new Array(16), erN = new Array(16); + euclidFill(er0, 3, 8, 0, false); euclidFill(er1, 3, 8, 1, false); euclidFill(erN, 3, 8, 8, false); + if (er0.join("") === er1.join("")) f.push("euclid-rot-shift"); // rot 1 changes it + if (er0.join("") !== erN.join("")) f.push("euclid-rot-cycle"); // rot=len is identity if (f.length) console.error("⚠ groove self-check FAILED:", f); else console.log("✓ groove self-check passed"); return f.length === 0; }