diff --git a/viz/index.html b/viz/index.html index 5a4e74e..cd948b3 100644 --- a/viz/index.html +++ b/viz/index.html @@ -234,6 +234,17 @@ .seqcell:hover { background: rgba(140,170,220,0.45); } .seqcell.on { background: #78a0ff; box-shadow: 0 0 6px rgba(120,160,255,0.6); } .seqcell.cur { outline: 1px solid rgba(255,238,150,0.85); } + /* note length β€” a placed note is an overlay block spanning `len` steps, drag its + right edge (the ew-resize handle) to lengthen. Sits over the lit cells; only the + handle takes the mouse, so the grid underneath still toggles notes. */ + .seqgrid { position: relative; } + .seqnote { border-radius: 2px; background: #78a0ff; box-shadow: 0 0 6px rgba(120,160,255,0.5); + pointer-events: none; position: relative; z-index: 2; } + .seqgrid.big .seqnote { border-radius: 4px; } + .seqnote .rsz { position: absolute; right: 0; top: 0; bottom: 0; width: 5px; + cursor: ew-resize; pointer-events: auto; border-radius: 0 2px 2px 0; + background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4)); } + .seqgrid.big .seqnote .rsz { width: 7px; } /* πŸ₯ GODRUM β€” the beat panel: a sibling of the arranger, sharing its groove & clock */ #beat { @@ -1132,7 +1143,7 @@
  • Click a wheel β€” go inside it (mind mode). In chakra view, click any chakra's core and the camera steps into the wheel: its mandala of petals turns around your whole field of view, and that chakra's feeds circle you β€” drag to look around the full 360Β°. A vector console appears under your hands: 12 keys of that wheel's own scale (C minor pentatonic at the root, rising key by key to B hirajoshi at the crown), played by clicking, by the Q–] row, or by any connected MIDI keyboard β€” every note runs through the world's own reverb and grit, so you are jamming inside the instrument, in that chakra's mode, while the planet plays around you. ↑ ↓ travel the spine wheel to wheel; esc steps back out. And for powerful machines, right-click the sky and set graphics to ultra ✦: every orbiting feed grows a glowing comet trail, and the orbits breathe so the trails weave slow spirals.
  • Skins β€” the same spine, another cosmology. Right-click the sky and cycle skin. Beyond the seven chakras there is the planes: the Seven Planes & forty-nine sub-planes of the Cosmic Physical Plane from the Alice Bailey / D.K. teachings β€” I Divine (white light) down through Monadic (violet), Atmic, Buddhic, Mental (where the egoic lotus sits), Astral, to VII Physical (red). The spine becomes the 49-sub-plane spectrum ladder; the side-brackets mark the Monad, the Spiritual Triad and the Personality; and every feed climbs to the plane that matches its rarefaction β€” the sun's own wind at the Divine, orbits and the sky's geometry at the Monadic, the great cyclic wheels at the Atmic, omen and aspect at the Buddhic, abstract thought and money-as-idea at the Mental, desire and fire and felt sensation at the Astral, and the dense body of the world β€” weather, quakes, the mortal rates, your own hands β€” at the Physical. Go inside any plane (mind mode) and its keys play a scale pitched to its altitude: airy whole-tone up at the Divine, grounded minor-pentatonic down at the Physical.
  • 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 β€” literally re-tuned: each tradition carries its own scale, so when you turn the wheel of skins the whole world re-harmonises into that cosmology's key (your grooves and the data's own melodies alike). The chakras sing one way, the Wu Xing another, the runes another still β€” one planet, many keys. 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.
  • +
  • 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 the scale, click to place a note, click again to clear, and drag a note's right edge to stretch it across the steps β€” real note length, from a staccato sixteenth to a bar-long hold β€” 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 as long as you drew it), 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) β†’ 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 three expression lanes: velocity (how hard each step hits), 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), and ratchet (how many times a step re-fires, 1–4 β€” an instant roll or 32nd-note glitch from a single step, and if that step is a Play-One stack each sub-hit re-rolls the note). The feel and the per-step shaping save with your patch. And the texture voices (the filter, the glitch, the reverb, the drive) get their own lane: a β¬— p-lock, the Pocket-Operator move β€” pin that voice to a blocky value on any step, so the filter jumps to a different cutoff on every hit, disjointed and alive; drag a step below the lane to hand it back to the world. 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.
  • β™ͺ One scale for the whole planet, and ⬛ Play One for the glitch. Set a root and scale at the top of the grooves tab and every melody you draw is in that key β€” the piano roll is only ever the scale's own notes, so nothing lands wrong; change the scale and your patterns re-harmonise in place. And a column isn't limited to one note: stack several and it turns blue β€” a Play One group, from which the sequencer picks a single note at random each time it fires. Stack a handful of in-key notes under a fast Euclidean fill and the line glitches itself into something new on every pass, always in tune. (Adapted from Ableton's Group Notes β†’ Play One.)
  • @@ -1647,6 +1658,58 @@ else if (v >= 0) steps[stp] = [v, rw]; // a second note in the column β†’ a stack else steps[stp] = rw; // first note } + // ---- note length β€” the piano-roll "key-roll" ----------------------------- + // A placed note draws as an overlay block spanning len[stp] steps; drag its right + // edge (the ew-resize handle) to lengthen. Length lives on the VOICE seq (seqFor.len), + // shared across A/B/C clips exactly as vel/chance/rat are β€” main's per-voice expression + // model. len === 1 (the default and the back-fill) is one 16th: byte-for-byte the old + // behaviour. `cells` are the {el, rw, stp} the grid already built; `stepsArr` is what + // the grid edits β€” passed as a getter `getSteps()` so overlays always read the CURRENT + // array (the arranger reassigns a voice's sq.steps per bar when a clip plays); `lenArr` + // is the voice seq's len[16]. Returns renderNotes() β€” call it after every steps edit (paint()). + function attachNoteLengths(grid, cells, getSteps, lenArr, rows, onDrop) { + for (const c of cells) { // explicit placement so overlays can span columns + c.el.style.gridColumn = String(c.stp + 1); + c.el.style.gridRow = String(rows - c.rw); + } + const pitch = () => { // column stride in px (cell width + gap), measured live + const a = cells[0] && cells[0].el; if (!a) return 15; + let b = null; + for (const c of cells) if (c.rw === cells[0].rw && c.stp === cells[0].stp + 1) { b = c.el; break; } + return (b ? b.offsetLeft - a.offsetLeft : 0) || 15; + }; + const overlays = []; + function startDrag(handle, stp) { + handle.addEventListener("mousedown", (e) => { + e.preventDefault(); e.stopPropagation(); // the handle never toggles the cell underneath + const p = pitch(), startX = e.clientX, start = clamp(Math.round(lenArr[stp] || 1), 1, 16 - stp); + const move = (e2) => { lenArr[stp] = clamp(start + Math.round((e2.clientX - startX) / p), 1, 16 - stp); renderNotes(); }; + const up = () => { window.removeEventListener("mousemove", move); window.removeEventListener("mouseup", up); if (onDrop) onDrop(); }; + window.addEventListener("mousemove", move); window.addEventListener("mouseup", up); + }); + } + function renderNotes() { + for (const el of overlays) el.remove(); overlays.length = 0; + const stepsArr = getSteps(); // read fresh: the arranger may have swapped the array + for (let stp = 0; stp < 16; stp++) { + const cell = stepsArr[stp]; + const rws = Array.isArray(cell) ? cell : (cell >= 0 ? [cell] : []); // Play-One stack or single note + if (!rws.length) continue; + const span = clamp(Math.round(lenArr[stp] || 1), 1, 16 - stp); + for (const raw of rws) { + const rw = clamp(raw, 0, rows - 1); + const el = document.createElement("div"); el.className = "seqnote"; + el.style.gridColumn = (stp + 1) + " / span " + span; + el.style.gridRow = String(rows - rw); + const h = document.createElement("div"); h.className = "rsz"; h.title = "drag to set note length"; + startDrag(h, stp); el.appendChild(h); + grid.appendChild(el); overlays.push(el); + } + } + } + renderNotes(); + return renderNotes; + } // Parameter locks (PO / Elektron style): a CC/texture voice's groove gates it in // time; a per-step LOCK pins that voice's value to a fixed level on that step // (blocky, disjointed β€” the groovebox move). lock[s] = -1 β†’ pass the world; >=0 β†’ override. @@ -1664,6 +1727,7 @@ chance: new Array(16).fill(1), // per-step Chance Editor (Β§10.5.13) rat: new Array(16).fill(1), // per-step ratchet count (1 = single hit) lock: new Array(16).fill(-1), // per-step parameter lock (-1 = unlocked) + len: new Array(16).fill(1), // per-step note length, in 16ths (1 = one step) β€” the piano-roll "key-roll" }); } // GODRUM drum lanes β€” same seq shape as seqFor, but steps are 0/1 gates that fill @@ -1682,6 +1746,7 @@ chance: new Array(16).fill(1), rat: new Array(16).fill(1), lock: new Array(16).fill(-1), // unused by drums, kept for seq-shape parity (migrateSeq) + len: new Array(16).fill(1), // unused by drums (they're one-shots), kept for seq-shape parity }); } // ---- the arranger β€” tracks & clips for the casuals ----------------------- @@ -1780,8 +1845,8 @@ const n = dests.get(key); if (!n || !n.isNote) continue; const ch = /bass/.test(key) ? 1 : 0, root = seqRootFor(key); - const sq = seqs[key]; // per-step velocity + ratchet ride here - const ev = []; + const sq = seqs[key]; // per-step velocity + ratchet + length ride here + const notes = []; // {on, off, note, vel} β€” collected, then overlap-clamped for (let b = 0; b < arr.bars; b++) { const st = arr.grid[key][b]; if (st !== "A" && st !== "B" && st !== "C") continue; @@ -1792,16 +1857,29 @@ const note = root + SEQ_ROWS[d]; const vel = Math.round(clamp(sq && sq.vel ? sq.vel[s2] : 0.8, 0.05, 1) * 127); const rat = clamp(Math.round(sq && sq.rat ? sq.rat[s2] : 1), 1, 4); - const base = (b * 16 + s2) * TICKS16, subLen = TICKS16 / rat; - for (let h = 0; h < rat; h++) { // ratchets β†’ real sub-notes - const t0 = base + Math.round(h * subLen); - const t1 = Math.max(t0 + 1, base + Math.round((h + 1) * subLen) - 2); - ev.push([t0, 0x90 | ch, note, vel], [t1, 0x80 | ch, note, 0]); + const base = (b * 16 + s2) * TICKS16; + if (rat > 1) { // ratchets β†’ real sub-notes (one 16th, subdivided) + const subLen = TICKS16 / rat; + for (let h = 0; h < rat; h++) { + const on = base + Math.round(h * subLen); + notes.push({ on, off: Math.max(on + 1, base + Math.round((h + 1) * subLen) - 2), note, vel }); + } + } else { // un-ratcheted β†’ the note sustains its length (key-roll) + const len16 = clamp(Math.round(sq && sq.len ? sq.len[s2] : 1), 1, 16); + notes.push({ on: base, off: base + len16 * TICKS16 - 2, note, vel }); } } } - if (!ev.length) continue; - ev.sort((a, b2) => a[0] - b2[0]); + if (!notes.length) continue; + // clamp a note-off to just before the next onset of the SAME pitch, so a long + // note running into a repeat of itself never emits an overlapping / stuck pair + notes.sort((a, b2) => a.note - b2.note || a.on - b2.on); + for (let i = 1; i < notes.length; i++) + if (notes[i].note === notes[i - 1].note && notes[i - 1].off >= notes[i].on) + notes[i - 1].off = Math.max(notes[i - 1].on + 1, notes[i].on - 1); + const ev = []; + for (const nt of notes) ev.push([nt.on, 0x90 | ch, nt.note, nt.vel], [nt.off, 0x80 | ch, nt.note, 0]); + ev.sort((a, b2) => a[0] - b2[0] || (a[1] & 0xf0) - (b2[1] & 0xf0)); // note-off before note-on at a tie const bytes = []; let last = 0; for (const e of ev) { @@ -2078,12 +2156,16 @@ grid.appendChild(cell); } } + let renderNotesG = null; // note-length overlays (note lanes only; len is per-voice) + if (nSel.isNote) { const vsq = seqFor(arrSelKey, true); if (!vsq.len) vsq.len = new Array(16).fill(1); + renderNotesG = attachNoteLengths(grid, cells, () => steps, vsq.len, rows, null); } const paintG = () => { for (const c2 of cells) { c2.el.classList.toggle("on", nSel.isNote ? stepHas(steps[c2.stp], c2.rw) : !!steps[c2.stp]); c2.el.classList.toggle("playone", nSel.isNote && stepStack(steps[c2.stp]) && stepHas(steps[c2.stp], c2.rw)); c2.el.classList.toggle("cur", arr.playing && c2.stp === seqCurStep); } + if (renderNotesG) renderNotesG(); }; paintG(); arrGrooveRefresh = paintG; @@ -2950,7 +3032,11 @@ const ch = sq.chance ? sq.chance[cur] : 1; // chance: does this step fire? if (hasNote && (ch >= 1 || Math.random() < ch)) { const rat = clamp(Math.round((sq.rat && sq.rat[cur]) || 1), 1, 4); // ratchet: sub-hits per step - const sub = (60000 / Math.max(40, godtime.bpm) / 4) / rat; // ms between sub-hits + const sixteenth = 60000 / Math.max(40, godtime.bpm) / 4; // ms per 16th at this tempo + const sub = sixteenth / rat; // ms between ratchet sub-hits + const single = rat === 1; // no ratchet β†’ the note sustains its length + const len16 = clamp(Math.round(sq.len ? sq.len[cur] : 1), 1, 16); // note length in 16ths (key-roll) + const durMs = single ? len16 * sixteenth : sub * 0.9; // ratchets keep their sub-hit length const ch1 = /bass/.test(k) ? 1 : 0; const fireHit = () => { const deg = stepPick(sv); // Play One: re-pick per sub-hit @@ -2959,8 +3045,8 @@ let vel = sq.vel ? sq.vel[cur] : (ch1 ? 0.9 : 0.7); if (groove.velo) // Velocity Deviation (Β§10.5.11) vel = clamp(vel + (Math.random() * 2 - 1) * groove.velo * groove.amount * 0.5, 0.05, 1); - Synth.pluck(note, vel); - midiPluck(ch1, note, vel, sub * 0.9); + Synth.pluck(note, vel, single ? durMs : undefined); // sustained only when un-ratcheted; ratchets keep the natural pluck + midiPluck(ch1, note, vel, durMs); }; fireHit(); for (let h = 1; h < rat; h++) setTimeout(fireHit, h * sub); @@ -3093,7 +3179,8 @@ vel: Array.isArray(s.vel) && s.vel.length === 16 ? s.vel.slice() : new Array(16).fill(0.8), chance: Array.isArray(s.chance) && s.chance.length === 16 ? s.chance.slice() : new Array(16).fill(1), rat: Array.isArray(s.rat) && s.rat.length === 16 ? s.rat.slice() : new Array(16).fill(1), - lock: Array.isArray(s.lock) && s.lock.length === 16 ? s.lock.slice() : new Array(16).fill(-1) }; + lock: Array.isArray(s.lock) && s.lock.length === 16 ? s.lock.slice() : new Array(16).fill(-1), + len: Array.isArray(s.len) && s.len.length === 16 ? s.len.slice() : new Array(16).fill(1) }; } function gsGrooveSelfCheck() { // ponytail: one runnable guard on the risky bits const f = []; @@ -3138,6 +3225,8 @@ if (!stepHas([3, 5], 5) || stepHas([3, 5], 7)) f.push("po-has"); if (stepPick([4]) !== 4 || stepFirst([9, 2]) !== 9) f.push("po-pickfirst"); if (migrateSeq({ steps: new Array(16).fill(0) }).rat[0] !== 1) f.push("ratchet-default"); // rat back-fills to 1 + if (migrateSeq({ steps: new Array(16).fill(0) }).len[0] !== 1) f.push("len-default"); // len back-fills to 1 (one 16th) + if (migrateSeq({ steps: new Array(16).fill(0), len: new Array(4).fill(3) }).len[0] !== 1) f.push("len-badlen"); // wrong-length len β†’ reset // parameter locks (applyGroove) if (applyGroove(null, 0, 0.7) !== 0.7) f.push("plock-nogroove"); // no groove β†’ world passes const lsq = { on: true, steps: [1, 0, 1, ...new Array(13).fill(0)], lock: [-1, -1, 0.25, ...new Array(13).fill(-1)] }; @@ -7348,17 +7437,26 @@ grid.appendChild(cell); } } + let renderNotesI = null; // note-length overlays (note lanes only) + if (node.isNote) { if (!sq.len) sq.len = new Array(16).fill(1); + renderNotesI = attachNoteLengths(grid, cells, () => sq.steps, sq.len, rows, null); } const paint = () => { for (const c of cells) { c.el.classList.toggle("on", node.isNote ? stepHas(sq.steps[c.stp], c.rw) : !!sq.steps[c.stp]); c.el.classList.toggle("playone", node.isNote && stepStack(sq.steps[c.stp]) && stepHas(sq.steps[c.stp], c.rw)); c.el.classList.toggle("cur", c.stp === seqCurStep && sq.on); } + if (renderNotesI) renderNotesI(); }; paint(); seqGridRefresh = paint; // the playhead sweeps while open wrap.appendChild(grid); inspectEl.appendChild(wrap); + if (node.isNote) { // hint the new capability + const lh = document.createElement("div"); lh.className = "sub"; lh.style.marginTop = "2px"; + lh.style.color = "rgba(150,170,200,0.6)"; lh.textContent = "drag a note's right edge β†’ note length"; + wrap.appendChild(lh); + } } const mb = document.createElement("button"); mb.className = "midibtn"; mb.style.marginTop = "8px"; @@ -8186,11 +8284,20 @@ } // a struck note out the MIDI door β€” grooves & the mind-console play your rig + // pending note-off timers, keyed by (channel<<8 | note). A note length can now + // outlast the next onset of the SAME pitch on the SAME channel; without tracking, + // the earlier note's delayed note-off would silence the retriggered note (the live + // mirror of the same-pitch clamp exportMid does). So retriggering a held pitch first + // ends the earlier note cleanly, then re-strikes β€” no stale off cuts the new note. + const midiOffTimers = {}; function midiPluck(ch, note, vel, durMs) { if (!midiOut || note == null || note < 0 || note > 127) return; + const c = ch & 15, n = Math.round(note), k = (c << 8) | n; try { - midiOut.send([0x90 | (ch & 15), Math.round(note), clamp(Math.round((vel || 0.8) * 127), 1, 127)]); - setTimeout(() => { try { midiOut.send([0x80 | (ch & 15), Math.round(note), 0]); } catch (e) {} }, durMs || 220); + const prev = midiOffTimers[k]; + if (prev) { clearTimeout(prev); midiOut.send([0x80 | c, n, 0]); } // end the earlier same-pitch note first + midiOut.send([0x90 | c, n, clamp(Math.round((vel || 0.8) * 127), 1, 127)]); + midiOffTimers[k] = setTimeout(() => { delete midiOffTimers[k]; try { midiOut.send([0x80 | c, n, 0]); } catch (e) {} }, durMs || 220); } catch (e) {} } @@ -8898,7 +9005,10 @@ // the full FX chain, so it sits inside the world's reverb & grit. Wakes // the audio graph on first strike if β™ͺ hasn't been pressed. const FM_RATIO = 3; // FM operator ratio (2 = warm/woody, 3 = bright tine, 4 = glassy) β€” all verified alias-free - function pluck(midi, vel) { + // durMs (optional): a sequenced note's length in ms β€” the FM voice is gated to it + // (piano-roll note length). Omitted (hand-played / mind keys / ratchets) = the + // original long natural decay, byte-for-byte unchanged. + function pluck(midi, vel, durMs) { if (!AC) return; if (!ctx) { ctx = new AC(); N = build(); loadWorklets(); } ctx.resume(); @@ -8932,8 +9042,16 @@ o.connect(f); f.connect(g); g.connect(N.preSat); g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(0.22 * v, t + 0.006); - g.gain.setTargetAtTime(0, t + 0.02, 0.38); - o.start(t); mod.start(t); o.stop(t + 2.4); mod.stop(t + 2.4); + if (durMs == null) { // hand-played: the original long natural decay + g.gain.setTargetAtTime(0, t + 0.02, 0.38); + o.start(t); mod.start(t); o.stop(t + 2.4); mod.stop(t + 2.4); + } else { // sequenced: gated to the note's length, with a soft release + const dur = Math.max(0.04, durMs / 1000), rel = 0.16; + g.gain.setTargetAtTime(0.13 * v, t + 0.02, Math.min(0.34, dur)); // settle to a sustained body + g.gain.setTargetAtTime(0, t + dur, rel); // release when the note ends + const end = t + dur + rel * 8; + o.start(t); mod.start(t); o.stop(end); mod.stop(end); + } } const btn = document.createElement("div"); diff --git a/viz/manual.html b/viz/manual.html index 9cad154..48c0817 100644 --- a/viz/manual.html +++ b/viz/manual.html @@ -238,6 +238,17 @@ .seqcell:hover { background: rgba(140,170,220,0.45); } .seqcell.on { background: #78a0ff; box-shadow: 0 0 6px rgba(120,160,255,0.6); } .seqcell.cur { outline: 1px solid rgba(255,238,150,0.85); } + /* note length β€” a placed note is an overlay block spanning `len` steps, drag its + right edge (the ew-resize handle) to lengthen. Sits over the lit cells; only the + handle takes the mouse, so the grid underneath still toggles notes. */ + .seqgrid { position: relative; } + .seqnote { border-radius: 2px; background: #78a0ff; box-shadow: 0 0 6px rgba(120,160,255,0.5); + pointer-events: none; position: relative; z-index: 2; } + .seqgrid.big .seqnote { border-radius: 4px; } + .seqnote .rsz { position: absolute; right: 0; top: 0; bottom: 0; width: 5px; + cursor: ew-resize; pointer-events: auto; border-radius: 0 2px 2px 0; + background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4)); } + .seqgrid.big .seqnote .rsz { width: 7px; } /* πŸ₯ GODRUM β€” the beat panel: a sibling of the arranger, sharing its groove & clock */ #beat { @@ -1112,7 +1123,7 @@
  • Click a wheel β€” go inside it (mind mode). In chakra view, click any chakra's core and the camera steps into the wheel: its mandala of petals turns around your whole field of view, and that chakra's feeds circle you β€” drag to look around the full 360Β°. A vector console appears under your hands: 12 keys of that wheel's own scale (C minor pentatonic at the root, rising key by key to B hirajoshi at the crown), played by clicking, by the Q–] row, or by any connected MIDI keyboard β€” every note runs through the world's own reverb and grit, so you are jamming inside the instrument, in that chakra's mode, while the planet plays around you. ↑ ↓ travel the spine wheel to wheel; esc steps back out. And for powerful machines, right-click the sky and set graphics to ultra ✦: every orbiting feed grows a glowing comet trail, and the orbits breathe so the trails weave slow spirals.
  • Skins β€” the same spine, another cosmology. Right-click the sky and cycle skin. Beyond the seven chakras there is the planes: the Seven Planes & forty-nine sub-planes of the Cosmic Physical Plane from the Alice Bailey / D.K. teachings β€” I Divine (white light) down through Monadic (violet), Atmic, Buddhic, Mental (where the egoic lotus sits), Astral, to VII Physical (red). The spine becomes the 49-sub-plane spectrum ladder; the side-brackets mark the Monad, the Spiritual Triad and the Personality; and every feed climbs to the plane that matches its rarefaction β€” the sun's own wind at the Divine, orbits and the sky's geometry at the Monadic, the great cyclic wheels at the Atmic, omen and aspect at the Buddhic, abstract thought and money-as-idea at the Mental, desire and fire and felt sensation at the Astral, and the dense body of the world β€” weather, quakes, the mortal rates, your own hands β€” at the Physical. Go inside any plane (mind mode) and its keys play a scale pitched to its altitude: airy whole-tone up at the Divine, grounded minor-pentatonic down at the Physical.
  • 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 β€” literally re-tuned: each tradition carries its own scale, so when you turn the wheel of skins the whole world re-harmonises into that cosmology's key (your grooves and the data's own melodies alike). The chakras sing one way, the Wu Xing another, the runes another still β€” one planet, many keys. 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.
  • +
  • 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 the scale, click to place a note, click again to clear, and drag a note's right edge to stretch it across the steps β€” real note length, from a staccato sixteenth to a bar-long hold β€” 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 as long as you drew it), 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) β†’ 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 three expression lanes: velocity (how hard each step hits), 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), and ratchet (how many times a step re-fires, 1–4 β€” an instant roll or 32nd-note glitch from a single step, and if that step is a Play-One stack each sub-hit re-rolls the note). The feel and the per-step shaping save with your patch. And the texture voices (the filter, the glitch, the reverb, the drive) get their own lane: a β¬— p-lock, the Pocket-Operator move β€” pin that voice to a blocky value on any step, so the filter jumps to a different cutoff on every hit, disjointed and alive; drag a step below the lane to hand it back to the world. 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.
  • β™ͺ One scale for the whole planet, and ⬛ Play One for the glitch. Set a root and scale at the top of the grooves tab and every melody you draw is in that key β€” the piano roll is only ever the scale's own notes, so nothing lands wrong; change the scale and your patterns re-harmonise in place. And a column isn't limited to one note: stack several and it turns blue β€” a Play One group, from which the sequencer picks a single note at random each time it fires. Stack a handful of in-key notes under a fast Euclidean fill and the line glitches itself into something new on every pass, always in tune. (Adapted from Ableton's Group Notes β†’ Play One.)