Skip to content

Player: one control bar below the device, start line, effect On/Off (B), key hint - #5

Open
Que2039 wants to merge 2 commits into
mainfrom
cursor/player-control-bar-925a
Open

Que2039 wants to merge 2 commits into
mainfrom
cursor/player-control-bar-925a

Conversation

@Que2039

@Que2039 Que2039 commented Dec 2, 2026

Copy link
Copy Markdown

Workstream 1 of the UX plan ("Player layout and first action"), covering review issues 3, 4 and 12 plus David's note that Play loop sat out of position.

What changes for the visitor

  • One bar below the device. Play loop and the loop choices move from above the device into the control bar under it. On effects they lead the bar, set off by a divider, followed by the device's own controls (tempo, presets, …). Nothing playable sits above the device anymore.
  • Start line over the device. One line that names the plugin and says what to press:
    • Effect: "Tape Saturator · Tape machine by olosch — Press Play loop, turn a knob, press B to compare."
    • Instrument: "… — Click a key or type A S D F to play." (the letters follow the visitor's keyboard layout)
    • Drum machine: "… — Hit a key or type A S D F to play the drums."
    • Home page: prefixed with "PLUGIN OF THE DAY".
    • Touch devices get "Tap …" versions. Beatbox 8/9, Bassline and Tonematrix have their own line (hint in data.mjs).
    • On desktop the "kind by author" part gets cut short first, so the instruction always stays whole. Below 900 px the line wraps.
  • Effect On/Off next to Play loop, also on the B key (B works with the focus inside the device frame too). Off takes the loop around the effect and mutes the effect's own output, so you hear the plain loop. The device dims a little while Off. Every new effect starts On.
  • Key hint over the on-screen keys ("Press a key, or type A S D F") that fades after the first note of the visit.
  • Effects that take no notes hide Octave, Keyboard, MIDI and Notes off, and their keys. TEETH (key tracking), Vocoder (MIDI carrier) and DUCKing (follows a note) keep them via notes: true.
  • Phone: a labelled Play full screen button in the start line, which turns the phone to landscape where the browser allows it. The small icon stays only while in full screen, as the way out. On touch-only devices MIDI and the B keycap are hidden.
  • Tour and tutorial texts now say the loops are below the device.

For the mini mix (workstream 2)

  • player/routing.js has EffectBus, the On/Off switch as a routing primitive. bus.createSend({ level, through }) gives each source or layer a send. send.setThrough(on) is the per-layer "through effect" toggle. bus.setEnabled(on) is the global switch (the button and B call it), and bus.onChange(fn) keeps any other UI in sync. bus.setEffect(node) re-wires every send when the device changes.
  • player/loops.js has LoopSource, today's loops behind a small interface: el, setChoices(ids), toggle(), stop(), playing. Its header documents the interface. A multi-layer source with the same shape can replace it in main.js. Its controls go in the bar's .player-source slot.
  • createPlayer() returns bar, sourceSlot, source, audio (start(), ctx, bus) and setEffect.
  • npm test runs scripts/test-routing.mjs, which checks the send/switch logic against a stand-in audio graph.

Build note (separate commit)

The pages-only build (build.mjs --pages) used to crash without the native-nxs checkout next to this repo. When those files are missing, model.mjs now takes the local devices' assets from site/play/build.json, and data.mjs skips their preset state. I checked it on unchanged main: it rebuilt every device page byte for byte. Full builds still need the checkout. Also, --pages now refreshes reused tours' step texts from data.mjs, which is how the "below the device" wording reached site/tours/*.json.

The site was rebuilt with A_PLUGINS_DATE=2026-11-30, the same date as main, and the share images were left untouched, so the diff contains only this change.

Verification

  • npm run build -- --pages passes and npm test passes. node --check passes on all player and script files. The repo has no linter.
  • No browser click-through, per the project rules. Please run the checklist below.

Human checklist

  • Home (/, Tape Saturator): the start line reads "PLUGIN OF THE DAY Tape Saturator · … — Press Play loop, …" on one line. Play loop, the three loops and Effect On [B] sit at the left of the bar below the device. There are no Octave, Keyboard, MIDI or Notes off controls.
  • An effect page (/dome/ or /tape/): Play loop plays. Then Effect Off, and B with the focus on the page and again after clicking into the device: the effect goes away, the device dims, and switching causes no click. Use the arrows or a menu to move to another effect: the loop keeps playing and the effect is On again.
  • TEETH (/teeth/): the note controls are still there (key tracking).
  • An instrument page (/quack/): the line reads "Click a key or type A S D F to play". The key hint sits over the keys and fades on the first note (mouse, typing or MIDI) and doesn't come back after navigating. Octave, Keyboard and MIDI are as before.
  • A drum machine (/lmdrum/): "Hit a key or type A S D F to play the drums". On /beatbox8/: "Press any key to start the pattern, then turn the knobs."
  • Phone width (≈390 px, touch emulation): the start line wraps, with a Play full screen button on the right that goes full screen (and landscape on Android). The bar's small full screen icon only shows while in full screen. On effects, the loop row fills the first bar row, and MIDI is hidden.
  • Full screen on desktop: no start line, and the device, keys and bar fit.
  • Tutorial /learn/vocoder-free/: the embedded player has no start line, and Play loop is in the bar within the frame height.
Open in Web Open in Cursor 

cursoragent and others added 2 commits December 2, 2026 16:38
…the asset of the last build

Co-authored-by: David Querg <Que2039@users.noreply.github.com>
…B), key hint

The loops and Play loop move from above the device into the bar under it, with an
Effect On/Off switch next to them (B key) that routes the loop around the effect
(player/routing.js). The loop source is its own module (player/loops.js) behind a
small interface, so a multi-layer source can take its slot. A one-line start strip
over the device names the plugin and says what to press for effects, instruments
and drum machines; a hint on the keys fades after the first note. Effects that take
no notes hide octave, keyboard, MIDI and Notes off (data: notes: true keeps them).
Phones get a labelled Play full screen button. Tour and tutorial texts now say the
loops are below the device; --pages refreshes reused tours' step texts.

Co-authored-by: David Querg <Que2039@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants