aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-22 22:29:05 -0700
committerAdam Soltys <[email protected]>2026-10-22 22:29:05 -0700
commita0316a2a462a57a1c5832304820daf4d670c6d1b (patch)
treea08faa015604c9a3a5b5a2dccb3aa49736319cdf /tools
parentf4997d29a0c97eac61338448854c7ab9724cdc92 (diff)
downloadcoinosv3-a0316a2a462a57a1c5832304820daf4d670c6d1b.tar.gz
coinosv3-a0316a2a462a57a1c5832304820daf4d670c6d1b.zip
Zap sound: shorter and deeper — the strike alone, 0.35 s, 20% lower, low-passed at 2.6 kHz
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 <[email protected]>
Diffstat (limited to 'tools')
-rw-r--r--tools/zap-feedback-test.js7
1 files changed, 4 insertions, 3 deletions
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));