From 5b11363520e0d56a1a69e23c28f1901a0e5aa4a4 Mon Sep 17 00:00:00 2001 From: Me Here Date: Sun, 7 Jun 2026 09:14:41 -0500 Subject: [PATCH] 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) --- build.sh | 2 +- deploy.sh | 2 +- manifest.webmanifest | 2 +- mobile-sessions.html | 144 +++++++++++++++++++ mobile-sw.js | 3 +- mobile.html | 336 ++++++++++++++++++++++--------------------- 6 files changed, 322 insertions(+), 167 deletions(-) create mode 100644 mobile-sessions.html diff --git a/build.sh b/build.sh index bb2c5c6..d42129c 100755 --- a/build.sh +++ b/build.sh @@ -46,7 +46,7 @@ def build(name): out.write_text(src) return out.stat().st_size -for name in ("index.html","editor.html","editor-beta.html","pm_e-2.html","player.html","mobile.html","teacher.html","stage.html","micro.html","showcase.html","kit.html","explorer.html","grid.html", +for name in ("index.html","editor.html","editor-beta.html","pm_e-2.html","player.html","mobile.html","mobile-sessions.html","teacher.html","stage.html","micro.html","showcase.html","kit.html","explorer.html","grid.html", "embed.html", "info-editor.html","info-pm_e-2.html","info-player.html","info-teacher.html","info-stage.html","info-micro.html","info-showcase.html","info-kit.html","info-explorer.html","info-grid.html"): print("built %s (%dKB)" % (name, build(name) // 1024)) diff --git a/deploy.sh b/deploy.sh index 5ad06d4..192f547 100755 --- a/deploy.sh +++ b/deploy.sh @@ -40,7 +40,7 @@ fi # stamp the version into the built copy only (source stays clean) echo "deployed v$BUILD -> $DEST_DIR" -for f in index.html editor.html editor-beta.html pm_e-2.html player.html mobile.html teacher.html stage.html micro.html showcase.html kit.html explorer.html grid.html \ +for f in index.html editor.html editor-beta.html pm_e-2.html player.html mobile.html mobile-sessions.html teacher.html stage.html micro.html showcase.html kit.html explorer.html grid.html \ embed.html \ info-editor.html info-pm_e-2.html info-player.html info-teacher.html info-stage.html info-micro.html info-showcase.html info-kit.html info-explorer.html info-grid.html; do sed "s|const APP_VERSION = \"[^\"]*\";|const APP_VERSION = \"$BUILD\";|" "$DIST_DIR/$f" > "$DEST_DIR/$f" diff --git a/manifest.webmanifest b/manifest.webmanifest index 103f2a4..be658a3 100644 --- a/manifest.webmanifest +++ b/manifest.webmanifest @@ -4,7 +4,7 @@ "description": "Polymetric groove-trainer & metronome — touch-first, full-screen.", "id": "/mobile.html", "start_url": "/mobile.html?standalone=1", - "scope": "/mobile.html", + "scope": "/mobile", "display": "standalone", "display_override": ["standalone", "fullscreen"], "orientation": "any", diff --git a/mobile-sessions.html b/mobile-sessions.html new file mode 100644 index 0000000..0a0fe00 --- /dev/null +++ b/mobile-sessions.html @@ -0,0 +1,144 @@ + + + + + +VARASYS PolyMeter — Practice sessions + + + + + + + + + + + + +
+
+ ‹ Metronome +

Practice sessions

+
+
+
+
+
+ VARASYSVARASYS +  PolyMeter +
+
+ + + + diff --git a/mobile-sw.js b/mobile-sw.js index b21bf11..dacb8e6 100644 --- a/mobile-sw.js +++ b/mobile-sw.js @@ -8,9 +8,10 @@ * self-contained file that is version-stamped on deploy, so when the device is * online it always gets the freshest build; offline it still launches from cache. */ -const CACHE = "polymeter-mobile-v1"; +const CACHE = "polymeter-mobile-v2"; const SHELL = [ "/mobile.html", + "/mobile-sessions.html", "/manifest.webmanifest", "/icon-192.png", "/icon-512.png", diff --git a/mobile.html b/mobile.html index a016a5e..a871ef6 100644 --- a/mobile.html +++ b/mobile.html @@ -6,7 +6,7 @@ VARASYS PolyMeter — Mobile - + @@ -19,12 +19,10 @@