Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

notepat: space-release-press stutter grabs fresh ~500 ms chunk each time

Addresses "the spacebar still adds time" / "it should be possible to
quickly reverse again back and basically repeat myself" — the reverse-
playback capture window used to shrink with rapid re-presses because
`captureMs = now - reversePhaseStartMs`, and that delta is tiny when
the user taps space again right after releasing. With a short window
the snapshot had barely anything to reverse and the whole gesture felt
like dead silence.

Added a floor: every press grabs AT LEAST REVERSE_MIN_CAPTURE_MS
(500 ms) of recent audio regardless of when the previous press fired.
Also dropped the 40 ms captureMs-minimum bailout — no longer needed
once the floor is in place, and it was occasionally swallowing taps
that happened within 40 ms of a recently-released press.

Stutter flow now:
tap → reverse 500 ms
release → replay voice stops, capture ring resumes
tap → reverse SAME 500 ms again (minus the couple of ms since release)
release → …
repeat freely to loop the last gesture

output_history_paused keeps the ring FROZEN during each hold, so
the capture between rapid taps is dominated by the original
pre-press audio rather than any overdub — the stutter reads as a
true repeat rather than a fading collage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+14 -2
+14 -2
fedac/native/pieces/notepat.mjs
··· 682 682 // previous press, then resets the phase start. So what happened during the 683 683 // previous phase becomes the new reverse source. 684 684 const REVERSE_MAX_AGE_MS = 12000; 685 + // Minimum chunk grabbed on every space-press, even if the user just 686 + // released a moment ago. Lets rapid press-release-press-release stutter 687 + // always have meaningful audio to reverse — the buffer still contains 688 + // the last ~500 ms of output so we re-snapshot it each press. 689 + const REVERSE_MIN_CAPTURE_MS = 500; 685 690 const REVERSE_MIN_BUFFER_SAMPLES = 256; 686 691 let spaceHeld = false; 687 692 // Last key pressed (for the top-of-screen debug/status label). Any ··· 742 747 } 743 748 744 749 const now = Date.now(); 745 - const captureMs = Math.min(REVERSE_MAX_AGE_MS, Math.max(0, now - reversePhaseStartMs)); 750 + // Each press grabs the window of audio since the PREVIOUS press — unless 751 + // that window is short (rapid re-press), in which case we floor to 752 + // REVERSE_MIN_CAPTURE_MS so the reverse voice always has a meaningful 753 + // chunk to play. This is what makes the "press-release-press-release" 754 + // stutter gesture work: you can tap space repeatedly to keep reversing 755 + // (and loop back through) the same ~500 ms of recent audio, effectively 756 + // "repeating yourself" out of the live capture. 757 + const elapsed = Math.max(0, now - reversePhaseStartMs); 758 + const captureMs = Math.min(REVERSE_MAX_AGE_MS, Math.max(REVERSE_MIN_CAPTURE_MS, elapsed)); 746 759 reversePhaseStartMs = now; 747 760 stopReversePlayback(sound); 748 - if (captureMs < 40) return false; 749 761 750 762 const snapshot = sound.speaker.getRecentBuffer(captureMs / 1000); 751 763 const src = snapshot?.data;