diff --git a/viz/index.html b/viz/index.html index 030c5ce..a83d58f 100644 --- a/viz/index.html +++ b/viz/index.html @@ -113,8 +113,26 @@ font-size: 11px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); max-height: 44vh; } - #arranger.open { display: block; } - #arranger .atop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } + #arranger.open { display: flex; flex-direction: column; } + #arranger .agrip { + height: 8px; margin: -8px -10px 2px; cursor: ns-resize; border-radius: 12px 12px 0 0; + } + #arranger .agrip:hover { background: rgba(150,180,230,0.25); } + #arranger .atop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; } + #arranger .asel { + background: rgba(30,40,60,0.85); color: #dbe6f5; border: 1px solid rgba(120,150,200,0.3); + border-radius: 6px; padding: 3px 8px; font-size: 11px; max-width: 180px; + } + #arranger .seqgrid.big { grid-template-columns: repeat(16, 26px); gap: 3px; margin: 10px auto; } + #arranger .seqgrid.big .seqcell { width: 26px; height: 22px; border-radius: 4px; } + #arrbtn { + position: fixed; right: 14px; bottom: 56px; z-index: 12; padding: 6px 12px; + border-radius: 9px; background: rgba(20,28,44,0.85); color: #9fb4d8; + border: 1px solid rgba(120,150,200,0.3); cursor: pointer; font-size: 12px; + -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); user-select: none; + } + #arrbtn:hover { color: #dbe8ff; border-color: rgba(150,180,230,0.6); } + #arrbtn.hidden { display: none; } #arranger .albl { color: rgba(150,170,200,0.65); font-size: 10px; flex: 1; } #arranger .aclose { cursor: pointer; color: #8fa4c8; font-size: 16px; padding: 0 4px; } #arranger .midibtn { @@ -122,7 +140,7 @@ border-radius: 6px; padding: 3px 10px; font-size: 11px; cursor: pointer; } #arranger .midibtn.on { background: rgba(120,220,150,0.22); color: #bff0c9; border-color: rgba(130,230,160,0.55); } - #arranger .abody { max-height: calc(44vh - 44px); overflow-y: auto; } + #arranger .abody { flex: 1; min-height: 0; overflow-y: auto; } #arranger .arow { display: flex; align-items: center; gap: 3px; margin: 2px 0; } #arranger .aname { width: 118px; min-width: 118px; overflow: hidden; text-overflow: ellipsis; @@ -866,7 +884,7 @@
  • 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. 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.
  • 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.
  • +
  • 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.
  • @@ -1296,27 +1314,132 @@ const arrEl = document.createElement("div"); arrEl.id = "arranger"; document.body.appendChild(arrEl); - function closeArranger() { arr.open = false; arrEl.classList.remove("open"); arrPaintBar = null; } + let arrGrooveRefresh = null; // grooves-tab playhead painter + let arrTab = "clips", arrSelKey = null, arrSelLetter = "A"; + function closeArranger() { + arr.open = false; arrEl.classList.remove("open"); + arrPaintBar = null; arrGrooveRefresh = null; + arrBtn.classList.remove("hidden"); + } function openArranger() { arr.open = true; + arrBtn.classList.add("hidden"); arrEl.innerHTML = ""; + + // grab-handle — drag to resize, remembered + const grip = document.createElement("div"); grip.className = "agrip"; grip.title = "drag to resize"; + grip.addEventListener("mousedown", (e0) => { + e0.preventDefault(); + const startY = e0.clientY, startH = arrEl.getBoundingClientRect().height; + const move = (e2) => { + const h2 = clamp(startH + (startY - e2.clientY), 140, window.innerHeight * 0.8); + arrEl.style.height = h2 + "px"; + }; + const up = () => { + window.removeEventListener("mousemove", move); window.removeEventListener("mouseup", up); + try { localStorage.setItem("gs_arrh", parseInt(arrEl.style.height) || ""); } catch (e) {} + }; + window.addEventListener("mousemove", move); window.addEventListener("mouseup", up); + }); + arrEl.appendChild(grip); + try { const h0 = parseInt(localStorage.getItem("gs_arrh")); if (h0) arrEl.style.height = h0 + "px"; } catch (e) {} + const bar0 = document.createElement("div"); bar0.className = "atop"; const play = document.createElement("button"); play.className = "midibtn"; const paintPlay = () => { play.textContent = arr.playing ? "■ stop" : "▶ play"; play.classList.toggle("on", arr.playing); }; paintPlay(); play.onclick = () => { arr.playing ? arrStop() : arrPlay(); paintPlay(); }; + const tabC = document.createElement("button"); tabC.className = "midibtn"; + const tabG = document.createElement("button"); tabG.className = "midibtn"; + const paintTabs = () => { + tabC.textContent = "clips"; tabG.textContent = "grooves"; + tabC.classList.toggle("on", arrTab === "clips"); + tabG.classList.toggle("on", arrTab === "grooves"); + }; + paintTabs(); + tabC.onclick = () => { arrTab = "clips"; openArranger(); }; + tabG.onclick = () => { arrTab = "grooves"; openArranger(); }; const exp = document.createElement("button"); exp.className = "midibtn"; exp.textContent = "export .mid"; exp.title = "a Standard MIDI File of the note lanes — drag it into any DAW"; exp.onclick = exportMid; const lbl = document.createElement("span"); lbl.className = "albl"; - lbl.textContent = "tracks · click a cell: live → A → B → C → silent · double-click a clip to edit its groove · loops 8 bars on godtime"; + lbl.textContent = arrTab === "clips" + ? "click a cell: live → A → B → C → silent · double-click a clip to edit · right-click a track name for its routing · loops 8 bars" + : "pick a track and a clip letter — the big grid edits the pattern the clips play"; const x2 = document.createElement("span"); x2.className = "aclose"; x2.textContent = "×"; x2.onclick = closeArranger; - bar0.appendChild(play); bar0.appendChild(exp); bar0.appendChild(lbl); bar0.appendChild(x2); + bar0.appendChild(play); bar0.appendChild(tabC); bar0.appendChild(tabG); + bar0.appendChild(exp); bar0.appendChild(lbl); bar0.appendChild(x2); arrEl.appendChild(bar0); const body = document.createElement("div"); body.className = "abody"; arrEl.appendChild(body); + + if (arrTab === "grooves") { // ---- the big pattern editor ---- + const keys2 = Array.from(dests.keys()).sort(); + if (!arrSelKey || !dests.has(arrSelKey)) arrSelKey = keys2[0]; + const pick = document.createElement("div"); pick.className = "arow"; + const sel = document.createElement("select"); sel.className = "asel"; + for (const k2 of keys2) { + const o2 = document.createElement("option"); + o2.value = k2; o2.textContent = prettyDest(k2); + if (k2 === arrSelKey) o2.selected = true; + sel.appendChild(o2); + } + sel.onchange = () => { arrSelKey = sel.value; openArranger(); }; + pick.appendChild(sel); + for (const L2 of ["A", "B", "C"]) { + const lb = document.createElement("button"); lb.className = "midibtn"; + lb.textContent = L2; + lb.classList.toggle("on", arrSelLetter === L2); + lb.onclick = () => { arrSelLetter = L2; openArranger(); }; + pick.appendChild(lb); + } + const hint2 = document.createElement("span"); hint2.className = "albl"; + const nSel = dests.get(arrSelKey); + hint2.textContent = nSel.isNote + ? "piano roll · " + midiToName(seqRootFor(arrSelKey)) + " minor pent · click to place, click again to clear" + : "16-step gate · lit steps let the world's signal through"; + pick.appendChild(hint2); + body.appendChild(pick); + + const steps = arrBank(arrSelKey, nSel.isNote)[arrSelLetter]; + const rows = nSel.isNote ? SEQ_ROWS.length : 1; + const grid = document.createElement("div"); + grid.className = "seqgrid big"; + const cells = []; + for (let rw = rows - 1; rw >= 0; rw--) { + for (let stp = 0; stp < 16; stp++) { + const cell = document.createElement("div"); + cell.className = "seqcell"; + if (stp % 4 === 0) cell.classList.add("bar"); + if (nSel.isNote) { + cell.title = midiToName(seqRootFor(arrSelKey) + SEQ_ROWS[rw]) + " · step " + (stp + 1); + cell.onclick = () => { steps[stp] = steps[stp] === rw ? -1 : rw; paintG(); }; + } else { + cell.title = "step " + (stp + 1); + cell.onclick = () => { steps[stp] = steps[stp] ? 0 : 1; paintG(); }; + } + cells.push({ el: cell, rw, stp }); + grid.appendChild(cell); + } + } + const paintG = () => { + for (const c2 of cells) { + c2.el.classList.toggle("on", nSel.isNote ? steps[c2.stp] === c2.rw : !!steps[c2.stp]); + c2.el.classList.toggle("cur", arr.playing && c2.stp === seqCurStep); + } + }; + paintG(); + arrGrooveRefresh = paintG; + body.appendChild(grid); + arrPaintBar = () => paintPlay(); + arrEl.classList.add("open"); + return; + } + + // ---- the clips grid ---- + arrGrooveRefresh = null; const CYCLE = ["live", "A", "B", "C", "mute"]; const cellRefs = []; const keys2 = Array.from(dests.keys()).sort(); @@ -1325,7 +1448,13 @@ const row = document.createElement("div"); row.className = "arow"; const name = document.createElement("span"); name.className = "aname"; name.textContent = prettyDest(key); - name.title = key + (n.isNote ? " · note lane (exports to .mid)" : " · texture lane (gates the data)"); + name.title = key + (n.isNote ? " · note lane (exports to .mid)" : " · texture lane (gates the data)") + + " — right-click for routing, click to open its tab"; + name.onclick = () => openInspector(n); + name.oncontextmenu = (e2) => { // right-click a track = its full routing + e2.preventDefault(); + openCtxMenu(n, e2.clientX, e2.clientY); + }; row.appendChild(name); const lane = arrLane(key); for (let b = 0; b < arr.bars; b++) { @@ -1344,9 +1473,8 @@ cell.ondblclick = () => { const st = lane[b]; if (st !== "A" && st !== "B" && st !== "C") return; - const sq = seqFor(key, n.isNote); // load the clip into the groove grid - sq.steps = arrBank(key, n.isNote)[st]; // shared ref — edits write through - openInspector(n); + arrSelKey = key; arrSelLetter = st; arrTab = "grooves"; // jump to the big editor + openArranger(); }; paint(); cellRefs.push(paint); @@ -1358,6 +1486,14 @@ arrEl.classList.add("open"); } + // the launcher — one visible button, always there for the casuals + const arrBtn = document.createElement("div"); + arrBtn.id = "arrbtn"; + arrBtn.textContent = "🎛 tracks"; + arrBtn.title = "tracks & clips — make a song (T)"; + arrBtn.onclick = () => openArranger(); + document.body.appendChild(arrBtn); + function seqTick() { for (const k in seqs) { const sq = seqs[k]; @@ -1373,6 +1509,7 @@ } } if (seqGridRefresh) seqGridRefresh(); + if (arrGrooveRefresh) arrGrooveRefresh(); } function groupsOf(key) { const out = [];