@jpdutoit/squelchy 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/{chunk-NDUSYSHF.js → chunk-MEZE4P3U.js} +5 -5
- package/chunk-MEZE4P3U.js.map +7 -0
- package/docs/GUIDE.md +29 -7
- package/docs/MODULES.md +6 -6
- package/docs/modules.json +10 -10
- package/index.d.ts +7 -241
- package/index.js +68 -260
- package/index.js.map +4 -4
- package/kits/compu-78/bd.flac +0 -0
- package/kits/compu-78/ch.flac +0 -0
- package/kits/compu-78/clap.flac +0 -0
- package/kits/compu-78/cym.flac +0 -0
- package/kits/compu-78/ht.flac +0 -0
- package/kits/compu-78/lt.flac +0 -0
- package/kits/compu-78/mt.flac +0 -0
- package/kits/compu-78/oh.flac +0 -0
- package/kits/compu-78/perc.flac +0 -0
- package/kits/compu-78/rim.flac +0 -0
- package/kits/compu-78/sd.flac +0 -0
- package/kits/compu-78.d.ts +7 -0
- package/kits/compu-78.js +22 -0
- package/kits/deep-analogue/bd.flac +0 -0
- package/kits/deep-analogue/ch.flac +0 -0
- package/kits/deep-analogue/clap.flac +0 -0
- package/kits/deep-analogue/cym.flac +0 -0
- package/kits/deep-analogue/ht.flac +0 -0
- package/kits/deep-analogue/lt.flac +0 -0
- package/kits/deep-analogue/mt.flac +0 -0
- package/kits/deep-analogue/oh.flac +0 -0
- package/kits/deep-analogue/perc.flac +0 -0
- package/kits/deep-analogue/rim.flac +0 -0
- package/kits/deep-analogue/sd.flac +0 -0
- package/kits/deep-analogue.d.ts +7 -0
- package/kits/deep-analogue.js +22 -0
- package/kits/dr5-studio/bd.flac +0 -0
- package/kits/dr5-studio/ch.flac +0 -0
- package/kits/dr5-studio/clap.flac +0 -0
- package/kits/dr5-studio/cym.flac +0 -0
- package/kits/dr5-studio/ht.flac +0 -0
- package/kits/dr5-studio/lt.flac +0 -0
- package/kits/dr5-studio/mt.flac +0 -0
- package/kits/dr5-studio/oh.flac +0 -0
- package/kits/dr5-studio/perc.flac +0 -0
- package/kits/dr5-studio/rim.flac +0 -0
- package/kits/dr5-studio/sd.flac +0 -0
- package/kits/dr5-studio.d.ts +7 -0
- package/kits/dr5-studio.js +22 -0
- package/kits/hard-cell/bd.flac +0 -0
- package/kits/hard-cell/ch.flac +0 -0
- package/kits/hard-cell/clap.flac +0 -0
- package/kits/hard-cell/cym.flac +0 -0
- package/kits/hard-cell/ht.flac +0 -0
- package/kits/hard-cell/lt.flac +0 -0
- package/kits/hard-cell/mt.flac +0 -0
- package/kits/hard-cell/oh.flac +0 -0
- package/kits/hard-cell/perc.flac +0 -0
- package/kits/hard-cell/rim.flac +0 -0
- package/kits/hard-cell/sd.flac +0 -0
- package/kits/hard-cell.d.ts +7 -0
- package/kits/hard-cell.js +22 -0
- package/kits/micro-click/bd.flac +0 -0
- package/kits/micro-click/ch.flac +0 -0
- package/kits/micro-click/clap.flac +0 -0
- package/kits/micro-click/cym.flac +0 -0
- package/kits/micro-click/ht.flac +0 -0
- package/kits/micro-click/lt.flac +0 -0
- package/kits/micro-click/mt.flac +0 -0
- package/kits/micro-click/oh.flac +0 -0
- package/kits/micro-click/perc.flac +0 -0
- package/kits/micro-click/rim.flac +0 -0
- package/kits/micro-click/sd.flac +0 -0
- package/kits/micro-click.d.ts +7 -0
- package/kits/micro-click.js +22 -0
- package/kits/roland-808/bd.flac +0 -0
- package/kits/roland-808/ch.flac +0 -0
- package/kits/roland-808/clap.flac +0 -0
- package/kits/roland-808/cym.flac +0 -0
- package/kits/roland-808/ht.flac +0 -0
- package/kits/roland-808/lt.flac +0 -0
- package/kits/roland-808/mt.flac +0 -0
- package/kits/roland-808/oh.flac +0 -0
- package/kits/roland-808/perc.flac +0 -0
- package/kits/roland-808/rim.flac +0 -0
- package/kits/roland-808/sd.flac +0 -0
- package/kits/roland-808.d.ts +7 -0
- package/kits/roland-808.js +22 -0
- package/kits/rx5-fm/bd.flac +0 -0
- package/kits/rx5-fm/ch.flac +0 -0
- package/kits/rx5-fm/clap.flac +0 -0
- package/kits/rx5-fm/cym.flac +0 -0
- package/kits/rx5-fm/ht.flac +0 -0
- package/kits/rx5-fm/lt.flac +0 -0
- package/kits/rx5-fm/mt.flac +0 -0
- package/kits/rx5-fm/oh.flac +0 -0
- package/kits/rx5-fm/perc.flac +0 -0
- package/kits/rx5-fm/rim.flac +0 -0
- package/kits/rx5-fm/sd.flac +0 -0
- package/kits/rx5-fm.d.ts +7 -0
- package/kits/rx5-fm.js +22 -0
- package/kits/tape-dust/bd.flac +0 -0
- package/kits/tape-dust/ch.flac +0 -0
- package/kits/tape-dust/clap.flac +0 -0
- package/kits/tape-dust/cym.flac +0 -0
- package/kits/tape-dust/ht.flac +0 -0
- package/kits/tape-dust/lt.flac +0 -0
- package/kits/tape-dust/mt.flac +0 -0
- package/kits/tape-dust/oh.flac +0 -0
- package/kits/tape-dust/perc.flac +0 -0
- package/kits/tape-dust/rim.flac +0 -0
- package/kits/tape-dust/sd.flac +0 -0
- package/kits/tape-dust.d.ts +7 -0
- package/kits/tape-dust.js +22 -0
- package/kits/tr-606/bd.flac +0 -0
- package/kits/tr-606/ch.flac +0 -0
- package/kits/tr-606/cym.flac +0 -0
- package/kits/tr-606/ht.flac +0 -0
- package/kits/tr-606/lt.flac +0 -0
- package/kits/tr-606/mt.flac +0 -0
- package/kits/tr-606/oh.flac +0 -0
- package/kits/tr-606/sd.flac +0 -0
- package/kits/tr-606.d.ts +7 -0
- package/kits/tr-606.js +19 -0
- package/kits/tr-707/bd.flac +0 -0
- package/kits/tr-707/ch.flac +0 -0
- package/kits/tr-707/clap.flac +0 -0
- package/kits/tr-707/cym.flac +0 -0
- package/kits/tr-707/ht.flac +0 -0
- package/kits/tr-707/lt.flac +0 -0
- package/kits/tr-707/mt.flac +0 -0
- package/kits/tr-707/oh.flac +0 -0
- package/kits/tr-707/perc.flac +0 -0
- package/kits/tr-707/rim.flac +0 -0
- package/kits/tr-707/sd.flac +0 -0
- package/kits/tr-707.d.ts +7 -0
- package/kits/tr-707.js +22 -0
- package/kits/tr-909/bd.flac +0 -0
- package/kits/tr-909/ch.flac +0 -0
- package/kits/tr-909/clap.flac +0 -0
- package/kits/tr-909/cym.flac +0 -0
- package/kits/tr-909/ht.flac +0 -0
- package/kits/tr-909/lt.flac +0 -0
- package/kits/tr-909/mt.flac +0 -0
- package/kits/tr-909/oh.flac +0 -0
- package/kits/tr-909/perc.flac +0 -0
- package/kits/tr-909/rim.flac +0 -0
- package/kits/tr-909/sd.flac +0 -0
- package/kits/tr-909.d.ts +7 -0
- package/kits/tr-909.js +22 -0
- package/meta.json +16 -16
- package/package.json +6 -1
- package/{worklets-inline-MUVFLGPY.js → worklets-inline-DFWINMCS.js} +2 -2
- package/chunk-NDUSYSHF.js.map +0 -7
- /package/{worklets-inline-MUVFLGPY.js.map → worklets-inline-DFWINMCS.js.map} +0 -0
package/README.md
CHANGED
|
@@ -53,13 +53,14 @@ transport.start();
|
|
|
53
53
|
|
|
54
54
|
## Sample kits
|
|
55
55
|
|
|
56
|
-
Drum kits are CC0 / public domain
|
|
56
|
+
Drum kits are CC0 / public domain and ship inside the package, one import per kit. Your bundler copies and hashes the sound files of the kits you import, and only those. The full list is in `docs/GUIDE.md`.
|
|
57
57
|
|
|
58
58
|
```ts
|
|
59
|
-
import {
|
|
59
|
+
import { loadSampleSet, SampleVoice, now } from '@jpdutoit/squelchy';
|
|
60
|
+
import { Roland808 } from '@jpdutoit/squelchy/kits/roland-808';
|
|
60
61
|
|
|
61
62
|
const ctx = new AudioContext();
|
|
62
|
-
const kit = await loadSampleSet(ctx,
|
|
63
|
+
const kit = await loadSampleSet(ctx, Roland808);
|
|
63
64
|
const bd = SampleVoice.create(ctx, kit, 'bd');
|
|
64
65
|
bd.connect(ctx.destination);
|
|
65
66
|
bd.trigger(now(ctx)); // times are typed Seconds; now(ctx) is ctx.currentTime
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/lib-runtime/generated/worklet-src/adsr-envelope.ts
|
|
2
|
-
var adsr_envelope_default = '(()=>{var
|
|
2
|
+
var adsr_envelope_default = '(()=>{var x=Object.defineProperty;var R=(a,t,r)=>t in a?x(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var e=(a,t,r)=>R(a,typeof t!="symbol"?t+"":t,r);const L=Math.log(1e3);class D extends AudioWorkletProcessor{constructor(){super(...arguments);e(this,"_stage",0);e(this,"_level",0);e(this,"_prevGate",0);e(this,"_hold",0);e(this,"_prevEff",!1);e(this,"_dFor",-1);e(this,"_kd",0);e(this,"_rFor",-1);e(this,"_kr",0)}static get parameterDescriptors(){return[{name:"attack",defaultValue:.01,minValue:.001,maxValue:2},{name:"decay",defaultValue:.46,minValue:.001,maxValue:10},{name:"sustain",defaultValue:.7,minValue:0,maxValue:1},{name:"release",defaultValue:2.1,minValue:.001,maxValue:20}]}process(r,V,i){const f=r[0]?.[0],n=V[0]?.[0];if(!n)return!0;const l=sampleRate,c=i.attack,_=i.decay,v=i.sustain,u=i.release;for(let s=0;s<n.length;s++){const p=f?f[s]:0,g=p>.5,F=this._prevGate>.5,k=c.length>1?c[s]:c[0],o=_.length>1?_[s]:_[0],d=v.length>1?v[s]:v[0],E=u.length>1?u[s]:u[0];g&&!F?(this._hold=Math.ceil((k+o)*l)+1,this._stage=1):this._hold>0&&this._hold--;const A=g||this._hold>0,m=this._prevEff;switch(A&&!m?this._stage=1:!A&&m&&(this._stage=4),this._stage){case 1:{const h=1/Math.max(k*l,1);this._level+=h,this._level>=1&&(this._level=1,this._stage=2);break}case 2:{o!==this._dFor&&(this._dFor=o,this._kd=Math.exp(-L/Math.max(o*l,1)));const h=(this._level-d)*this._kd;this._level=Math.abs(h)<1e-7?d:d+h;break}case 4:{E!==this._rFor&&(this._rFor=E,this._kr=Math.exp(-L/Math.max(E*l,1))),this._level*=this._kr,this._level<=1e-5&&(this._level=0,this._stage=0);break}case 0:default:this._level=0;break}this._prevGate=p,this._prevEff=A,n[s]=this._level}return!0}}registerProcessor("adsr-envelope",D);})();\n';
|
|
3
3
|
|
|
4
4
|
// src/lib-runtime/generated/worklet-src/bitcrusher.ts
|
|
5
5
|
var bitcrusher_default = '(()=>{var _=Object.defineProperty;var g=(e,t,r)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var l=(e,t,r)=>g(e,typeof t!="symbol"?t+"":t,r);class m extends AudioWorkletProcessor{constructor(){super(...arguments);l(this,"_held",0);l(this,"_phase",0)}static get parameterDescriptors(){return[{name:"bits",defaultValue:8,minValue:1,maxValue:16},{name:"rate",defaultValue:1,minValue:.01,maxValue:1}]}process(r,c,n){const u=r[0]?.[0],a=c[0]?.[0];if(!u||!a)return!0;const o=n.bits,i=n.rate;for(let s=0;s<a.length;s++){const p=o.length>1?o[s]:o[0],d=i.length>1?i[s]:i[0];if(this._phase+=d,this._phase>=1){this._phase-=1;const h=Math.pow(2,p);this._held=Math.round(u[s]*h)/h}a[s]=this._held}return!0}}registerProcessor("bitcrusher",m);})();\n';
|
|
@@ -11,7 +11,7 @@ var comb_filter_default = '(()=>{var V=Object.defineProperty;var X=(a,e,r)=>e in
|
|
|
11
11
|
var env_follower_default = '(()=>{var d=Object.defineProperty;var h=(t,e,a)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var u=(t,e,a)=>h(t,typeof e!="symbol"?e+"":e,a);class V extends AudioWorkletProcessor{constructor(){super(...arguments);u(this,"envelope",0)}static get parameterDescriptors(){return[{name:"attack",defaultValue:.01,minValue:.001,maxValue:.5,automationRate:"k-rate"},{name:"release",defaultValue:.1,minValue:.001,maxValue:2,automationRate:"k-rate"}]}process(a,f,l){const s=a[0]?.[0],n=f[0]?.[0];if(!s||!n)return!0;const m=l.attack[0],p=l.release[0],k=Math.exp(-1/(m*sampleRate)),v=Math.exp(-1/(p*sampleRate));let o=this.envelope;for(let r=0;r<s.length;r++){const c=Math.abs(s[r]),i=c>o?k:v;o=i*o+(1-i)*c,n[r]=o}return this.envelope=o,!0}}registerProcessor("env-follower",V);})();\n';
|
|
12
12
|
|
|
13
13
|
// src/lib-runtime/generated/worklet-src/fdn-reverb.ts
|
|
14
|
-
var fdn_reverb_default = '(()=>{var
|
|
14
|
+
var fdn_reverb_default = '(()=>{var nt=Object.defineProperty;var at=(u,c,n)=>c in u?nt(u,c,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[c]=n;var a=(u,c,n)=>at(u,typeof c!="symbol"?c+"":c,n);const ot=[29.7,37.1,41.1,43.7],rt=[5,1.7],it=[4.3,2.3],B=.5,ct=1e-20,lt=500;function pt(u,c){const n=1-u,m=2*Math.PI*c/sampleRate;return u/Math.sqrt(1-2*n*Math.cos(m)+n*n)}class ut extends AudioWorkletProcessor{constructor(n){super();a(this,"combBuf",[]);a(this,"combLen",[]);a(this,"combIdx",[0,0,0,0]);a(this,"combDelaySec",[]);a(this,"lpState",[0,0,0,0]);a(this,"apBuf",[]);a(this,"apLen",[]);a(this,"apIdx",[0,0]);a(this,"sApBuf",[]);a(this,"sApLen",[]);a(this,"sApIdx",[0,0]);a(this,"ceiling");a(this,"g",[0,0,0,0]);a(this,"lpCoef",0);const m=n?.processorOptions?.size??1;this.ceiling=n?.processorOptions?.feedbackCeiling??.995;for(let r=0;r<4;r++){const i=ot[r]/1e3*m,l=Math.max(2,Math.round(i*sampleRate));this.combDelaySec.push(l/sampleRate),this.combLen.push(l),this.combBuf.push(new Float32Array(l))}for(let r=0;r<2;r++){const i=Math.max(2,Math.round(rt[r]/1e3*sampleRate));this.apLen.push(i),this.apBuf.push(new Float32Array(i));const l=Math.max(2,Math.round(it[r]/1e3*sampleRate));this.sApLen.push(l),this.sApBuf.push(new Float32Array(l))}}static get parameterDescriptors(){return[{name:"rt60",defaultValue:2,minValue:.05,maxValue:30,automationRate:"k-rate"},{name:"damping",defaultValue:.55,minValue:0,maxValue:1,automationRate:"k-rate"}]}targetGains(n,m){return this.combDelaySec.map(r=>Math.min(Math.pow(10,-3*r/Math.max(n,.05))/m,this.ceiling))}process(n,m,r){const i=m[0];if(!i||!i[0])return!0;const l=i[0],z=l.length,p=n[0],G=r.rt60[0],j=r.damping[0],N=800*Math.pow(20,Math.max(0,Math.min(1,j))),L=1-Math.exp(-2*Math.PI*N/sampleRate),q=this.targetGains(G,pt(L,lt)),_=.15;for(let t=0;t<4;t++)this.g[t]+=(q[t]-this.g[t])*_;this.lpCoef+=(L-this.lpCoef)*_;const[P,C,O,w]=this.combBuf,[H,W,Z,J]=this.combLen,A=this.g,x=this.lpCoef,o=this.lpState,e=this.combIdx,D=i.length>1?i[1]:null,K=!!(p&&p.length>1);for(let t=0;t<z;t++){let f=0,b=0;if(p&&p.length){for(let s=0;s<p.length;s++)f+=p[s][t];p.length>1&&(f/=p.length),K&&(b=.5*(p[0][t]-p[1][t]))}const Q=P[e[0]],U=C[e[1]],X=O[e[2]],Y=w[e[3]];o[0]+=(Q-o[0])*x,o[1]+=(U-o[1])*x,o[2]+=(X-o[2])*x,o[3]+=(Y-o[3])*x;const E=o[0],T=o[1],V=o[2],k=o[3],v=E*A[0],y=T*A[1],I=V*A[2],R=k*A[3],$=.5*(v+y+I+R),tt=.5*(v-y+I-R),et=.5*(v+y-I-R),st=.5*(v-y-I+R);P[e[0]]=f+b+$,C[e[1]]=f-b+tt,O[e[2]]=f+b+et,w[e[3]]=f-b+st,e[0]=e[0]+1===H?0:e[0]+1,e[1]=e[1]+1===W?0:e[1]+1,e[2]=e[2]+1===Z?0:e[2]+1,e[3]=e[3]+1===J?0:e[3]+1;let S=.5*(E+V),F=.5*(T+k);for(let s=0;s<2;s++){const g=this.apBuf[s],h=this.apIdx[s],d=g[h],M=S+d*B;g[h]=M,S=d-M*B,this.apIdx[s]=h+1===this.apLen[s]?0:h+1}for(let s=0;s<2;s++){const g=this.sApBuf[s],h=this.sApIdx[s],d=g[h],M=F+d*B;g[h]=M,F=d-M*B,this.sApIdx[s]=h+1===this.sApLen[s]?0:h+1}D?(l[t]=S,D[t]=F):l[t]=.5*(S+F)}for(let t=0;t<4;t++)Math.abs(o[t])<ct&&(o[t]=0);for(let t=2;t<i.length;t++)i[t].set(i[t&1]);return!0}}registerProcessor("fdn-reverb",ut);})();\n';
|
|
15
15
|
|
|
16
16
|
// src/lib-runtime/generated/worklet-src/flanger.ts
|
|
17
17
|
var flanger_default = '(()=>{var D=Object.defineProperty;var P=(r,e,i)=>e in r?D(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i;var a=(r,e,i)=>P(r,typeof e!="symbol"?e+"":e,i);const M=.009000000000000001,p=class p extends AudioWorkletProcessor{constructor(){super(...arguments);a(this,"bufs",[]);a(this,"writeIdx",0);a(this,"phase",0);a(this,"dcX",[]);a(this,"dcY",[]);a(this,"dcR",1-2*Math.PI*5/sampleRate)}static get parameterDescriptors(){return[{name:"rate",defaultValue:.5,minValue:.05,maxValue:10,automationRate:"a-rate"},{name:"depth",defaultValue:.7,minValue:0,maxValue:1,automationRate:"a-rate"},{name:"feedback",defaultValue:.7,minValue:0,maxValue:.95,automationRate:"a-rate"}]}process(i,E,f){const x=i[0]??[],c=E[0]??[];if(!c.length)return!0;const V=c[0].length,m=f.rate,S=f.depth,A=f.feedback,n=p.LEN,R=c.length;for(;this.bufs.length<R;)this.bufs.push(new Float32Array(n)),this.dcX.push(0),this.dcY.push(0);for(let s=0;s<V;s++){const _=m.length>1?m[s]:m[0],w=S.length>1?S[s]:S[0],Y=A.length>1?A[s]:A[0];let h=(.005+w*.004*Math.sin(2*Math.PI*this.phase))*sampleRate;h<1?h=1:h>n-2&&(h=n-2);let l=this.writeIdx-h;l<0&&(l+=n);const o=l|0,v=l-o,L=o+1===n?0:o+1;for(let t=0;t<R;t++){const d=this.bufs[t],g=x[t]??x[0],b=d[o]+v*(d[L]-d[o]),y=b-this.dcX[t]+this.dcR*this.dcY[t];this.dcX[t]=b,this.dcY[t]=y;let u=(g?g[s]:0)+Y*y;u>-1e-20&&u<1e-20&&(u=0),d[this.writeIdx]=u,c[t][s]=b}this.writeIdx=this.writeIdx+1===n?0:this.writeIdx+1,this.phase+=_/sampleRate,this.phase>=1&&(this.phase-=1)}return!0}};a(p,"LEN",Math.ceil(M*sampleRate)+8);let I=p;registerProcessor("flanger",I);})();\n';
|
|
@@ -44,10 +44,10 @@ var map_voct_to_period_default = '(()=>{class i extends AudioWorkletProcessor{st
|
|
|
44
44
|
var ping_pong_default = '(()=>{var I=Object.defineProperty;var k=(s,e,n)=>e in s?I(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n;var r=(s,e,n)=>k(s,typeof e!="symbol"?e+"":e,n);class x extends AudioWorkletProcessor{constructor(){super(...arguments);r(this,"bufL",new Float32Array(Math.ceil(2*sampleRate)+4));r(this,"bufR",new Float32Array(Math.ceil(2*2*sampleRate)+4));r(this,"wL",0);r(this,"wR",0);r(this,"dcX",0);r(this,"dcY",0);r(this,"dcR",1-2*Math.PI*5/sampleRate)}static get parameterDescriptors(){return[{name:"time",defaultValue:.3,minValue:.01,maxValue:2,automationRate:"k-rate"},{name:"feedback",defaultValue:.4,minValue:0,maxValue:.95,automationRate:"a-rate"}]}process(n,L,P){const X=n[0]?.[0],b=L[0]?.[0],_=L[1]?.[0];if(!b||!_)return!0;const v=P.time,M=P.feedback,g=this.bufL,A=this.bufR,f=g.length,R=A.length,F=this.dcR;let l=v[0]*sampleRate;l<1?l=1:l>f-3&&(l=f-3);let u=2*v[0]*sampleRate;u<1?u=1:u>R-3&&(u=R-3);let i=this.wL,o=this.wR,w=this.dcX,c=this.dcY;const y=(t,m,h,p)=>{let a=h-p;a<0&&(a+=m);const d=a|0,T=a-d,V=d+1===m?0:d+1;return t[d]+(t[V]-t[d])*T};for(let t=0;t<b.length;t++){const m=X?X[t]:0,h=M.length>1?M[t]:M[0],p=y(g,f,i,l),a=y(A,R,o,u);c=a-w+F*c,w=a,g[i]=m+h*c,A[o]=h*p,b[t]=p,_[t]=a,i++,i===f&&(i=0),o++,o===R&&(o=0)}return Math.abs(c)<1e-20&&(c=0),this.wL=i,this.wR=o,this.dcX=w,this.dcY=c,!0}}registerProcessor("ping-pong",x);})();\n';
|
|
45
45
|
|
|
46
46
|
// src/lib-runtime/generated/worklet-src/pitch-shifter.ts
|
|
47
|
-
var pitch_shifter_default = '(()=>{var
|
|
47
|
+
var pitch_shifter_default = '(()=>{var R=Object.defineProperty;var y=(i,e,t)=>e in i?R(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var r=(i,e,t)=>y(i,typeof e!="symbol"?e+"":e,t);class E extends AudioWorkletProcessor{constructor(t){super();r(this,"ring");r(this,"ringLen");r(this,"writePos",0);r(this,"readPos");r(this,"grainPhase");r(this,"grainLen");r(this,"jitterLen");r(this,"rng");this.rng=(t?.processorOptions?.seed??2654435769)>>>0||1,this.jitterLen=Math.round(sampleRate*.01),this.ringLen=Math.ceil(sampleRate*1),this.ring=new Float32Array(this.ringLen),this.grainLen=Math.floor(sampleRate*.08),this.readPos=new Float64Array([0,0]),this.grainPhase=new Float64Array([0,.5]),this.readPos[0]=this.readPos[1]=this.ringLen-this.grainLen}static get parameterDescriptors(){return[{name:"semitones",defaultValue:12,minValue:-24,maxValue:24,automationRate:"k-rate"}]}rand(){let t=this.rng;return t^=t<<13,t^=t>>>17,t^=t<<5,this.rng=t>>>0,this.rng/4294967296}process(t,P,p){const h=t[0]?.[0],o=P[0]?.[0];if(!o)return!0;const d=p.semitones[0],c=Math.pow(2,d/12),u=1/this.grainLen,L=2*Math.PI;for(let n=0;n<o.length;n++){const m=h?h[n]:0;this.ring[this.writePos]=m;let g=0;for(let s=0;s<2;s++){if(this.grainPhase[s]+=u,this.grainPhase[s]>=1){this.grainPhase[s]-=1;const f=Math.max(0,c-1)*this.grainLen+2+this.rand()*this.jitterLen;this.readPos[s]=(this.writePos-f+this.ringLen)%this.ringLen}else this.readPos[s]+=c,this.readPos[s]>=this.ringLen?this.readPos[s]-=this.ringLen:this.readPos[s]<0&&(this.readPos[s]+=this.ringLen);const l=this.readPos[s],a=l|0,A=l-a,S=(a+1)%this.ringLen,w=this.ring[a]+A*(this.ring[S]-this.ring[a]),N=.5-.5*Math.cos(L*this.grainPhase[s]);g+=w*N}o[n]=g,this.writePos=this.writePos+1===this.ringLen?0:this.writePos+1}return!0}}registerProcessor("pitch-shifter",E);})();\n';
|
|
48
48
|
|
|
49
49
|
// src/lib-runtime/generated/worklet-src/spring-reverb.ts
|
|
50
|
-
var spring_reverb_default = '(()=>{var
|
|
50
|
+
var spring_reverb_default = '(()=>{var $=Object.defineProperty;var tt=(n,o,e)=>o in n?$(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e;var s=(n,o,e)=>tt(n,typeof o!="symbol"?o+"":o,e);const c=[{stages:76,delayMs:37.9,chan:0},{stages:90,delayMs:41.7,chan:1},{stages:82,delayMs:51.3,chan:0},{stages:96,delayMs:47.9,chan:1}],b=c.length,st=.7,N=.95,et=2.4,at=4,nt=150,ot=15,it=.98,rt=1e-20,ct=500;function ht(n){if(n>3)return 1;if(n<-3)return-1;const o=n*n;return n*(27+o)/(27+9*o)}class pt extends AudioWorkletProcessor{constructor(){super();s(this,"apX",[]);s(this,"apY",[]);s(this,"dBuf",[]);s(this,"dLen",[]);s(this,"dIdx",[]);s(this,"fb",[]);s(this,"lp",[]);s(this,"dc",[]);s(this,"g",[]);s(this,"inHpState",0);s(this,"inHpCoef");s(this,"dcCoef");s(this,"a",.56);s(this,"lpCoef",.4);s(this,"knockPos",-1);s(this,"knockLen");s(this,"prevTrig",0);for(let e=0;e<b;e++){this.apX.push(new Float32Array(c[e].stages)),this.apY.push(new Float32Array(c[e].stages));const p=Math.max(2,Math.round(c[e].delayMs/1e3*sampleRate));this.dLen.push(p),this.dBuf.push(new Float32Array(p)),this.dIdx.push(0),this.fb.push(0),this.lp.push(0),this.dc.push(0),this.g.push(0)}this.inHpCoef=1-Math.exp(-2*Math.PI*nt/sampleRate),this.dcCoef=1-Math.exp(-2*Math.PI*ot/sampleRate),this.knockLen=Math.max(8,Math.round(at/1e3*sampleRate))}static get parameterDescriptors(){return[{name:"decay",defaultValue:1.5,minValue:.3,maxValue:4,automationRate:"k-rate"},{name:"tone",defaultValue:.6,minValue:0,maxValue:1,automationRate:"k-rate"},{name:"drip",defaultValue:.5,minValue:0,maxValue:1,automationRate:"k-rate"}]}process(e,p,m){const h=p[0];if(!h||!h[0])return!0;const x=h[0],w=h[1]??h[0],O=x.length,M=e[0]?.[0],E=e[0]?.[1]??M,I=e[1]?.[0],B=m.decay[0],D=Math.max(0,Math.min(1,m.tone[0])),K=.35+.42*Math.max(0,Math.min(1,m.drip[0]));this.a+=(K-this.a)*.1;const i=this.a,X=1100*Math.pow(6500/1100,D),g=1-Math.exp(-2*Math.PI*X/sampleRate);this.lpCoef+=(g-this.lpCoef)*.15;const Y=this.lpCoef,L=2*Math.PI*ct/sampleRate,k=Math.cos(L),Z=(1-i*i)/(1-2*i*k+i*i),v=1-g,G=g/Math.sqrt(1-2*v*k+v*v),A=1-this.dcCoef,y=1-A*k,C=A*Math.sin(L),H=y*y+C*C,q=1-this.dcCoef*y/H,z=this.dcCoef*C/H,J=G*Math.hypot(q,z);for(let a=0;a<b;a++){const l=(this.dLen[a]+c[a].stages*Z)/sampleRate,u=Math.min(Math.pow(10,-3*l/Math.max(B,.05))/J,it);this.g[a]+=(u-this.g[a])*.15}const U=this.inHpCoef,W=this.dcCoef;for(let a=0;a<O;a++){if(I){const t=I[a];t>.5&&this.prevTrig<=.5&&(this.knockPos=0),this.prevTrig=t}const l=M?(M[a]+E[a])*.5:0;this.inHpState+=U*(l-this.inHpState);let u=(l-this.inHpState)*st;this.knockPos>=0&&(u+=Math.sin(Math.PI*this.knockPos/this.knockLen)*et,++this.knockPos>=this.knockLen&&(this.knockPos=-1));let F=0,S=0;for(let t=0;t<b;t++){let d=u+this.fb[t]+rt;const R=this.apX[t],T=this.apY[t],j=R.length;for(let r=0;r<j;r++){const V=-i*d+R[r]+i*T[r];R[r]=d,T[r]=V,d=V}const _=this.dBuf[t],f=this.dIdx[t],Q=_[f];_[f]=d,this.dIdx[t]=f+1>=this.dLen[t]?0:f+1,this.lp[t]+=Y*(Q-this.lp[t]),this.dc[t]+=W*(this.lp[t]-this.dc[t]);const P=ht(this.lp[t]-this.dc[t]);this.fb[t]=P*this.g[t],c[t].chan===0?F+=P:S+=P}x[a]=F*N,w[a]=S*N}return!0}}registerProcessor("spring-reverb",pt);})();\n';
|
|
51
51
|
|
|
52
52
|
// src/lib-runtime/generated/worklet-src/tape-delay.ts
|
|
53
53
|
var tape_delay_default = '(()=>{var L=Object.defineProperty;var Z=(s,e,t)=>e in s?L(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var a=(s,e,t)=>Z(s,typeof e!="symbol"?e+"":e,t);function E(s){let e=s>>>0;return()=>{e=e+1831565813>>>0;let t=e;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}class O extends AudioWorkletProcessor{constructor(){super(...arguments);a(this,"buf",new Float32Array(Math.ceil(1.5*1.03*sampleRate)+4));a(this,"writeIdx",0);a(this,"tSlew",-1);a(this,"slewA",1-Math.exp(-1/(.08*sampleRate)));a(this,"phaseWow",0);a(this,"phaseFlut",0);a(this,"wowInc",2*Math.PI*.85/sampleRate);a(this,"rand",E(2057179700));a(this,"wander",0);a(this,"wanderTarget",0);a(this,"wanderCountdown",0);a(this,"damp",0);a(this,"dampD",Math.exp(-2*Math.PI*6e3/sampleRate));a(this,"dcX",0);a(this,"dcY",0);a(this,"dcR",1-2*Math.PI*5/sampleRate)}static get parameterDescriptors(){return[{name:"time",defaultValue:.375,minValue:.05,maxValue:1.5,automationRate:"k-rate"},{name:"feedback",defaultValue:.5,minValue:0,maxValue:.95,automationRate:"a-rate"},{name:"saturation",defaultValue:.4,minValue:0,maxValue:1,automationRate:"k-rate"},{name:"flutter",defaultValue:.3,minValue:0,maxValue:1,automationRate:"k-rate"}]}process(t,S,u){const R=t[0]?.[0],p=S[0]?.[0];if(!p)return!0;const b=u.time,f=u.feedback,A=u.saturation,F=u.flutter,o=this.buf,l=o.length,V=this.dampD,g=this.dcR,T=b[0];this.tSlew<0&&(this.tSlew=T);const W=1+A[0]*4,x=F[0];this.wanderCountdown<=0&&(this.wanderTarget=this.rand()*2-1,this.wanderCountdown=Math.round(.5*sampleRate)),this.wanderCountdown-=p.length,this.wander+=.02*(this.wanderTarget-this.wander);const y=2*Math.PI*6.3*(1+.12*this.wander)/sampleRate;let m=this.tSlew,M=this.phaseWow,_=this.phaseFlut,n=this.damp,P=this.dcX,i=this.dcY,r=this.writeIdx;for(let h=0;h<p.length;h++){const C=R?R[h]:0,k=f.length>1?f[h]:f[0];m+=this.slewA*(T-m);let I=0;x>0&&(M+=this.wowInc,_+=y,I=x*(.008*Math.sin(M)+.0015*Math.sin(_)));let c=m*(1+I)*sampleRate;c<1?c=1:c>l-3&&(c=l-3);let w=r-c;w<0&&(w+=l);const d=w|0,D=w-d,X=d+1===l?0:d+1,H=o[d]+(o[X]-o[d])*D;n+=(1-V)*(H-n);const v=(Math.tanh(W*n)+Math.tanh(W*n*.3)*.1)/1.1;i=v-P+g*i,P=v,o[r]=C+k*i,p[h]=v,r++,r===l&&(r=0)}return Math.abs(n)<1e-20&&(n=0),Math.abs(i)<1e-20&&(i=0),this.tSlew=m,this.phaseWow=M,this.phaseFlut=_,this.damp=n,this.dcX=P,this.dcY=i,this.writeIdx=r,!0}}registerProcessor("tape-delay",O);})();\n';
|
|
@@ -84,4 +84,4 @@ export {
|
|
|
84
84
|
vca_default,
|
|
85
85
|
waveshaper_default
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-MEZE4P3U.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/lib-runtime/generated/worklet-src/adsr-envelope.ts", "../src/lib-runtime/generated/worklet-src/bitcrusher.ts", "../src/lib-runtime/generated/worklet-src/comb-filter.ts", "../src/lib-runtime/generated/worklet-src/env-follower.ts", "../src/lib-runtime/generated/worklet-src/fdn-reverb.ts", "../src/lib-runtime/generated/worklet-src/flanger.ts", "../src/lib-runtime/generated/worklet-src/formant-table.ts", "../src/lib-runtime/generated/worklet-src/freq-divider.ts", "../src/lib-runtime/generated/worklet-src/freq-shifter.ts", "../src/lib-runtime/generated/worklet-src/glide.ts", "../src/lib-runtime/generated/worklet-src/ladder-filter.ts", "../src/lib-runtime/generated/worklet-src/map-res.ts", "../src/lib-runtime/generated/worklet-src/map-voct-to-freq.ts", "../src/lib-runtime/generated/worklet-src/map-voct-to-period.ts", "../src/lib-runtime/generated/worklet-src/ping-pong.ts", "../src/lib-runtime/generated/worklet-src/pitch-shifter.ts", "../src/lib-runtime/generated/worklet-src/spring-reverb.ts", "../src/lib-runtime/generated/worklet-src/tape-delay.ts", "../src/lib-runtime/generated/worklet-src/tape-stop.ts", "../src/lib-runtime/generated/worklet-src/vca.ts", "../src/lib-runtime/generated/worklet-src/waveshaper.ts"],
|
|
4
|
+
"sourcesContent": ["export default \"(()=>{var x=Object.defineProperty;var R=(a,t,r)=>t in a?x(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var e=(a,t,r)=>R(a,typeof t!=\\\"symbol\\\"?t+\\\"\\\":t,r);const L=Math.log(1e3);class D extends AudioWorkletProcessor{constructor(){super(...arguments);e(this,\\\"_stage\\\",0);e(this,\\\"_level\\\",0);e(this,\\\"_prevGate\\\",0);e(this,\\\"_hold\\\",0);e(this,\\\"_prevEff\\\",!1);e(this,\\\"_dFor\\\",-1);e(this,\\\"_kd\\\",0);e(this,\\\"_rFor\\\",-1);e(this,\\\"_kr\\\",0)}static get parameterDescriptors(){return[{name:\\\"attack\\\",defaultValue:.01,minValue:.001,maxValue:2},{name:\\\"decay\\\",defaultValue:.46,minValue:.001,maxValue:10},{name:\\\"sustain\\\",defaultValue:.7,minValue:0,maxValue:1},{name:\\\"release\\\",defaultValue:2.1,minValue:.001,maxValue:20}]}process(r,V,i){const f=r[0]?.[0],n=V[0]?.[0];if(!n)return!0;const l=sampleRate,c=i.attack,_=i.decay,v=i.sustain,u=i.release;for(let s=0;s<n.length;s++){const p=f?f[s]:0,g=p>.5,F=this._prevGate>.5,k=c.length>1?c[s]:c[0],o=_.length>1?_[s]:_[0],d=v.length>1?v[s]:v[0],E=u.length>1?u[s]:u[0];g&&!F?(this._hold=Math.ceil((k+o)*l)+1,this._stage=1):this._hold>0&&this._hold--;const A=g||this._hold>0,m=this._prevEff;switch(A&&!m?this._stage=1:!A&&m&&(this._stage=4),this._stage){case 1:{const h=1/Math.max(k*l,1);this._level+=h,this._level>=1&&(this._level=1,this._stage=2);break}case 2:{o!==this._dFor&&(this._dFor=o,this._kd=Math.exp(-L/Math.max(o*l,1)));const h=(this._level-d)*this._kd;this._level=Math.abs(h)<1e-7?d:d+h;break}case 4:{E!==this._rFor&&(this._rFor=E,this._kr=Math.exp(-L/Math.max(E*l,1))),this._level*=this._kr,this._level<=1e-5&&(this._level=0,this._stage=0);break}case 0:default:this._level=0;break}this._prevGate=p,this._prevEff=A,n[s]=this._level}return!0}}registerProcessor(\\\"adsr-envelope\\\",D);})();\\n\";\n", "export default \"(()=>{var _=Object.defineProperty;var g=(e,t,r)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var l=(e,t,r)=>g(e,typeof t!=\\\"symbol\\\"?t+\\\"\\\":t,r);class m extends AudioWorkletProcessor{constructor(){super(...arguments);l(this,\\\"_held\\\",0);l(this,\\\"_phase\\\",0)}static get parameterDescriptors(){return[{name:\\\"bits\\\",defaultValue:8,minValue:1,maxValue:16},{name:\\\"rate\\\",defaultValue:1,minValue:.01,maxValue:1}]}process(r,c,n){const u=r[0]?.[0],a=c[0]?.[0];if(!u||!a)return!0;const o=n.bits,i=n.rate;for(let s=0;s<a.length;s++){const p=o.length>1?o[s]:o[0],d=i.length>1?i[s]:i[0];if(this._phase+=d,this._phase>=1){this._phase-=1;const h=Math.pow(2,p);this._held=Math.round(u[s]*h)/h}a[s]=this._held}return!0}}registerProcessor(\\\"bitcrusher\\\",m);})();\\n\";\n", "export default \"(()=>{var V=Object.defineProperty;var X=(a,e,r)=>e in a?V(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>X(a,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r);class w extends AudioWorkletProcessor{constructor(r){super();o(this,\\\"len\\\");o(this,\\\"bufs\\\",[]);o(this,\\\"dcX\\\",[]);o(this,\\\"dcY\\\",[]);o(this,\\\"writeIdx\\\",0);o(this,\\\"dcR\\\",1-2*Math.PI*5/sampleRate);const f=Math.min(5,r?.processorOptions?.maxPeriod??.1);this.len=Math.ceil(f*sampleRate)+4}static get parameterDescriptors(){return[{name:\\\"period\\\",defaultValue:.005,minValue:0,maxValue:5,automationRate:\\\"a-rate\\\"},{name:\\\"feedback\\\",defaultValue:.7,minValue:0,maxValue:.95,automationRate:\\\"a-rate\\\"}]}process(r,f,_){const g=r[0]??[],i=f[0];if(!i||!i.length)return!0;const h=_.period,I=_.feedback,s=this.len,A=i[0].length,E=this.writeIdx;for(let t=0;t<i.length;t++){const u=this.bufs[t]??(this.bufs[t]=new Float32Array(s));let P=this.dcX[t]??0,b=this.dcY[t]??0;const x=g[t],F=i[t];let c=E;for(let n=0;n<A;n++){const y=h.length>1?h[n]:h[0],O=I.length>1?I[n]:I[0];let l=y*sampleRate;l<1?l=1:l>s-2&&(l=s-2);let p=c-l;p<0&&(p+=s);const d=p|0,v=p-d,C=d+1===s?0:d+1,R=u[d]+v*(u[C]-u[d]),D=R-P+this.dcR*b;P=R,b=D;let m=(x?x[n]:0)+O*D;m>-1e-20&&m<1e-20&&(m=0),u[c]=m,c=c+1===s?0:c+1,F[n]=R}this.dcX[t]=P,this.dcY[t]=b}return this.writeIdx=(E+A)%s,!0}}registerProcessor(\\\"comb-filter\\\",w);})();\\n\";\n", "export default \"(()=>{var d=Object.defineProperty;var h=(t,e,a)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var u=(t,e,a)=>h(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,a);class V extends AudioWorkletProcessor{constructor(){super(...arguments);u(this,\\\"envelope\\\",0)}static get parameterDescriptors(){return[{name:\\\"attack\\\",defaultValue:.01,minValue:.001,maxValue:.5,automationRate:\\\"k-rate\\\"},{name:\\\"release\\\",defaultValue:.1,minValue:.001,maxValue:2,automationRate:\\\"k-rate\\\"}]}process(a,f,l){const s=a[0]?.[0],n=f[0]?.[0];if(!s||!n)return!0;const m=l.attack[0],p=l.release[0],k=Math.exp(-1/(m*sampleRate)),v=Math.exp(-1/(p*sampleRate));let o=this.envelope;for(let r=0;r<s.length;r++){const c=Math.abs(s[r]),i=c>o?k:v;o=i*o+(1-i)*c,n[r]=o}return this.envelope=o,!0}}registerProcessor(\\\"env-follower\\\",V);})();\\n\";\n", "export default \"(()=>{var nt=Object.defineProperty;var at=(u,c,n)=>c in u?nt(u,c,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[c]=n;var a=(u,c,n)=>at(u,typeof c!=\\\"symbol\\\"?c+\\\"\\\":c,n);const ot=[29.7,37.1,41.1,43.7],rt=[5,1.7],it=[4.3,2.3],B=.5,ct=1e-20,lt=500;function pt(u,c){const n=1-u,m=2*Math.PI*c/sampleRate;return u/Math.sqrt(1-2*n*Math.cos(m)+n*n)}class ut extends AudioWorkletProcessor{constructor(n){super();a(this,\\\"combBuf\\\",[]);a(this,\\\"combLen\\\",[]);a(this,\\\"combIdx\\\",[0,0,0,0]);a(this,\\\"combDelaySec\\\",[]);a(this,\\\"lpState\\\",[0,0,0,0]);a(this,\\\"apBuf\\\",[]);a(this,\\\"apLen\\\",[]);a(this,\\\"apIdx\\\",[0,0]);a(this,\\\"sApBuf\\\",[]);a(this,\\\"sApLen\\\",[]);a(this,\\\"sApIdx\\\",[0,0]);a(this,\\\"ceiling\\\");a(this,\\\"g\\\",[0,0,0,0]);a(this,\\\"lpCoef\\\",0);const m=n?.processorOptions?.size??1;this.ceiling=n?.processorOptions?.feedbackCeiling??.995;for(let r=0;r<4;r++){const i=ot[r]/1e3*m,l=Math.max(2,Math.round(i*sampleRate));this.combDelaySec.push(l/sampleRate),this.combLen.push(l),this.combBuf.push(new Float32Array(l))}for(let r=0;r<2;r++){const i=Math.max(2,Math.round(rt[r]/1e3*sampleRate));this.apLen.push(i),this.apBuf.push(new Float32Array(i));const l=Math.max(2,Math.round(it[r]/1e3*sampleRate));this.sApLen.push(l),this.sApBuf.push(new Float32Array(l))}}static get parameterDescriptors(){return[{name:\\\"rt60\\\",defaultValue:2,minValue:.05,maxValue:30,automationRate:\\\"k-rate\\\"},{name:\\\"damping\\\",defaultValue:.55,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"}]}targetGains(n,m){return this.combDelaySec.map(r=>Math.min(Math.pow(10,-3*r/Math.max(n,.05))/m,this.ceiling))}process(n,m,r){const i=m[0];if(!i||!i[0])return!0;const l=i[0],z=l.length,p=n[0],G=r.rt60[0],j=r.damping[0],N=800*Math.pow(20,Math.max(0,Math.min(1,j))),L=1-Math.exp(-2*Math.PI*N/sampleRate),q=this.targetGains(G,pt(L,lt)),_=.15;for(let t=0;t<4;t++)this.g[t]+=(q[t]-this.g[t])*_;this.lpCoef+=(L-this.lpCoef)*_;const[P,C,O,w]=this.combBuf,[H,W,Z,J]=this.combLen,A=this.g,x=this.lpCoef,o=this.lpState,e=this.combIdx,D=i.length>1?i[1]:null,K=!!(p&&p.length>1);for(let t=0;t<z;t++){let f=0,b=0;if(p&&p.length){for(let s=0;s<p.length;s++)f+=p[s][t];p.length>1&&(f/=p.length),K&&(b=.5*(p[0][t]-p[1][t]))}const Q=P[e[0]],U=C[e[1]],X=O[e[2]],Y=w[e[3]];o[0]+=(Q-o[0])*x,o[1]+=(U-o[1])*x,o[2]+=(X-o[2])*x,o[3]+=(Y-o[3])*x;const E=o[0],T=o[1],V=o[2],k=o[3],v=E*A[0],y=T*A[1],I=V*A[2],R=k*A[3],$=.5*(v+y+I+R),tt=.5*(v-y+I-R),et=.5*(v+y-I-R),st=.5*(v-y-I+R);P[e[0]]=f+b+$,C[e[1]]=f-b+tt,O[e[2]]=f+b+et,w[e[3]]=f-b+st,e[0]=e[0]+1===H?0:e[0]+1,e[1]=e[1]+1===W?0:e[1]+1,e[2]=e[2]+1===Z?0:e[2]+1,e[3]=e[3]+1===J?0:e[3]+1;let S=.5*(E+V),F=.5*(T+k);for(let s=0;s<2;s++){const g=this.apBuf[s],h=this.apIdx[s],d=g[h],M=S+d*B;g[h]=M,S=d-M*B,this.apIdx[s]=h+1===this.apLen[s]?0:h+1}for(let s=0;s<2;s++){const g=this.sApBuf[s],h=this.sApIdx[s],d=g[h],M=F+d*B;g[h]=M,F=d-M*B,this.sApIdx[s]=h+1===this.sApLen[s]?0:h+1}D?(l[t]=S,D[t]=F):l[t]=.5*(S+F)}for(let t=0;t<4;t++)Math.abs(o[t])<ct&&(o[t]=0);for(let t=2;t<i.length;t++)i[t].set(i[t&1]);return!0}}registerProcessor(\\\"fdn-reverb\\\",ut);})();\\n\";\n", "export default \"(()=>{var D=Object.defineProperty;var P=(r,e,i)=>e in r?D(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i;var a=(r,e,i)=>P(r,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,i);const M=.009000000000000001,p=class p extends AudioWorkletProcessor{constructor(){super(...arguments);a(this,\\\"bufs\\\",[]);a(this,\\\"writeIdx\\\",0);a(this,\\\"phase\\\",0);a(this,\\\"dcX\\\",[]);a(this,\\\"dcY\\\",[]);a(this,\\\"dcR\\\",1-2*Math.PI*5/sampleRate)}static get parameterDescriptors(){return[{name:\\\"rate\\\",defaultValue:.5,minValue:.05,maxValue:10,automationRate:\\\"a-rate\\\"},{name:\\\"depth\\\",defaultValue:.7,minValue:0,maxValue:1,automationRate:\\\"a-rate\\\"},{name:\\\"feedback\\\",defaultValue:.7,minValue:0,maxValue:.95,automationRate:\\\"a-rate\\\"}]}process(i,E,f){const x=i[0]??[],c=E[0]??[];if(!c.length)return!0;const V=c[0].length,m=f.rate,S=f.depth,A=f.feedback,n=p.LEN,R=c.length;for(;this.bufs.length<R;)this.bufs.push(new Float32Array(n)),this.dcX.push(0),this.dcY.push(0);for(let s=0;s<V;s++){const _=m.length>1?m[s]:m[0],w=S.length>1?S[s]:S[0],Y=A.length>1?A[s]:A[0];let h=(.005+w*.004*Math.sin(2*Math.PI*this.phase))*sampleRate;h<1?h=1:h>n-2&&(h=n-2);let l=this.writeIdx-h;l<0&&(l+=n);const o=l|0,v=l-o,L=o+1===n?0:o+1;for(let t=0;t<R;t++){const d=this.bufs[t],g=x[t]??x[0],b=d[o]+v*(d[L]-d[o]),y=b-this.dcX[t]+this.dcR*this.dcY[t];this.dcX[t]=b,this.dcY[t]=y;let u=(g?g[s]:0)+Y*y;u>-1e-20&&u<1e-20&&(u=0),d[this.writeIdx]=u,c[t][s]=b}this.writeIdx=this.writeIdx+1===n?0:this.writeIdx+1,this.phase+=_/sampleRate,this.phase>=1&&(this.phase-=1)}return!0}};a(p,\\\"LEN\\\",Math.ceil(M*sampleRate)+8);let I=p;registerProcessor(\\\"flanger\\\",I);})();\\n\";\n", "export default \"(()=>{const i=[[800,1200,2500,3300,3750],[400,2e3,2800,3500,4500],[300,2300,3e3,3500,4500],[500,900,2500,3300,3750],[350,700,2500,3300,3750]];class A extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:\\\"baseMorph\\\",defaultValue:0,automationRate:\\\"k-rate\\\"}]}process(m,h,b){const c=m[0],r=h[0],u=c.length>0?c[0]:null,O=b.baseMorph[0],s=r[0],d=r[1],g=r[2],l=r[3],f=r[4];if(!s)return!0;for(let o=0;o<s.length;o++){const F=u?u[o]:0,a=((O+F)%5+5)%5,p=Math.floor(a)%5,M=(p+1)%5,e=a-Math.floor(a),t=i[p],n=i[M];s[o]=t[0]+(n[0]-t[0])*e,d[o]=t[1]+(n[1]-t[1])*e,g[o]=t[2]+(n[2]-t[2])*e,l&&(l[o]=t[3]+(n[3]-t[3])*e),f&&(f[o]=t[4]+(n[4]-t[4])*e)}return!0}}registerProcessor(\\\"formant-table\\\",A);})();\\n\";\n", "export default \"(()=>{var F=Object.defineProperty;var b=(a,e,i)=>e in a?F(a,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[e]=i;var t=(a,e,i)=>b(a,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,i);class w extends AudioWorkletProcessor{constructor(){super(...arguments);t(this,\\\"prevSample\\\",0);t(this,\\\"div1State\\\",!1);t(this,\\\"div2Count\\\",0);t(this,\\\"div2State\\\",!1);t(this,\\\"envelope\\\",0);t(this,\\\"smoothGate\\\",0);t(this,\\\"samplesSinceCross\\\",0);t(this,\\\"freqEstimate\\\",0)}static get parameterDescriptors(){return[{name:\\\"oct1Level\\\",defaultValue:.5,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"},{name:\\\"oct2Level\\\",defaultValue:.3,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"}]}process(i,o,h){const r=i[0]?.[0],v=o[0]?.[0],p=o[1],m=o[2]?.[0];if(!r)return!0;const g=h.oct1Level[0],q=h.oct2Level[0],G=.01,V=.01,R=5e-4,A=.02,E=.002,f=p?.[0],u=p?.[1];for(let s=0;s<r.length;s++){const n=r[s],l=Math.abs(n);if(l>this.envelope?this.envelope+=V*(l-this.envelope):this.envelope+=R*(l-this.envelope),this.samplesSinceCross++,this.prevSample<=0&&n>0){if(this.div1State=!this.div1State,this.div2Count++,this.div2Count>=2&&(this.div2State=!this.div2State,this.div2Count=0),this.samplesSinceCross>4&&this.samplesSinceCross<sampleRate){const k=sampleRate/this.samplesSinceCross;this.freqEstimate+=.05*(k-this.freqEstimate)}this.samplesSinceCross=0}this.prevSample=n;const d=this.envelope>G?1:0,L=d>this.smoothGate?A:E;this.smoothGate+=L*(d-this.smoothGate);const S=this.div1State?1:-1,C=this.div2State?1:-1,c=this.smoothGate*this.envelope;v&&(v[s]=(S*g+C*q)*c),f&&(f[s]=S*c),u&&(u[s]=C*c),m&&(m[s]=this.freqEstimate*this.smoothGate)}return!0}}registerProcessor(\\\"freq-divider\\\",w);})();\\n\";\n", "export default \"(()=>{var q=Object.defineProperty;var B=(r,t,s)=>t in r?q(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s;var e=(r,t,s)=>B(r,typeof t!=\\\"symbol\\\"?t+\\\"\\\":t,s);const C=[.6923877778065,.9360654322959,.988229522686,.9987488452737],S=[.4021921162426,.856171088242,.9722909545651,.9952884791278];class m{constructor(t){e(this,\\\"a2\\\");e(this,\\\"x1\\\",0);e(this,\\\"x2\\\",0);e(this,\\\"y1\\\",0);e(this,\\\"y2\\\",0);this.a2=t}process(t){const s=this.a2*(t+this.y2)-this.x2;return this.x2=this.x1,this.x1=t,this.y2=this.y1,this.y1=s,s}}class w extends AudioWorkletProcessor{constructor(){super(...arguments);e(this,\\\"branchA\\\",C.map(s=>new m(s)));e(this,\\\"branchB\\\",S.map(s=>new m(s)));e(this,\\\"delayA\\\",0);e(this,\\\"phase\\\",0)}static get parameterDescriptors(){return[{name:\\\"shift\\\",defaultValue:0,minValue:-8e3,maxValue:8e3,automationRate:\\\"a-rate\\\"}]}process(s,y,A){const u=s[0]?.[0],n=y[0]?.[0];if(!n)return!0;if(!u)return n.fill(0),!0;const o=A.shift,c=2*Math.PI,b=c/sampleRate;for(let i=0;i<n.length;i++){const h=o.length>1?o[i]:o[0],v=h<0?-1:1,g=h<0?-h:h,f=u[i];let p=f;for(let a=0;a<this.branchA.length;a++)p=this.branchA[a].process(p);let l=f;for(let a=0;a<this.branchB.length;a++)l=this.branchB[a].process(l);const x=this.delayA,F=l;this.delayA=p,this.phase+=b*g,this.phase>=c&&(this.phase-=c);const d=Math.cos(this.phase),P=Math.sin(this.phase);n[i]=x*d+v*F*P}return!0}}registerProcessor(\\\"freq-shifter\\\",w);})();\\n\";\n", "export default \"(()=>{var m=Object.defineProperty;var v=(r,t,e)=>t in r?m(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>v(r,typeof t!=\\\"symbol\\\"?t+\\\"\\\":t,e);class f extends AudioWorkletProcessor{constructor(){super(...arguments);s(this,\\\"y\\\",0);s(this,\\\"initialized\\\",!1);s(this,\\\"prevGate\\\",-1)}static get parameterDescriptors(){return[{name:\\\"time\\\",defaultValue:.1}]}process(e,p,u){const n=e[0]?.[0],l=e[1]?.[0],a=p[0]?.[0];if(!n||!a)return!0;const o=u.time;for(let i=0;i<a.length;i++){const c=n[i],d=o.length>1?o[i]:o[0],h=l?l[i]:-1,g=1-Math.exp(-3/(sampleRate*Math.max(d,1e-4))),y=h>0&&this.prevGate<=0;!this.initialized||y?(this.y=c,this.initialized=!0):this.y+=g*(c-this.y),this.prevGate=h,a[i]=this.y}return!0}}registerProcessor(\\\"glide\\\",f);})();\\n\";\n", "export default \"(()=>{var k=Object.defineProperty;var C=(a,e,n)=>e in a?k(a,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[e]=n;var y=(a,e,n)=>C(a,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,n);const V=Math.PI*2,W=()=>({y1:0,y2:0,y3:0,y4:0,dcIn:0,dcOut:0});class w extends AudioWorkletProcessor{constructor(){super(...arguments);y(this,\\\"states\\\",[]);y(this,\\\"noisePhase\\\",1)}static get parameterDescriptors(){return[{name:\\\"cutoff\\\",defaultValue:0,minValue:0,maxValue:24e3,automationRate:\\\"a-rate\\\"},{name:\\\"resonance\\\",defaultValue:.6,minValue:-2,maxValue:2,automationRate:\\\"a-rate\\\"},{name:\\\"drive\\\",defaultValue:.3,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"}]}process(n,M,f){const d=n[0]??[],c=M[0];if(!c||c.length===0)return!0;const i=f.cutoff,l=f.resonance,b=1+f.drive[0]*3,I=sampleRate*2,v=1-V*5/sampleRate,m=sampleRate*.45;for(let s=0;s<c.length;s++){const p=c[s],g=d[s]??d[0],t=this.states[s]??(this.states[s]=W());for(let o=0;o<p.length;o++){const O=g?g[o]:0,h=i.length>1?i[o]:i[0],A=h<8?8:h>m?m:h;let r=l.length>1?l[o]:l[0];r<0?r=0:r>1.15&&(r=1.15);const F=r*4,u=1-Math.exp(-V*A/I);this.noisePhase=this.noisePhase*1103515245+12345&2147483647;const L=(this.noisePhase/2147483647-.5)*2e-7;for(let R=0;R<2;R++){const S=Math.tanh(b*O-F*t.y4+L);t.y1+=u*(S-t.y1),t.y2+=u*(Math.tanh(t.y1)-t.y2),t.y3+=u*(Math.tanh(t.y2)-t.y3),t.y4+=u*(Math.tanh(t.y3)-t.y4)}const x=t.y4*(1+r),P=x-t.dcIn+v*t.dcOut;t.dcIn=x,t.dcOut=P,p[o]=P}Math.abs(t.y4)<1e-20&&(t.y1=t.y2=t.y3=t.y4=0)}return!0}}registerProcessor(\\\"ladder-filter\\\",w);})();\\n\";\n", "export default \"(()=>{class x extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:\\\"base\\\",defaultValue:1,minValue:.001,maxValue:1e3},{name:\\\"cvScale\\\",defaultValue:19.9,minValue:0,maxValue:1e3},{name:\\\"qMin\\\",defaultValue:.1,minValue:.001,maxValue:1e3},{name:\\\"qMax\\\",defaultValue:20,minValue:.001,maxValue:1e3},{name:\\\"dbOut\\\",defaultValue:1,minValue:0,maxValue:1}]}process(r,i,t){const s=r[0]?.[0],l=i[0]?.[0];if(!l)return!0;const n=t.base,u=t.cvScale,o=t.qMin[0],c=t.qMax[0],V=t.dbOut[0]>=.5;for(let e=0;e<l.length;e++){const m=n.length>1?n[e]:n[0],d=u.length>1?u[e]:u[0],f=s?s[e]:0;let a=m+f*d;a<o?a=o:a>c&&(a=c),l[e]=V?20*Math.log10(a):a}return!0}}registerProcessor(\\\"map-res\\\",x);})();\\n\";\n", "export default \"(()=>{class u extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:\\\"transpose\\\",defaultValue:0}]}process(s,a,n){const o=s[0]?.[0],r=a[0]?.[0];if(!r)return!0;const e=n.transpose;for(let t=0;t<r.length;t++){const c=e.length>1?e[t]:e[0],p=(o?o[t]:0)+c;r[t]=440*Math.pow(2,(p-69)/12)}return!0}}registerProcessor(\\\"map-voct-to-freq\\\",u);})();\\n\";\n", "export default \"(()=>{class i extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:\\\"transpose\\\",defaultValue:0}]}process(s,a,n){const e=s[0]?.[0],r=a[0]?.[0];if(!r)return!0;const o=n.transpose;for(let t=0;t<r.length;t++){const c=o.length>1?o[t]:o[0],p=(e?e[t]:0)+c,u=440*Math.pow(2,(p-69)/12);r[t]=1/u}return!0}}registerProcessor(\\\"map-voct-to-period\\\",i);})();\\n\";\n", "export default \"(()=>{var I=Object.defineProperty;var k=(s,e,n)=>e in s?I(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n;var r=(s,e,n)=>k(s,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,n);class x extends AudioWorkletProcessor{constructor(){super(...arguments);r(this,\\\"bufL\\\",new Float32Array(Math.ceil(2*sampleRate)+4));r(this,\\\"bufR\\\",new Float32Array(Math.ceil(2*2*sampleRate)+4));r(this,\\\"wL\\\",0);r(this,\\\"wR\\\",0);r(this,\\\"dcX\\\",0);r(this,\\\"dcY\\\",0);r(this,\\\"dcR\\\",1-2*Math.PI*5/sampleRate)}static get parameterDescriptors(){return[{name:\\\"time\\\",defaultValue:.3,minValue:.01,maxValue:2,automationRate:\\\"k-rate\\\"},{name:\\\"feedback\\\",defaultValue:.4,minValue:0,maxValue:.95,automationRate:\\\"a-rate\\\"}]}process(n,L,P){const X=n[0]?.[0],b=L[0]?.[0],_=L[1]?.[0];if(!b||!_)return!0;const v=P.time,M=P.feedback,g=this.bufL,A=this.bufR,f=g.length,R=A.length,F=this.dcR;let l=v[0]*sampleRate;l<1?l=1:l>f-3&&(l=f-3);let u=2*v[0]*sampleRate;u<1?u=1:u>R-3&&(u=R-3);let i=this.wL,o=this.wR,w=this.dcX,c=this.dcY;const y=(t,m,h,p)=>{let a=h-p;a<0&&(a+=m);const d=a|0,T=a-d,V=d+1===m?0:d+1;return t[d]+(t[V]-t[d])*T};for(let t=0;t<b.length;t++){const m=X?X[t]:0,h=M.length>1?M[t]:M[0],p=y(g,f,i,l),a=y(A,R,o,u);c=a-w+F*c,w=a,g[i]=m+h*c,A[o]=h*p,b[t]=p,_[t]=a,i++,i===f&&(i=0),o++,o===R&&(o=0)}return Math.abs(c)<1e-20&&(c=0),this.wL=i,this.wR=o,this.dcX=w,this.dcY=c,!0}}registerProcessor(\\\"ping-pong\\\",x);})();\\n\";\n", "export default \"(()=>{var R=Object.defineProperty;var y=(i,e,t)=>e in i?R(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var r=(i,e,t)=>y(i,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,t);class E extends AudioWorkletProcessor{constructor(t){super();r(this,\\\"ring\\\");r(this,\\\"ringLen\\\");r(this,\\\"writePos\\\",0);r(this,\\\"readPos\\\");r(this,\\\"grainPhase\\\");r(this,\\\"grainLen\\\");r(this,\\\"jitterLen\\\");r(this,\\\"rng\\\");this.rng=(t?.processorOptions?.seed??2654435769)>>>0||1,this.jitterLen=Math.round(sampleRate*.01),this.ringLen=Math.ceil(sampleRate*1),this.ring=new Float32Array(this.ringLen),this.grainLen=Math.floor(sampleRate*.08),this.readPos=new Float64Array([0,0]),this.grainPhase=new Float64Array([0,.5]),this.readPos[0]=this.readPos[1]=this.ringLen-this.grainLen}static get parameterDescriptors(){return[{name:\\\"semitones\\\",defaultValue:12,minValue:-24,maxValue:24,automationRate:\\\"k-rate\\\"}]}rand(){let t=this.rng;return t^=t<<13,t^=t>>>17,t^=t<<5,this.rng=t>>>0,this.rng/4294967296}process(t,P,p){const h=t[0]?.[0],o=P[0]?.[0];if(!o)return!0;const d=p.semitones[0],c=Math.pow(2,d/12),u=1/this.grainLen,L=2*Math.PI;for(let n=0;n<o.length;n++){const m=h?h[n]:0;this.ring[this.writePos]=m;let g=0;for(let s=0;s<2;s++){if(this.grainPhase[s]+=u,this.grainPhase[s]>=1){this.grainPhase[s]-=1;const f=Math.max(0,c-1)*this.grainLen+2+this.rand()*this.jitterLen;this.readPos[s]=(this.writePos-f+this.ringLen)%this.ringLen}else this.readPos[s]+=c,this.readPos[s]>=this.ringLen?this.readPos[s]-=this.ringLen:this.readPos[s]<0&&(this.readPos[s]+=this.ringLen);const l=this.readPos[s],a=l|0,A=l-a,S=(a+1)%this.ringLen,w=this.ring[a]+A*(this.ring[S]-this.ring[a]),N=.5-.5*Math.cos(L*this.grainPhase[s]);g+=w*N}o[n]=g,this.writePos=this.writePos+1===this.ringLen?0:this.writePos+1}return!0}}registerProcessor(\\\"pitch-shifter\\\",E);})();\\n\";\n", "export default \"(()=>{var $=Object.defineProperty;var tt=(n,o,e)=>o in n?$(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e;var s=(n,o,e)=>tt(n,typeof o!=\\\"symbol\\\"?o+\\\"\\\":o,e);const c=[{stages:76,delayMs:37.9,chan:0},{stages:90,delayMs:41.7,chan:1},{stages:82,delayMs:51.3,chan:0},{stages:96,delayMs:47.9,chan:1}],b=c.length,st=.7,N=.95,et=2.4,at=4,nt=150,ot=15,it=.98,rt=1e-20,ct=500;function ht(n){if(n>3)return 1;if(n<-3)return-1;const o=n*n;return n*(27+o)/(27+9*o)}class pt extends AudioWorkletProcessor{constructor(){super();s(this,\\\"apX\\\",[]);s(this,\\\"apY\\\",[]);s(this,\\\"dBuf\\\",[]);s(this,\\\"dLen\\\",[]);s(this,\\\"dIdx\\\",[]);s(this,\\\"fb\\\",[]);s(this,\\\"lp\\\",[]);s(this,\\\"dc\\\",[]);s(this,\\\"g\\\",[]);s(this,\\\"inHpState\\\",0);s(this,\\\"inHpCoef\\\");s(this,\\\"dcCoef\\\");s(this,\\\"a\\\",.56);s(this,\\\"lpCoef\\\",.4);s(this,\\\"knockPos\\\",-1);s(this,\\\"knockLen\\\");s(this,\\\"prevTrig\\\",0);for(let e=0;e<b;e++){this.apX.push(new Float32Array(c[e].stages)),this.apY.push(new Float32Array(c[e].stages));const p=Math.max(2,Math.round(c[e].delayMs/1e3*sampleRate));this.dLen.push(p),this.dBuf.push(new Float32Array(p)),this.dIdx.push(0),this.fb.push(0),this.lp.push(0),this.dc.push(0),this.g.push(0)}this.inHpCoef=1-Math.exp(-2*Math.PI*nt/sampleRate),this.dcCoef=1-Math.exp(-2*Math.PI*ot/sampleRate),this.knockLen=Math.max(8,Math.round(at/1e3*sampleRate))}static get parameterDescriptors(){return[{name:\\\"decay\\\",defaultValue:1.5,minValue:.3,maxValue:4,automationRate:\\\"k-rate\\\"},{name:\\\"tone\\\",defaultValue:.6,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"},{name:\\\"drip\\\",defaultValue:.5,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"}]}process(e,p,m){const h=p[0];if(!h||!h[0])return!0;const x=h[0],w=h[1]??h[0],O=x.length,M=e[0]?.[0],E=e[0]?.[1]??M,I=e[1]?.[0],B=m.decay[0],D=Math.max(0,Math.min(1,m.tone[0])),K=.35+.42*Math.max(0,Math.min(1,m.drip[0]));this.a+=(K-this.a)*.1;const i=this.a,X=1100*Math.pow(6500/1100,D),g=1-Math.exp(-2*Math.PI*X/sampleRate);this.lpCoef+=(g-this.lpCoef)*.15;const Y=this.lpCoef,L=2*Math.PI*ct/sampleRate,k=Math.cos(L),Z=(1-i*i)/(1-2*i*k+i*i),v=1-g,G=g/Math.sqrt(1-2*v*k+v*v),A=1-this.dcCoef,y=1-A*k,C=A*Math.sin(L),H=y*y+C*C,q=1-this.dcCoef*y/H,z=this.dcCoef*C/H,J=G*Math.hypot(q,z);for(let a=0;a<b;a++){const l=(this.dLen[a]+c[a].stages*Z)/sampleRate,u=Math.min(Math.pow(10,-3*l/Math.max(B,.05))/J,it);this.g[a]+=(u-this.g[a])*.15}const U=this.inHpCoef,W=this.dcCoef;for(let a=0;a<O;a++){if(I){const t=I[a];t>.5&&this.prevTrig<=.5&&(this.knockPos=0),this.prevTrig=t}const l=M?(M[a]+E[a])*.5:0;this.inHpState+=U*(l-this.inHpState);let u=(l-this.inHpState)*st;this.knockPos>=0&&(u+=Math.sin(Math.PI*this.knockPos/this.knockLen)*et,++this.knockPos>=this.knockLen&&(this.knockPos=-1));let F=0,S=0;for(let t=0;t<b;t++){let d=u+this.fb[t]+rt;const R=this.apX[t],T=this.apY[t],j=R.length;for(let r=0;r<j;r++){const V=-i*d+R[r]+i*T[r];R[r]=d,T[r]=V,d=V}const _=this.dBuf[t],f=this.dIdx[t],Q=_[f];_[f]=d,this.dIdx[t]=f+1>=this.dLen[t]?0:f+1,this.lp[t]+=Y*(Q-this.lp[t]),this.dc[t]+=W*(this.lp[t]-this.dc[t]);const P=ht(this.lp[t]-this.dc[t]);this.fb[t]=P*this.g[t],c[t].chan===0?F+=P:S+=P}x[a]=F*N,w[a]=S*N}return!0}}registerProcessor(\\\"spring-reverb\\\",pt);})();\\n\";\n", "export default \"(()=>{var L=Object.defineProperty;var Z=(s,e,t)=>e in s?L(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var a=(s,e,t)=>Z(s,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,t);function E(s){let e=s>>>0;return()=>{e=e+1831565813>>>0;let t=e;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}class O extends AudioWorkletProcessor{constructor(){super(...arguments);a(this,\\\"buf\\\",new Float32Array(Math.ceil(1.5*1.03*sampleRate)+4));a(this,\\\"writeIdx\\\",0);a(this,\\\"tSlew\\\",-1);a(this,\\\"slewA\\\",1-Math.exp(-1/(.08*sampleRate)));a(this,\\\"phaseWow\\\",0);a(this,\\\"phaseFlut\\\",0);a(this,\\\"wowInc\\\",2*Math.PI*.85/sampleRate);a(this,\\\"rand\\\",E(2057179700));a(this,\\\"wander\\\",0);a(this,\\\"wanderTarget\\\",0);a(this,\\\"wanderCountdown\\\",0);a(this,\\\"damp\\\",0);a(this,\\\"dampD\\\",Math.exp(-2*Math.PI*6e3/sampleRate));a(this,\\\"dcX\\\",0);a(this,\\\"dcY\\\",0);a(this,\\\"dcR\\\",1-2*Math.PI*5/sampleRate)}static get parameterDescriptors(){return[{name:\\\"time\\\",defaultValue:.375,minValue:.05,maxValue:1.5,automationRate:\\\"k-rate\\\"},{name:\\\"feedback\\\",defaultValue:.5,minValue:0,maxValue:.95,automationRate:\\\"a-rate\\\"},{name:\\\"saturation\\\",defaultValue:.4,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"},{name:\\\"flutter\\\",defaultValue:.3,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"}]}process(t,S,u){const R=t[0]?.[0],p=S[0]?.[0];if(!p)return!0;const b=u.time,f=u.feedback,A=u.saturation,F=u.flutter,o=this.buf,l=o.length,V=this.dampD,g=this.dcR,T=b[0];this.tSlew<0&&(this.tSlew=T);const W=1+A[0]*4,x=F[0];this.wanderCountdown<=0&&(this.wanderTarget=this.rand()*2-1,this.wanderCountdown=Math.round(.5*sampleRate)),this.wanderCountdown-=p.length,this.wander+=.02*(this.wanderTarget-this.wander);const y=2*Math.PI*6.3*(1+.12*this.wander)/sampleRate;let m=this.tSlew,M=this.phaseWow,_=this.phaseFlut,n=this.damp,P=this.dcX,i=this.dcY,r=this.writeIdx;for(let h=0;h<p.length;h++){const C=R?R[h]:0,k=f.length>1?f[h]:f[0];m+=this.slewA*(T-m);let I=0;x>0&&(M+=this.wowInc,_+=y,I=x*(.008*Math.sin(M)+.0015*Math.sin(_)));let c=m*(1+I)*sampleRate;c<1?c=1:c>l-3&&(c=l-3);let w=r-c;w<0&&(w+=l);const d=w|0,D=w-d,X=d+1===l?0:d+1,H=o[d]+(o[X]-o[d])*D;n+=(1-V)*(H-n);const v=(Math.tanh(W*n)+Math.tanh(W*n*.3)*.1)/1.1;i=v-P+g*i,P=v,o[r]=C+k*i,p[h]=v,r++,r===l&&(r=0)}return Math.abs(n)<1e-20&&(n=0),Math.abs(i)<1e-20&&(i=0),this.tSlew=m,this.phaseWow=M,this.phaseFlut=_,this.damp=n,this.dcX=P,this.dcY=i,this.writeIdx=r,!0}}registerProcessor(\\\"tape-delay\\\",O);})();\\n\";\n", "export default \"(()=>{var O=Object.defineProperty;var w=(r,a,e)=>a in r?O(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var t=(r,a,e)=>w(r,typeof a!=\\\"symbol\\\"?a+\\\"\\\":a,e);class S extends AudioWorkletProcessor{constructor(){super();t(this,\\\"bufL\\\");t(this,\\\"bufR\\\");t(this,\\\"bufLen\\\");t(this,\\\"writePos\\\",0);t(this,\\\"readPos\\\",0);t(this,\\\"speed\\\",1);t(this,\\\"decayFactor\\\",1);t(this,\\\"ramping\\\",!1);t(this,\\\"prevTrig\\\",0);t(this,\\\"stopped\\\",!1);this.bufLen=Math.ceil(sampleRate*4),this.bufL=new Float32Array(this.bufLen),this.bufR=new Float32Array(this.bufLen)}static get parameterDescriptors(){return[{name:\\\"time\\\",defaultValue:.5,minValue:.005,maxValue:4},{name:\\\"mix\\\",defaultValue:1,minValue:0,maxValue:1}]}toggle(e){this.stopped=!this.stopped;const o=Math.max(1,Math.round(e*sampleRate));this.stopped?this.decayFactor=Math.pow(.001/Math.max(this.speed,.001),1/o):this.decayFactor=Math.pow(.001,1/o),this.ramping=!0,this.port.postMessage({type:\\\"state\\\",phase:\\\"ramping\\\"})}process(e,o,g){const L=e[0]?.[0],P=e[0]?.[1],F=e[1]?.[0],c=o[0]?.[0],b=o[0]?.[1];if(!c)return!0;const R=!!b,f=g.time,l=g.mix,E=c.length;for(let i=0;i<E;i++){const v=f.length>1?f[i]:f[0],h=l.length>1?l[i]:l[0];if(F){const s=F[i];s>.5&&this.prevTrig<=.5&&this.toggle(v),this.prevTrig=s}const n=L?L[i]:0,d=P?P[i]:R?n:0;if(this.bufL[this.writePos]=n,this.bufR[this.writePos]=d,this.ramping)if(this.stopped)this.speed*=this.decayFactor,this.speed<=.001&&(this.speed=0,this.ramping=!1,this.port.postMessage({type:\\\"state\\\",phase:\\\"stopped\\\"}));else{const p=(1-this.speed)*this.decayFactor;this.speed=1-p,p<=.001&&(this.speed=1,this.ramping=!1,this.port.postMessage({type:\\\"state\\\",phase:\\\"playing\\\"}))}let u=0,m=0;if(this.speed>=1&&!this.ramping)u=n,m=d,this.readPos=this.writePos;else if(this.speed>0){this.readPos=(this.readPos+this.speed)%this.bufLen;const s=Math.floor(this.readPos),p=this.readPos-s,y=(s+1)%this.bufLen;u=this.bufL[s]+p*(this.bufL[y]-this.bufL[s]),m=this.bufR[s]+p*(this.bufR[y]-this.bufR[s])}this.writePos=(this.writePos+1)%this.bufLen,c[i]=n*(1-h)+u*h,R&&(b[i]=d*(1-h)+m*h)}return!0}}registerProcessor(\\\"tape-stop\\\",S);})();\\n\";\n", "export default \"(()=>{class v extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:\\\"gain\\\",defaultValue:.5,minValue:0,maxValue:2,automationRate:\\\"a-rate\\\"},{name:\\\"cvAmount\\\",defaultValue:1,minValue:-1,maxValue:1,automationRate:\\\"a-rate\\\"},{name:\\\"cv\\\",defaultValue:0,minValue:-1e3,maxValue:1e3,automationRate:\\\"a-rate\\\"}]}process(i,m,o){const l=i[0],e=m[0];if(!e)return!0;const s=o.gain,c=o.cvAmount,r=o.cv,f=e.length,g=e[0]?.length??0;for(let t=0;t<g;t++){const V=s.length>1?s[t]:s[0],h=c.length>1?c[t]:c[0],d=r.length>1?r[t]:r[0];let a=V+h*d;a<0?a=0:a>2&&(a=2);for(let n=0;n<f;n++){const u=l?.[n]??l?.[0];e[n][t]=(u?u[t]:0)*a}}return!0}}registerProcessor(\\\"vca\\\",v);})();\\n\";\n", "export default \"(()=>{var J=Object.defineProperty;var X=(g,w,t)=>w in g?J(g,w,{enumerable:!0,configurable:!0,writable:!0,value:t}):g[w]=t;var r=(g,w,t)=>X(g,typeof w!=\\\"symbol\\\"?w+\\\"\\\":w,t);const F=new Float32Array([.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.109,.263,.453,.612,.701,.744,.773,.142,.333,.556,.731,.827,.873,.903,.188,.387,.59,.74,.821,.857,.882,.207,.422,.622,.756,.824,.855,.872,.217,.442,.642,.767,.827,.851,.868,.222,.452,.653,.774,.828,.852,.865,.224,.455,.657,.776,.829,.85,.862,.222,.452,.653,.774,.828,.852,.865,.217,.442,.642,.767,.827,.851,.868,.207,.422,.622,.756,.824,.855,.872,.187,.387,.59,.74,.821,.857,.882,.142,.333,.556,.731,.827,.873,.903,.152,.36,.61,.816,.935,.994,1.034,.27,.488,.689,.838,.924,.965,.994,.352,.592,.765,.874,.931,.958,.975,.401,.661,.819,.901,.939,.954,.966,.428,.7,.85,.917,.943,.954,.96,.437,.712,.861,.922,.945,.953,.957,.428,.7,.85,.917,.943,.954,.96,.401,.661,.819,.901,.939,.954,.966,.352,.592,.765,.874,.931,.958,.975,.27,.488,.689,.838,.924,.964,.995,.152,.36,.61,.816,.935,.994,1.034,.154,.369,.638,.876,1.028,1.108,1.165,.333,.551,.752,.912,1.012,1.063,1.103,.502,.721,.867,.967,1.025,1.053,1.074,.636,.849,.953,1.008,1.037,1.05,1.06,.724,.929,1.004,1.033,1.045,1.05,1.053,.754,.956,1.021,1.042,1.048,1.05,1.049,.724,.929,1.004,1.033,1.045,1.05,1.053,.636,.849,.953,1.008,1.037,1.05,1.06,.502,.721,.867,.967,1.025,1.053,1.073,.333,.551,.752,.912,1.012,1.063,1.103,.154,.369,.638,.876,1.028,1.108,1.165,.154,.372,.655,.923,1.11,1.216,1.296,.367,.586,.793,.969,1.09,1.154,1.208,.582,.79,.933,1.039,1.108,1.142,1.169,.77,.947,1.037,1.092,1.125,1.14,1.151,.901,1.047,1.1,1.124,1.135,1.14,1.144,.948,1.082,1.122,1.135,1.139,1.14,1.138,.901,1.047,1.1,1.124,1.135,1.14,1.144,.77,.947,1.037,1.092,1.125,1.14,1.151,.582,.79,.933,1.039,1.108,1.142,1.169,.367,.586,.793,.969,1.09,1.154,1.208,.154,.372,.655,.923,1.11,1.216,1.296,.154,.374,.668,.962,1.185,1.32,1.427,.377,.604,.821,1.016,1.159,1.24,1.31,.585,.811,.973,1.097,1.183,1.226,1.261,.753,.965,1.083,1.157,1.203,1.224,1.24,.862,1.061,1.15,1.194,1.216,1.225,1.232,.899,1.094,1.172,1.207,1.22,1.225,1.224,.862,1.061,1.15,1.194,1.216,1.225,1.232,.753,.965,1.083,1.157,1.203,1.224,1.24,.585,.811,.973,1.097,1.183,1.226,1.261,.377,.604,.821,1.016,1.159,1.24,1.31,.154,.374,.668,.962,1.185,1.32,1.427,.154,.372,.657,.934,1.137,1.257,1.35,.373,.594,.802,.985,1.116,1.188,1.249,.592,.801,.948,1.06,1.137,1.175,1.206,.781,.96,1.056,1.117,1.155,1.173,1.186,.911,1.06,1.121,1.152,1.167,1.173,1.178,.957,1.095,1.143,1.163,1.171,1.173,1.172,.911,1.06,1.121,1.152,1.167,1.173,1.178,.781,.96,1.056,1.117,1.155,1.173,1.186,.592,.801,.948,1.06,1.137,1.175,1.206,.373,.594,.802,.985,1.116,1.188,1.249,.154,.372,.657,.934,1.137,1.257,1.35,.154,.37,.647,.907,1.093,1.199,1.28,.367,.582,.784,.955,1.074,1.14,1.194,.592,.786,.922,1.025,1.093,1.128,1.155,.798,.946,1.026,1.077,1.11,1.125,1.137,.947,1.049,1.089,1.11,1.121,1.125,1.129,1.003,1.085,1.11,1.121,1.124,1.125,1.124,.947,1.049,1.089,1.11,1.121,1.125,1.129,.798,.946,1.026,1.077,1.11,1.125,1.137,.592,.786,.922,1.025,1.093,1.128,1.155,.367,.582,.784,.955,1.074,1.14,1.194,.154,.37,.647,.907,1.093,1.199,1.28,.153,.367,.636,.882,1.051,1.146,1.217,.358,.569,.764,.926,1.035,1.094,1.142,.583,.767,.896,.99,1.052,1.083,1.107,.799,.925,.994,1.039,1.067,1.081,1.091,.964,1.028,1.055,1.069,1.077,1.081,1.083,1.028,1.064,1.075,1.079,1.08,1.081,1.08,.964,1.028,1.055,1.069,1.077,1.081,1.084,.799,.925,.994,1.039,1.067,1.081,1.091,.583,.767,.896,.99,1.052,1.083,1.107,.358,.569,.764,.926,1.035,1.095,1.142,.153,.367,.636,.882,1.051,1.146,1.217,.153,.365,.625,.857,1.011,1.096,1.16,.348,.556,.745,.898,.999,1.052,1.095,.567,.746,.868,.957,1.014,1.042,1.064,.785,.899,.961,1.002,1.027,1.039,1.048,.958,1,1.018,1.029,1.036,1.039,1.041,1.027,1.035,1.038,1.039,1.039,1.039,1.038,.958,1,1.018,1.029,1.036,1.039,1.041,.785,.899,.961,1.002,1.027,1.039,1.048,.567,.746,.868,.957,1.014,1.042,1.064,.348,.556,.745,.898,.999,1.052,1.095,.153,.365,.625,.857,1.011,1.096,1.16,.153,.362,.615,.833,.975,1.051,1.107,.336,.541,.726,.871,.964,1.013,1.051,.546,.722,.841,.925,.977,1.003,1.023,.758,.869,.928,.966,.989,1.001,1.009,.931,.966,.982,.991,.997,1,1.002,1,1,1,1,1,1,1,.931,.966,.982,.991,.997,1,1.002,.758,.869,.928,.966,.989,1.001,1.009,.546,.722,.841,.925,.977,1.003,1.023,.336,.541,.726,.871,.964,1.013,1.051,.153,.362,.615,.833,.975,1.051,1.107]),K=11,D=11,T=7;const N=[5.7814,6.7814,7.7814,8.7814,9.7814,10.7814,11.7814],e=class e extends AudioWorkletProcessor{constructor(){super(...arguments);r(this,\\\"phase\\\",0);r(this,\\\"normGain\\\",1);r(this,\\\"normTarget\\\",1);r(this,\\\"osW1\\\",0);r(this,\\\"osW2\\\",0);r(this,\\\"stepPos\\\",new Float64Array(3));r(this,\\\"stepAmp\\\",new Float64Array(3));r(this,\\\"nSteps\\\",0)}static get parameterDescriptors(){return[{name:\\\"skew\\\",defaultValue:0,minValue:-34e37,maxValue:34e37,automationRate:\\\"a-rate\\\"},{name:\\\"shape\\\",defaultValue:0,minValue:-34e37,maxValue:34e37,automationRate:\\\"a-rate\\\"},{name:\\\"normalize\\\",defaultValue:0,minValue:0,maxValue:1,automationRate:\\\"k-rate\\\"}]}static awBilinear(t,o,n,a,i,s){const h=(y,c)=>(y*D+c)*T+i,u=h(t,n),A=h(t+1,n),S=h(t,n+1),E=h(t+1,n+1),f=F[u]*(1-s)+F[u+1]*s,b=F[A]*(1-s)+F[A+1]*s,m=F[S]*(1-s)+F[S+1]*s,d=F[E]*(1-s)+F[E+1]*s,l=f*(1-a)+m*a,p=b*(1-a)+d*a;return l*(1-o)+p*o}static awGainLookup(t,o,n){const a=Math.min(Math.max(t,0),1)*(K-1),i=Math.min(Math.max(o,0),1)*(D-1),h=(Math.log2(Math.max(n,20))-N[0])/(N[T-1]-N[0]),u=Math.min(Math.max(h*(T-1),0),T-1),A=Math.min(Math.floor(a),K-2),S=a-A,E=Math.min(Math.floor(i),D-2),f=i-E,b=Math.min(Math.floor(u),T-2),m=u-b,d=e.awBilinear(A,S,E,f,b,m),l=e.awBilinear(A,S,E,f,e.AW_REF_FI,0);return l<=1e-6?d:l*Math.pow(d/l,e.AW_TILT)}static shapeMap(t,o,n,a){let i;if(o<=.5){const s=Math.abs(t);i=(t>=0?1:-1)*Math.pow(s,n)}else{const s=(o-.5)*2,h=Math.sin(t*Math.PI*.5);i=t+(h-t)*s}return a>0&&(i=(1-a)*i+a*(t>=0?1:-1)),i}static blep(t){if(t>=0){if(t>=1)return 0;const n=t-1;return-.5*n*n}if(t<=-1)return 0;const o=t+1;return .5*o*o}static eval(t,o,n){const a=Math.min(Math.max(o,.001),.999);let i;t<a?i=t/a:i=1-(t-a)/(1-a);const s=2*i-1;if(n<=.5){const h=Math.max(n*2,.05),u=Math.abs(s);return(s>=0?1:-1)*Math.pow(u,h)}else{const h=(n-.5)*2,u=Math.sin(s*Math.PI*.5);return s+(u-s)*h}}cornerSample(t,o,n,a,i,s,h,u){let A;t<o?A=t/o:A=1-(t-o)/(1-o);let S=2*A-1;n>0&&(S=(1-n)*S+n*(a?2*t-1:1-2*t));let E=e.shapeMap(S,i,s,h);const f=u>=0?1:-1;for(let b=0;b<this.nSteps;b++){let m=t-this.stepPos[b];m-=Math.round(m);const d=m/u;d>-1&&d<1&&(E+=f*this.stepAmp[b]*e.blep(d))}return E}process(t,o,n){const a=t[0]?.[0],i=o[0]?.[0];if(!i)return!0;const s=n.skew,h=n.shape,u=n.normalize[0]>.5,A=1/sampleRate,S=e.SMOOTH_COEFF,E=e.UPDATE_INTERVAL,f=e.SKEW_EDGE,b=e.SHAPE_EDGE;for(let m=0;m<i.length;m++){const d=a&&a.length>m?a[m]:440;let l=s.length>1?s[m]:s[0],p=h.length>1?h[m]:h[0];l=(l+1)*.5,p=(p+1)*.5,l=1-Math.abs((l%2+2)%2-1),p=1-Math.abs((p%2+2)%2-1);const y=d*A*.5;let c=0,W=!1;l<f?c=1-l/f:l>1-f&&(c=1-(1-l)/f,W=!0);let v=0,R=1;if(p<=.5){const M=p*2;R=M>b?M:b,M<b&&(v=1-M/b)}let B,I;if(v===0&&c===0)this.phase+=y,this.phase>=1&&(this.phase-=1),this.phase<0&&(this.phase+=1),B=e.eval(this.phase,l,p),this.phase+=y,this.phase>=1&&(this.phase-=1),this.phase<0&&(this.phase+=1),I=e.eval(this.phase,l,p);else{const M=Math.min(Math.max(l,f),1-f),q=W?-1:1,C=W?2*M-1:1-2*M,j=W?1:-1,G=c>0?(1-c)*-1+c*q:-1,O=c>0?(1-c)*1+c*C:1,x=c>0?(1-c)*-1+c*j:-1;if(this.nSteps=0,c>0){const z=e.shapeMap(G,p,R,v)-e.shapeMap(x,p,R,v);z!==0&&(this.stepPos[this.nSteps]=0,this.stepAmp[this.nSteps++]=z)}v>0&&(G<0!=O<0&&(this.stepPos[this.nSteps]=M*(0-G)/(O-G),this.stepAmp[this.nSteps++]=O>G?2*v:-2*v),O<0!=x<0&&(this.stepPos[this.nSteps]=M+(1-M)*(0-O)/(x-O),this.stepAmp[this.nSteps++]=x>O?2*v:-2*v)),this.phase+=y,this.phase>=1&&(this.phase-=1),this.phase<0&&(this.phase+=1),B=this.cornerSample(this.phase,M,c,W,p,R,v,y),this.phase+=y,this.phase>=1&&(this.phase-=1),this.phase<0&&(this.phase+=1),I=this.cornerSample(this.phase,M,c,W,p,R,v,y)}const{OS_B0:P,OS_B1:Q,OS_B2:U,OS_A1:L,OS_A2:_}=e;let V=B-L*this.osW1-_*this.osW2;this.osW2=this.osW1,this.osW1=V,V=I-L*this.osW1-_*this.osW2;let H=P*V+Q*this.osW1+U*this.osW2;this.osW2=this.osW1,this.osW1=V,u&&((m&E-1)===0&&(this.normTarget=e.awGainLookup(p,l,d)),this.normGain+=S*(this.normTarget-this.normGain),H*=this.normGain),i[m]=H}return!0}};r(e,\\\"OS_B0\\\",.20657),r(e,\\\"OS_B1\\\",.41314),r(e,\\\"OS_B2\\\",.20657),r(e,\\\"OS_A1\\\",-.36953),r(e,\\\"OS_A2\\\",.19582),r(e,\\\"UPDATE_INTERVAL\\\",32),r(e,\\\"SMOOTH_COEFF\\\",1-Math.pow(.05,1/32)),r(e,\\\"AW_TILT\\\",.35),r(e,\\\"AW_REF_FI\\\",2),r(e,\\\"SKEW_EDGE\\\",.01),r(e,\\\"SHAPE_EDGE\\\",.05);let k=e;registerProcessor(\\\"waveshaper\\\",k);})();\\n\";\n"],
|
|
5
|
+
"mappings": ";AAAA,IAAO,wBAAQ;;;ACAf,IAAO,qBAAQ;;;ACAf,IAAO,sBAAQ;;;ACAf,IAAO,uBAAQ;;;ACAf,IAAO,qBAAQ;;;ACAf,IAAO,kBAAQ;;;ACAf,IAAO,wBAAQ;;;ACAf,IAAO,uBAAQ;;;ACAf,IAAO,uBAAQ;;;ACAf,IAAO,gBAAQ;;;ACAf,IAAO,wBAAQ;;;ACAf,IAAO,kBAAQ;;;ACAf,IAAO,2BAAQ;;;ACAf,IAAO,6BAAQ;;;ACAf,IAAO,oBAAQ;;;ACAf,IAAO,wBAAQ;;;ACAf,IAAO,wBAAQ;;;ACAf,IAAO,qBAAQ;;;ACAf,IAAO,oBAAQ;;;ACAf,IAAO,cAAQ;;;ACAf,IAAO,qBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/docs/GUIDE.md
CHANGED
|
@@ -292,15 +292,30 @@ transport.start();
|
|
|
292
292
|
|
|
293
293
|
## Sample kits
|
|
294
294
|
|
|
295
|
-
Every kit is CC0 or public domain, and each one carries its own `license`.
|
|
295
|
+
Every kit is CC0 or public domain, and each one carries its own `license`. Each kit is its own import, and its audio ships inside the package. Import only the kits you use: your bundler copies and hashes just their sound files, and nothing is fetched from a third-party server. Voices are `bd sd rim clap ch oh lt mt ht cym perc` (`VOICE_KEYS`). If a kit lacks a voice, you get the closest one it has, e.g. `oh` falls back to `ch`, then `cym`.
|
|
296
|
+
|
|
297
|
+
| Import | Kit | Family | Voices |
|
|
298
|
+
|---|---|---|---|
|
|
299
|
+
| `import { Roland808 } from '@jpdutoit/squelchy/kits/roland-808'` | Roland TR-808 | Machines | bd sd rim clap ch oh lt mt ht cym perc |
|
|
300
|
+
| `import { Tr909 } from '@jpdutoit/squelchy/kits/tr-909'` | Roland TR-909 | Machines | bd sd rim clap ch oh lt mt ht cym perc |
|
|
301
|
+
| `import { Tr707 } from '@jpdutoit/squelchy/kits/tr-707'` | Roland TR-707 | Machines | bd sd rim clap ch oh lt mt ht cym perc |
|
|
302
|
+
| `import { Tr606 } from '@jpdutoit/squelchy/kits/tr-606'` | Roland TR-606 | Machines | bd sd ch oh lt mt ht cym |
|
|
303
|
+
| `import { Compu78 } from '@jpdutoit/squelchy/kits/compu-78'` | Compu-78 | Machines | bd sd rim clap ch oh lt mt ht cym perc |
|
|
304
|
+
| `import { Dr5Studio } from '@jpdutoit/squelchy/kits/dr5-studio'` | Studio Kit | Acoustic | bd sd rim clap ch oh lt mt ht cym perc |
|
|
305
|
+
| `import { TapeDust } from '@jpdutoit/squelchy/kits/tape-dust'` | Tape Dust | Character | bd sd rim clap ch oh lt mt ht cym perc |
|
|
306
|
+
| `import { HardCell } from '@jpdutoit/squelchy/kits/hard-cell'` | Hard Cell | Character | bd sd rim clap ch oh lt mt ht cym perc |
|
|
307
|
+
| `import { Rx5Fm } from '@jpdutoit/squelchy/kits/rx5-fm'` | Yamaha RX5 | Digital | bd sd rim clap ch oh lt mt ht cym perc |
|
|
308
|
+
| `import { MicroClick } from '@jpdutoit/squelchy/kits/micro-click'` | Micro Click | Digital | bd sd rim clap ch oh lt mt ht cym perc |
|
|
309
|
+
| `import { DeepAnalogue } from '@jpdutoit/squelchy/kits/deep-analogue'` | Deep Analogue | Acoustic | bd sd rim clap ch oh lt mt ht cym perc |
|
|
296
310
|
|
|
297
311
|
```ts
|
|
298
|
-
import { createTransport, steps, loadSampleSet,
|
|
312
|
+
import { createTransport, steps, loadSampleSet, SampleVoice, VOICE_KEYS } from '@jpdutoit/squelchy';
|
|
313
|
+
import { Tr909 } from '@jpdutoit/squelchy/kits/tr-909';
|
|
299
314
|
|
|
300
315
|
const ctx = new AudioContext();
|
|
301
|
-
|
|
316
|
+
console.log(Tr909.name, Tr909.license);
|
|
302
317
|
|
|
303
|
-
const kit = await loadSampleSet(ctx,
|
|
318
|
+
const kit = await loadSampleSet(ctx, Tr909);
|
|
304
319
|
console.log(VOICE_KEYS.filter((k) => !kit.buffers[k])); // voices this kit covers by fallback
|
|
305
320
|
|
|
306
321
|
const bd = SampleVoice.create(ctx, kit, 'bd');
|
|
@@ -316,13 +331,20 @@ transport.start();
|
|
|
316
331
|
|
|
317
332
|
A step value of `0` is a rest, so use `true` for an unshifted hit.
|
|
318
333
|
|
|
319
|
-
**
|
|
334
|
+
**How the audio gets into your build.** A kit's voice URLs are written as `new URL('./tr-909/bd.flac', import.meta.url)`. Vite (8.3 or newer, in dev and build), webpack 5 and Parcel all recognise that pattern: they copy each file of the kits you import into your output with a content hash and rewrite the URL. Loading the package unbundled, e.g. from a CDN like jsDelivr, resolves the files next to the kit module.
|
|
335
|
+
|
|
336
|
+
**Your own kit.** `loadSampleSet` takes any `SampleSetInfo`, so you can point voices at your own files:
|
|
320
337
|
|
|
321
338
|
```ts
|
|
322
|
-
import { loadSampleSet,
|
|
339
|
+
import { loadSampleSet, type SampleSetInfo } from '@jpdutoit/squelchy';
|
|
323
340
|
|
|
324
341
|
const ctx = new AudioContext();
|
|
325
|
-
const
|
|
342
|
+
const mine: SampleSetInfo = {
|
|
343
|
+
name: 'My kit', blurb: 'Field recordings', family: 'Character',
|
|
344
|
+
credit: 'Me', license: 'CC0', licenseUrl: 'https://creativecommons.org/publicdomain/zero/1.0/',
|
|
345
|
+
voices: { bd: '/audio/kick.wav', sd: new URL('./snare.wav', import.meta.url).href },
|
|
346
|
+
};
|
|
347
|
+
const kit = await loadSampleSet(ctx, mine);
|
|
326
348
|
```
|
|
327
349
|
|
|
328
350
|
## Offline rendering and custom clocks
|
package/docs/MODULES.md
CHANGED
|
@@ -369,10 +369,10 @@ Categories: Modulators · Worklets: adsr-envelope
|
|
|
369
369
|
|
|
370
370
|
| Param | Default | Range | Description |
|
|
371
371
|
|---|---|---|---|
|
|
372
|
-
| `attack` | `0.01` | 0.001 – 2 s (log) | **Attack** — Time for
|
|
373
|
-
| `decay` | `0.
|
|
374
|
-
| `sustain` | `0.7` | 0 – 1 | **Sustain** — Level held while the note is held. 0 = plucky, 1 = organ-like. Automatable: `params.sustain` is a native AudioParam. |
|
|
375
|
-
| `release` | `
|
|
372
|
+
| `attack` | `0.01` | 0.001 – 2 s (log) | **Attack** — Time for the level to rise from zero to full, in a straight line. Automatable: `params.attack` is a native AudioParam. |
|
|
373
|
+
| `decay` | `0.46` | 0.001 – 10 s (log) | **Decay** — Time to fall from the peak to the sustain level, on an exponential curve like an analog envelope. The time for the gap to sustain to shrink by 60 dB. Automatable: `params.decay` is a native AudioParam. |
|
|
374
|
+
| `sustain` | `0.7` | 0 – 1 | **Sustain** — Level held while the note is held. 0 = plucky, 1 = organ-like. Moving it while a note is held glides at the decay speed. Automatable: `params.sustain` is a native AudioParam. |
|
|
375
|
+
| `release` | `2.1` | 0.001 – 20 s (log) | **Release** — Time to fade to silence (60 dB down) after the note is released, on an exponential curve like an analog envelope. Automatable: `params.release` is a native AudioParam. |
|
|
376
376
|
| `depth` | `48` | 0 – 96 semitones (sqrt) | **ENV Depth** — Scales the ENV output in semitones (12 = one octave), the unit every pitch and cutoff modulation input on this rack reads. Higher values produce a wider sweep on the modulation target. Automatable: `params.depth` is a native AudioParam. |
|
|
377
377
|
|
|
378
378
|
## EQ3
|
|
@@ -926,10 +926,10 @@ Categories: Time · Worklets: pitch-shifter, fdn-reverb
|
|
|
926
926
|
|
|
927
927
|
| Param | Default | Range | Description |
|
|
928
928
|
|---|---|---|---|
|
|
929
|
-
| `decay` | `3` | 0.5 – 10 s (log) | **Reverb Decay** — RT60 of the reverb tank in seconds. `set()` only. |
|
|
929
|
+
| `decay` | `3` | 0.5 – 10 s (log) | **Reverb Decay** — RT60 of the reverb tank in seconds — the time to fall 60 dB, measured at 500 Hz. Treble dies faster, like a real hall. `set()` only. |
|
|
930
930
|
| `pitch` | `12` | -12 – 24 semitones | **Pitch Shift** — Transposition applied by the granular pitch shifter on every trip round the feedback loop (12 = one octave). +12 = octave up, +7 = fifth up, -12 = octave down. `set()` only. |
|
|
931
931
|
| `mix` | `0.5` | 0 – 1 | **Dry/Wet Mix** — Equal-power balance between dry signal and shimmer output — independent of the regen amount. Automatable: `params.mix` is a native AudioParam. |
|
|
932
|
-
| `shimmer` | `0.5` | 0 – 0.95 | **Shimmer Regen** —
|
|
932
|
+
| `shimmer` | `0.5` | 0 – 0.95 | **Shimmer Regen** — Gain once round the pitch-shifted feedback loop, measured at 500 Hz: 0.5 = each new octave 6 dB quieter than the last, 0.95 = an almost endless rising choir. Means the same at every DECAY setting. Automatable: `params.shimmer` is a native AudioParam. |
|
|
933
933
|
|
|
934
934
|
## LIMIT
|
|
935
935
|
|
package/docs/modules.json
CHANGED
|
@@ -894,7 +894,7 @@
|
|
|
894
894
|
"params": {
|
|
895
895
|
"attack": {
|
|
896
896
|
"name": "Attack",
|
|
897
|
-
"description": "Time for
|
|
897
|
+
"description": "Time for the level to rise from zero to full, in a straight line.",
|
|
898
898
|
"type": "Seconds",
|
|
899
899
|
"unit": "s",
|
|
900
900
|
"default": 0.01,
|
|
@@ -905,18 +905,18 @@
|
|
|
905
905
|
},
|
|
906
906
|
"decay": {
|
|
907
907
|
"name": "Decay",
|
|
908
|
-
"description": "Time to fall from peak to sustain level
|
|
908
|
+
"description": "Time to fall from the peak to the sustain level, on an exponential curve like an analog envelope. The time for the gap to sustain to shrink by 60 dB.",
|
|
909
909
|
"type": "Seconds",
|
|
910
910
|
"unit": "s",
|
|
911
|
-
"default": 0.
|
|
911
|
+
"default": 0.46,
|
|
912
912
|
"min": 0.001,
|
|
913
|
-
"max":
|
|
913
|
+
"max": 10,
|
|
914
914
|
"scale": "log",
|
|
915
915
|
"automatable": true
|
|
916
916
|
},
|
|
917
917
|
"sustain": {
|
|
918
918
|
"name": "Sustain",
|
|
919
|
-
"description": "Level held while the note is held. 0 = plucky, 1 = organ-like.",
|
|
919
|
+
"description": "Level held while the note is held. 0 = plucky, 1 = organ-like. Moving it while a note is held glides at the decay speed.",
|
|
920
920
|
"type": "number",
|
|
921
921
|
"unit": "factor",
|
|
922
922
|
"default": 0.7,
|
|
@@ -926,12 +926,12 @@
|
|
|
926
926
|
},
|
|
927
927
|
"release": {
|
|
928
928
|
"name": "Release",
|
|
929
|
-
"description": "Time to fade to silence after note is released.",
|
|
929
|
+
"description": "Time to fade to silence (60 dB down) after the note is released, on an exponential curve like an analog envelope.",
|
|
930
930
|
"type": "Seconds",
|
|
931
931
|
"unit": "s",
|
|
932
|
-
"default":
|
|
932
|
+
"default": 2.1,
|
|
933
933
|
"min": 0.001,
|
|
934
|
-
"max":
|
|
934
|
+
"max": 20,
|
|
935
935
|
"scale": "log",
|
|
936
936
|
"automatable": true
|
|
937
937
|
},
|
|
@@ -2439,7 +2439,7 @@
|
|
|
2439
2439
|
"params": {
|
|
2440
2440
|
"decay": {
|
|
2441
2441
|
"name": "Reverb Decay",
|
|
2442
|
-
"description": "RT60 of the reverb tank in seconds.",
|
|
2442
|
+
"description": "RT60 of the reverb tank in seconds — the time to fall 60 dB, measured at 500 Hz. Treble dies faster, like a real hall.",
|
|
2443
2443
|
"type": "Seconds",
|
|
2444
2444
|
"unit": "s",
|
|
2445
2445
|
"default": 3,
|
|
@@ -2470,7 +2470,7 @@
|
|
|
2470
2470
|
},
|
|
2471
2471
|
"shimmer": {
|
|
2472
2472
|
"name": "Shimmer Regen",
|
|
2473
|
-
"description": "
|
|
2473
|
+
"description": "Gain once round the pitch-shifted feedback loop, measured at 500 Hz: 0.5 = each new octave 6 dB quieter than the last, 0.95 = an almost endless rising choir. Means the same at every DECAY setting.",
|
|
2474
2474
|
"type": "number",
|
|
2475
2475
|
"unit": "factor",
|
|
2476
2476
|
"default": 0.5,
|