From a0316a2a462a57a1c5832304820daf4d670c6d1b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 22 Oct 2026 22:29:05 -0700 Subject: Zap sound: shorter and deeper — the strike alone, 0.35 s, 20% lower, low-passed at 2.6 kHz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adam auditioned twelve takes on the Jacob's ladder clip (freesound 536741) and chose this one: the first 0.45 s of the arc with its opening spike cut (0.10–0.45 s), pitched down 20%, the fizz above 2.6 kHz removed, a 130 ms fade. Same loudness as before (loudnorm −16 LUFS). The clip chunk shrinks from 12 KB to 4.7 KB of base64. tools/zap-feedback-test.js pins the new length (0.3–0.5 s) and dispatches the held-screen's two clicks in the page: the sound toggle re-renders that screen, and puppeteer's own click found its node detached mid-morph (failed on HEAD with the old clip too). Co-Authored-By: Claude Fable 5.1 --- tools/zap-feedback-test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/zap-feedback-test.js b/tools/zap-feedback-test.js index adc7663..80ec434 100644 --- a/tools/zap-feedback-test.js +++ b/tools/zap-feedback-test.js @@ -124,7 +124,7 @@ try { check('the same tap plays the supplied MP3 clip', await page.evaluate(() => { const samples = zapAudio.buffer?.getChannelData(0); return zapAudio.starts === 1 && zapAudio.context.state === 'running' - && zapAudio.buffer.duration > 1.2 && zapAudio.buffer.duration < 1.6 + && zapAudio.buffer.duration > 0.3 && zapAudio.buffer.duration < 0.5 && samples.some(v => Math.abs(v) > .05) && samples.every(v => Number.isFinite(v)); })); @@ -202,8 +202,9 @@ try { // The same screen switches the sound off; the strike and tally stay. await page.mouse.down(); await pause(650); await page.mouse.up(); await pause(100); check('the held screen offers the sound switch, on by default', await page.$eval('#setup input[type=checkbox]', (e) => e.checked)); - await page.click('#setup input[type=checkbox]'); - await page.click('#setup .btn-primary'); await pause(100); + // the toggle re-renders the screen mid-click: dispatch the clicks in the page, where a morph can't detach the node under the pointer + await page.$eval('#setup input[type=checkbox]', (e) => e.click()); await pause(150); + await page.$eval('#setup .btn-primary', (e) => e.click()); await pause(100); const starts = await page.evaluate(() => zapAudio.starts); await page.click('.note-zap'); await pause(100); check('with the sound off a tap still strikes and counts, silently', await page.evaluate((n, c) => zapAudio.starts === n && test.calls === c + 2 && !!document.querySelector('.zap-fx'), starts, calls)); -- cgit v1.2.3