Commit graph

14 commits

Author SHA1 Message Date
Me Here
36b7cacd3f pm-mobile: compact tempo plate, Repeat checkbox, controls under lanes, bigger transport
- Replaced the big BPM circle with a compact tempo "plate" (♩ = N · per minute)
  that flashes on the beat — reclaims the wasted vertical space.
- Transport buttons now grow to fill the freed space (2×4 grid stretches).
- Removed the bottom-sheet note-value picker; note value is chosen by graphic
  inside the lane modal only (kept there as you liked).
- Repeat is now a checkbox (like Tempo ramp / Practice gaps); checking it reveals
  "Play N bars, then stop / next / prev". The whole control group moved BELOW the
  lanes.

Engine untouched; conformance passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 14:15:10 -05:00
Me Here
8402b4f92c pm-mobile: engraved tempo marking (♩ = N) + subtle staff behind the lanes
- The BPM now reads as a sheet-music tempo marking: a quarter-note glyph
  (reusing the lane rhythm-figure SVG, so it matches) + "= N", with a small
  "per minute" beneath. Tap/hold/drag editing unchanged.
- A faint 5-line staff sits behind the lane rows (--staff, theme-aware) for a
  subtle engraved feel; pads/labels render above it.

Engine untouched; conformance passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:14:33 -05:00
Me Here
1a66eb962d pm-mobile: note-value picker, top-bar reorg, share menu, end rework, scaling layout
Lanes / note values:
- Removed the swing toggle + shuffle glyph (swing == triplet in this engine, so
  it's redundant; `swing` stays in the DSL). Pick the note value by GRAPHIC: tap
  a lane's rhythm icon (or use the lane sheet) to choose quarter/eighth/triplet/
  sixteenth/sextuplet — replaces the number dropdown; adds per-lane gain earlier.

Top bar:
- Utilities grouped on one row (volume p→f, share, theme, full screen, help);
  Set list + Track + a disk Save button on the row below.
- Save icon is now a disk; help "?" replays the tour.

Track end:
- Dropped the nonsensical "repeat + loop". Now "Play N bars, then [stop / next
  track / prev track]"; 0 bars = loops forever. Honored at runtime.

Share:
- Removed inline Copy/Apply. New Share sheet (↑): toggle This track / This set
  list → shareable link (+ copy link / copy text), and paste a string/link to
  load. (setlistToCode added; multi-select tree is a follow-up.)

Layout (rock-solid, pure phone↔tablet scaling):
- Content capped to --maxw and centered; fixed (non-wrapping) track panel and
  rows so nothing re-flows as the screen grows — phone and tablet are the same
  layout, just scaled. Landscape now uses one 2-column layout at ALL heights
  (was falling back to portrait on tall tablets). Bigger margins in full screen.

Inconspicuous VARASYS logo in the bottom bar links to the Codeberg repo.

Engine untouched; conformance passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:05:31 -05:00
Me Here
1f5fdeaba9 pm-mobile: swing shuffle glyph, largest-note rhythm icons, polyrhythm indicator
- Lane rhythm icon now reflects what's actually played: it reduces the
  subdivision grid to the largest note that lands on every active hit
  (gcd of stepsPerBeat + active offsets), so a triplet grid that only plays the
  beat shows a quarter, a 16th grid playing eighths shows eighths, etc. Updates
  live as pads are toggled.
- Swung eighths now render the dotted-eighth + sixteenth shuffle figure (full
  8th beam + partial 16th beam + augmentation dot) instead of plain eighths.
- Polyrhythm (poly ~) lanes are clearly marked on the main screen: a violet
  left-stripe, violet pads, and a ratio badge (e.g. ↻5:4 = lane beats : the
  reference lane's beats) — replaces the cryptic "~".

Engine untouched; conformance passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:29:56 -05:00
Me Here
b98c37ff68 pm-mobile: beat-aligned pads + per-lane subdivision rhythm icons
- Pads now group into per-beat cells (one flex cell per beat), so beats line up
  in columns across lanes regardless of each lane's subdivision; the downbeat
  pad in each cell is full-height and the sub-beat pads are shorter/smaller.
- Each lane label shows a small engraved rhythm figure for its subdivision,
  drawn as SVG (notehead + stem + beams + tuplet number): quarter, beamed
  eighths, triplet (3), sixteenths (double beam), sextuplet (6), etc.

Engine untouched; conformance passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:18:48 -05:00
Me Here
4b53f917f4 seed lists + mobile icons: rich Styles/Practice, drop Song/Notation, subtle music theme
setlists.js (shared by all pages):
- Removed the "Song (continuous)" and "Notation showcase" seed lists.
- "Styles" is now a rich, genre-true collection (16): rock, pop 16ths, funk,
  disco, Motown, blues shuffle, jazz swing, bossa, samba, reggae one-drop,
  afrobeat, hip-hop, metal, 6/8 ballad, 7/8, 5/4 — full grooves to jam over.
- "Practice" is 15 drummer drills to learn those styles: hat subdivisions,
  ghost-note backbeats, 16th hand control, shuffle/jazz ride, bossa & 3-over-4
  independence, dynamics, double bass, hemiola/5-over-4, tempo & gap trainers.
- Dropped the cartoon emoji from the titles. All patches validated: every lane
  parses and pattern lengths match their meters.

Mobile icons — less cartoonish, subtly musical:
- Volume rail now reads p … f (piano/forte dynamics) instead of speaker emoji.
- Save 💾 -> ↧; library +/✕ instead of /🗑.
- Practice-sessions empty state uses a treble clef instead of 🎼.

Engine untouched; conformance passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 11:14:06 -05:00
Me Here
ca2a695f4f pm-mobile: inline track panel above lanes + fixed landscape layout
- Repeat (bar count) + End, Ramp, Gap and the track share-string now show
  directly on the main screen in a compact panel above the lanes (with live
  Copy/Apply of the string) — replaces the ⚙ Track dialog, which is removed.
- Landscape was overlapping (top row + pulse + lanes collided at short
  heights). Reworked: the work area is a 2-column grid — pulse + transport on
  the left, track panel + lanes (scrollable) on the right — with a single-row
  top bar (dropdowns + volume + icons). Portrait keeps the centered block with
  the transport below. Verified clean in both orientations down to ~300px tall.

Engine untouched; conformance unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 11:03:18 -05:00
Me Here
582118abf9 pm-mobile: per-lane gain + Save & Library (create/save-as/reorder tracks)
- Per-lane gain: a volume slider (-18..+6 dB) in the lane dialog → m.gainDb,
  encoded in the lane token (e.g. kick:4@-6) and saved with the track.
- Save & Library sheet (💾): writes to the SAME store/format as the editor
  (metronome.setlists), so tracks made on the phone show up in the editor too.
    * Save current track: name + target set list (or "+ New set list"),
      "Save as new track" (always) and "Update <name>" for your own tracks —
      Update confirms the overwrite (the iterate-and-resave path is one tap, but
      a named confirm prevents accidentally clobbering the original when you
      meant to save a new track).
    * Manage library: reorder (up/down), rename and delete your set lists and
      their tracks; built-ins stay read-only (Save-as copies edits out of them).
- Built-in/transient set lists can't be overwritten — saving promotes the live
  working copy into one of your own set lists.

Engine untouched; conformance suite unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:35:57 -05:00
Me Here
8f5635af52 pm-mobile: track settings dialog, balanced layout, clearer help wording
- Help wording: Practice no longer says "record" (which read like audio
  capture) — it now says it times your playing and logs it to the practice log,
  not audio. Play step and the session bar reworded too ("Practising…").
- Track settings dialog (mirrors the lane dialog), opened from a "⚙ Track"
  summary button under the lanes: bar count, end behavior (loop / stop / next),
  tempo ramp, practice gaps, and copy/paste of the track share-string. These
  were previously read-only chips; now editable and persisted.
  end/loop is now honored at runtime: loop repeats the phrase, stop halts at the
  bar count, next advances the set list (the bar readout cycles 1..N when looping).
- Layout: pulse + lanes are centered as one block with the transport pinned at
  the bottom — kills the big empty mid-band. Landscape reflows to pulse-left /
  lanes-right with a full-width transport. Bigger pulse.

Engine untouched; conformance suite unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:03:06 -05:00
Me Here
8b795d4107 pm-mobile: editable lane pads, guided help tour, persisted state
- Editable lanes (no notation/konnakol — just pads): each lane is a row of pads
  that blink on the beat; tap a pad to cycle rest → beat → accent → ghost. A
  lane's label opens a sheet to set sound, grouping (e.g. 2+2+3), subdivision,
  swing, mute and polymeter; plus "+ Add lane" / delete. Edits are live and feed
  straight into the scheduler. (Replaces the read-only lane chips; the global
  feature chips — bars/end/ramp/gaps — stay.)
- Help: a "?" runs a 7-step guided coachmark tour (spotlight + tooltip), shown
  once on first run and re-runnable anytime. Removed the instruction hint under
  the BPM (the tour covers it). Tour also frames tracks as named practice items.
- Persist + restore: the working state (set list / track / tempo / volume / lane
  edits) is saved to metronome.mobile.state and restored on reload.
- Dropped the separate beat-dot row — the pulse flash + per-lane pad playhead
  cover it, freeing room for the editable lanes.

Engine untouched; conformance suite unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 09:44:31 -05:00
Me Here
812a69942f pm-mobile: sessions page — per-track comparison + collapsible sessions
- Top section aggregates the CURRENT track across all sessions (track picker
  defaults to the metronome's current track, persisted via metronome.curtrack):
  total time / plays / bpm range, plus a per-session comparison table so you can
  watch a single track progress across days.
- Each session is now a collapsible <details>: the summary shows a friendly
  timestamp ("Fri Jun 16 at 2:46 PM") with total/practiced/track-count; the note
  + per-track aggregate table + delete live in the expanded body.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 09:32:28 -05:00
Me Here
5b11363520 pm-mobile: practice sessions, richer readout, BPM-tap, lane/feature detail
Bigger rework of the mobile player around a new "practice session" concept,
plus a second page to review sessions.

Transport / sessions:
- Practice now starts a continuous SESSION clock and begins practicing the
  current track. While practicing, the Play button becomes Stop and Practice
  becomes Pause, so Practice starts/stops individual tracks while the session
  clock keeps running. Stop (the Play button) ends the session and records it.
- Plain Play still runs the metronome with no session/recording.
- Each track-practice is one segment {name, at, sec, bpm}; sub-3s blips are
  skipped. A session = {at, endedAt, clockSec, note, segments[]} stored under
  metronome.sessions (replaces the old per-track metronome.logs sheet).
- Switching track / set list mid-session rolls the current segment over.

Display:
- Removed the Tap Tempo button; the BPM display now does it: tap = tap tempo,
  hold = type an exact value, vertical drag = scrub.
- Detail panel shows every lane (canonical share-token chips, disabled lanes
  struck through) and the active features: bar count, end behavior, ramp, and
  gaps (trainer play/mute).
- Meter line shows live bar count with total (e.g. "bar 4 / 16") and elapsed
  play time; the bottom bar shows live session time + track count while
  recording, and links to the sessions page otherwise.

New page mobile-sessions.html: lists saved sessions, each with an editable note
(autosaved) and an aggregate table of tracks practiced in that session
(track - time - plays - bpm range), with per-session delete. PWA scope widened
to /mobile so both pages stay in the installed app + offline (SW v2).

Engine untouched; conformance suite unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 09:14:41 -05:00
Me Here
dca2a405f7 pm-mobile: top dropdowns, ±10 tempo, Play/Practice split, collapsible log
Reworks the mobile player's controls per use on a phone:

- Set list + track are now two dropdowns at the top (with the volume slider +
  theme/fullscreen beside them); drops the hamburger/bottom-sheet menu. The
  track dropdown stays in sync with prev/next and set-list auto-advance.
- Tempo grid adds coarse -10/+10 buttons above the fine -/+ buttons, laid out
  as a 4-col grid with prev/next and play/practice in the centre columns.
- Separate Play and Practice transports: Play runs the metronome without
  touching the practice log; Practice runs AND records a session
  (metronome.logs, same format/key as the editor: {at,name,durationSec,bpm,
  lanes}, per-track history, sub-3s blips skipped).
- Tap Tempo restyled as a real button.
- Collapsible practice log: a thin bar at the bottom opens a bottom-sheet
  showing past sessions for the current track (date - duration @ bpm), with
  per-entry delete and clear-this-track.

Landscape phones switch to a two-column layout (pulse left, transport right) so
everything fits without vertical overflow. Engine untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 08:52:41 -05:00
Me Here
a3a09bc77d pm-mobile: touch-first phone/tablet PWA player (mobile.html)
A new full-screen, touch-first edition of the player aimed at phones through
tablets - no native app, just a web page you can "Add to Home Screen".

Reuses the shared engine + look-ahead scheduler (same player loop as
player.html); new UI is a big pulsing beat display, beat-dot row with accent
grouping, huge BPM (tap to type, vertical drag to scrub), prev/play/next +/-
and tap-tempo, and a bottom sheet for set lists / patch+link loading / volume.

Mobile concerns handled:
- iOS ring/silent switch: navigator.audioSession.type="playback" + a silent
  buffer warmup inside the play gesture, so audio isn't muted by the switch.
- Screen Wake Lock while running (re-acquired on visibilitychange).
- PWA: manifest.webmanifest + apple-touch meta + mobile-sw.js (network-first
  app shell, passthrough for everything else) -> installable + offline.
  Multi-file is fine here since it targets mobile (waives the single-file rule).
- viewport-fit=cover + safe-area insets, no user zoom, touch-action:manipulation,
  overscroll-behavior:none; transport buttons flex-share the row so they never
  overflow a narrow phone; responsive portrait/landscape, phone->tablet.
- Fullscreen toggle where supported (Android/desktop; iOS uses home-screen PWA).

Wired into build.sh + deploy.sh (page + PWA assets) and added to the index
gallery as PM_M-1 Mobile. New metronome app icons generated in assets/.
Conformance suite unaffected (engine untouched): 47 pass, 1 known.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 08:21:52 -05:00