real-time feedback loop
All checks were successful
/ build (push) Successful in 6m22s

This commit is contained in:
Nycki 2025-07-12 11:51:45 -07:00
parent 7ff9024ba5
commit 164aea2eae

View file

@ -27,12 +27,13 @@
<BUTTON onclick="
F.A?.close();
F.A=A=new AudioContext;
D=Date.now();
// kill some time for the audio context to start
S='@qx@'+F.value.toLowerCase();
S='@'+F.value.toLowerCase();
// stack
B=[];
// stack variables
K=O=T=Z=L=0;
K=L=O=T=Z=0;
U=137;
V=40;
// samples
@ -94,7 +95,7 @@ M=_=>{
// play sample
S=C[a]+S.slice(s--);
// loop
(S=S.slice(s))&&setTimeout(M,50)
// loop (but don't get too far ahead)
A.state!='closed'&&(S=S.slice(s))&&setTimeout(M,1000*T-Date.now()+D);
};M()
">#play</BUTTON> <BUTTON ONCLICK=F.A.close()>#stop