From 46397627e4385ce72fe513d5689901b35d1ac802 Mon Sep 17 00:00:00 2001 From: Me Here Date: Tue, 2 Jun 2026 08:31:43 -0500 Subject: [PATCH] editors: never auto-prompt for Web MIDI on load (privacy) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit editor.html + pm_e-2.html called _ensureMidi() (requestMIDIAccess{sysex:true}, which always prompts) on page load. Gate it behind a permission query — only auto-reconnect if MIDI is already granted (querying does not prompt); otherwise wait for the user to click the connect badge / Device-audio button. (editor-beta.html already had no on-load MIDI call.) --- editor.html | 12 +- pm_e-2.html | 1797 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1805 insertions(+), 4 deletions(-) create mode 100644 pm_e-2.html diff --git a/editor.html b/editor.html index 99e297f..c596e6c 100644 --- a/editor.html +++ b/editor.html @@ -1719,10 +1719,14 @@ refreshFeatureBoxes(); $("continueMode").checked = continueMode; $("timersOn").checked = timersOn; $("logSessions").checked = loggingOn; -// Connect to a PM_K-1 / PM_X-1 over USB-MIDI on load so the header badge reflects the link -// (Chrome remembers the grant; first visit prompts once). updateDevBadge runs via _wireMidi. -if (navigator.requestMIDIAccess) _ensureMidi().then(updateDevBadge).catch(() => updateDevBadge()); -else updateDevBadge(); +// Never prompt for Web MIDI on load. Only auto-reconnect if the user ALREADY granted it (querying +// the permission does NOT prompt); otherwise just show the badge — the "connect device" badge and +// the Device-audio button request access on an explicit click. +if (navigator.requestMIDIAccess && navigator.permissions && navigator.permissions.query) { + navigator.permissions.query({ name: "midi", sysex: true }) + .then(p => { if (p.state === "granted") _ensureMidi().then(updateDevBadge).catch(() => updateDevBadge()); else updateDevBadge(); }) + .catch(() => updateDevBadge()); +} else updateDevBadge(); requestAnimationFrame(drawLoop); /*@BUILD:include:src/chrome.js@*/ diff --git a/pm_e-2.html b/pm_e-2.html new file mode 100644 index 0000000..fe713d9 --- /dev/null +++ b/pm_e-2.html @@ -0,0 +1,1797 @@ + + + + + +PM_E‑2 — PolyMeter Editor (Notation) + + + + + + + + + +/*@BUILD:include:src/header.html@*/ + +
+
+
+

PM_E‑2 PolyMeter Editor Notation

+
+ ◎ connect device + +
+
+
Space play · T tap · ←→ tempo · ↑↓ cue · ⏎ commit · N/P step · A add · ? help
+ + +
+
+
+
+
+
120
+
+ 0:00 + + + + +
+
 
+
+
+
+ +
+
+
Now loaded
+
Free play
+
+
+
+
+
+
+ +
+
+ +
+ + +
+
+
+ +
+ + + +
+
+
+ +
+
+ + +
+
+ + +
+
+ + 0 = manual +
+
+ + + +
+
+
+
+
+
+
+ + +
+ Lanes — add voices; set grouping, subdivision, swing, polyrhythm, gain +
+
+
+ +
Click a step on the Staff or TUBS grid to cycle accent → normal → ghost → rest; Shift-click cycles flam → drag → roll.
+ +
+ Konnakol +
+
+
+ Staff +
+
+
+ TUBS +
+
+ + +
+ + + +
+ +/*@BUILD:include:src/footer.html@*/ + + +
+ + + + +
+ + + + + + + + +