@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.
Files changed (154) hide show
  1. package/README.md +4 -3
  2. package/{chunk-NDUSYSHF.js → chunk-MEZE4P3U.js} +5 -5
  3. package/chunk-MEZE4P3U.js.map +7 -0
  4. package/docs/GUIDE.md +29 -7
  5. package/docs/MODULES.md +6 -6
  6. package/docs/modules.json +10 -10
  7. package/index.d.ts +7 -241
  8. package/index.js +68 -260
  9. package/index.js.map +4 -4
  10. package/kits/compu-78/bd.flac +0 -0
  11. package/kits/compu-78/ch.flac +0 -0
  12. package/kits/compu-78/clap.flac +0 -0
  13. package/kits/compu-78/cym.flac +0 -0
  14. package/kits/compu-78/ht.flac +0 -0
  15. package/kits/compu-78/lt.flac +0 -0
  16. package/kits/compu-78/mt.flac +0 -0
  17. package/kits/compu-78/oh.flac +0 -0
  18. package/kits/compu-78/perc.flac +0 -0
  19. package/kits/compu-78/rim.flac +0 -0
  20. package/kits/compu-78/sd.flac +0 -0
  21. package/kits/compu-78.d.ts +7 -0
  22. package/kits/compu-78.js +22 -0
  23. package/kits/deep-analogue/bd.flac +0 -0
  24. package/kits/deep-analogue/ch.flac +0 -0
  25. package/kits/deep-analogue/clap.flac +0 -0
  26. package/kits/deep-analogue/cym.flac +0 -0
  27. package/kits/deep-analogue/ht.flac +0 -0
  28. package/kits/deep-analogue/lt.flac +0 -0
  29. package/kits/deep-analogue/mt.flac +0 -0
  30. package/kits/deep-analogue/oh.flac +0 -0
  31. package/kits/deep-analogue/perc.flac +0 -0
  32. package/kits/deep-analogue/rim.flac +0 -0
  33. package/kits/deep-analogue/sd.flac +0 -0
  34. package/kits/deep-analogue.d.ts +7 -0
  35. package/kits/deep-analogue.js +22 -0
  36. package/kits/dr5-studio/bd.flac +0 -0
  37. package/kits/dr5-studio/ch.flac +0 -0
  38. package/kits/dr5-studio/clap.flac +0 -0
  39. package/kits/dr5-studio/cym.flac +0 -0
  40. package/kits/dr5-studio/ht.flac +0 -0
  41. package/kits/dr5-studio/lt.flac +0 -0
  42. package/kits/dr5-studio/mt.flac +0 -0
  43. package/kits/dr5-studio/oh.flac +0 -0
  44. package/kits/dr5-studio/perc.flac +0 -0
  45. package/kits/dr5-studio/rim.flac +0 -0
  46. package/kits/dr5-studio/sd.flac +0 -0
  47. package/kits/dr5-studio.d.ts +7 -0
  48. package/kits/dr5-studio.js +22 -0
  49. package/kits/hard-cell/bd.flac +0 -0
  50. package/kits/hard-cell/ch.flac +0 -0
  51. package/kits/hard-cell/clap.flac +0 -0
  52. package/kits/hard-cell/cym.flac +0 -0
  53. package/kits/hard-cell/ht.flac +0 -0
  54. package/kits/hard-cell/lt.flac +0 -0
  55. package/kits/hard-cell/mt.flac +0 -0
  56. package/kits/hard-cell/oh.flac +0 -0
  57. package/kits/hard-cell/perc.flac +0 -0
  58. package/kits/hard-cell/rim.flac +0 -0
  59. package/kits/hard-cell/sd.flac +0 -0
  60. package/kits/hard-cell.d.ts +7 -0
  61. package/kits/hard-cell.js +22 -0
  62. package/kits/micro-click/bd.flac +0 -0
  63. package/kits/micro-click/ch.flac +0 -0
  64. package/kits/micro-click/clap.flac +0 -0
  65. package/kits/micro-click/cym.flac +0 -0
  66. package/kits/micro-click/ht.flac +0 -0
  67. package/kits/micro-click/lt.flac +0 -0
  68. package/kits/micro-click/mt.flac +0 -0
  69. package/kits/micro-click/oh.flac +0 -0
  70. package/kits/micro-click/perc.flac +0 -0
  71. package/kits/micro-click/rim.flac +0 -0
  72. package/kits/micro-click/sd.flac +0 -0
  73. package/kits/micro-click.d.ts +7 -0
  74. package/kits/micro-click.js +22 -0
  75. package/kits/roland-808/bd.flac +0 -0
  76. package/kits/roland-808/ch.flac +0 -0
  77. package/kits/roland-808/clap.flac +0 -0
  78. package/kits/roland-808/cym.flac +0 -0
  79. package/kits/roland-808/ht.flac +0 -0
  80. package/kits/roland-808/lt.flac +0 -0
  81. package/kits/roland-808/mt.flac +0 -0
  82. package/kits/roland-808/oh.flac +0 -0
  83. package/kits/roland-808/perc.flac +0 -0
  84. package/kits/roland-808/rim.flac +0 -0
  85. package/kits/roland-808/sd.flac +0 -0
  86. package/kits/roland-808.d.ts +7 -0
  87. package/kits/roland-808.js +22 -0
  88. package/kits/rx5-fm/bd.flac +0 -0
  89. package/kits/rx5-fm/ch.flac +0 -0
  90. package/kits/rx5-fm/clap.flac +0 -0
  91. package/kits/rx5-fm/cym.flac +0 -0
  92. package/kits/rx5-fm/ht.flac +0 -0
  93. package/kits/rx5-fm/lt.flac +0 -0
  94. package/kits/rx5-fm/mt.flac +0 -0
  95. package/kits/rx5-fm/oh.flac +0 -0
  96. package/kits/rx5-fm/perc.flac +0 -0
  97. package/kits/rx5-fm/rim.flac +0 -0
  98. package/kits/rx5-fm/sd.flac +0 -0
  99. package/kits/rx5-fm.d.ts +7 -0
  100. package/kits/rx5-fm.js +22 -0
  101. package/kits/tape-dust/bd.flac +0 -0
  102. package/kits/tape-dust/ch.flac +0 -0
  103. package/kits/tape-dust/clap.flac +0 -0
  104. package/kits/tape-dust/cym.flac +0 -0
  105. package/kits/tape-dust/ht.flac +0 -0
  106. package/kits/tape-dust/lt.flac +0 -0
  107. package/kits/tape-dust/mt.flac +0 -0
  108. package/kits/tape-dust/oh.flac +0 -0
  109. package/kits/tape-dust/perc.flac +0 -0
  110. package/kits/tape-dust/rim.flac +0 -0
  111. package/kits/tape-dust/sd.flac +0 -0
  112. package/kits/tape-dust.d.ts +7 -0
  113. package/kits/tape-dust.js +22 -0
  114. package/kits/tr-606/bd.flac +0 -0
  115. package/kits/tr-606/ch.flac +0 -0
  116. package/kits/tr-606/cym.flac +0 -0
  117. package/kits/tr-606/ht.flac +0 -0
  118. package/kits/tr-606/lt.flac +0 -0
  119. package/kits/tr-606/mt.flac +0 -0
  120. package/kits/tr-606/oh.flac +0 -0
  121. package/kits/tr-606/sd.flac +0 -0
  122. package/kits/tr-606.d.ts +7 -0
  123. package/kits/tr-606.js +19 -0
  124. package/kits/tr-707/bd.flac +0 -0
  125. package/kits/tr-707/ch.flac +0 -0
  126. package/kits/tr-707/clap.flac +0 -0
  127. package/kits/tr-707/cym.flac +0 -0
  128. package/kits/tr-707/ht.flac +0 -0
  129. package/kits/tr-707/lt.flac +0 -0
  130. package/kits/tr-707/mt.flac +0 -0
  131. package/kits/tr-707/oh.flac +0 -0
  132. package/kits/tr-707/perc.flac +0 -0
  133. package/kits/tr-707/rim.flac +0 -0
  134. package/kits/tr-707/sd.flac +0 -0
  135. package/kits/tr-707.d.ts +7 -0
  136. package/kits/tr-707.js +22 -0
  137. package/kits/tr-909/bd.flac +0 -0
  138. package/kits/tr-909/ch.flac +0 -0
  139. package/kits/tr-909/clap.flac +0 -0
  140. package/kits/tr-909/cym.flac +0 -0
  141. package/kits/tr-909/ht.flac +0 -0
  142. package/kits/tr-909/lt.flac +0 -0
  143. package/kits/tr-909/mt.flac +0 -0
  144. package/kits/tr-909/oh.flac +0 -0
  145. package/kits/tr-909/perc.flac +0 -0
  146. package/kits/tr-909/rim.flac +0 -0
  147. package/kits/tr-909/sd.flac +0 -0
  148. package/kits/tr-909.d.ts +7 -0
  149. package/kits/tr-909.js +22 -0
  150. package/meta.json +16 -16
  151. package/package.json +6 -1
  152. package/{worklets-inline-MUVFLGPY.js → worklets-inline-DFWINMCS.js} +2 -2
  153. package/chunk-NDUSYSHF.js.map +0 -7
  154. /package/{worklets-inline-MUVFLGPY.js.map → worklets-inline-DFWINMCS.js.map} +0 -0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,7 @@
1
+ import type { SampleSetInfo } from '../index.js';
2
+
3
+ /** Roland TR-909 — Punchy transistor kick, snappy sampled snare, sizzling metal hats. House and techno. CC0 1.0 / public domain — free to use, no attribution required. */
4
+ export declare const Tr909: SampleSetInfo & {
5
+ readonly name: "Roland TR-909";
6
+ readonly voices: Readonly<Record<'bd' | 'sd' | 'rim' | 'clap' | 'ch' | 'oh' | 'lt' | 'mt' | 'ht' | 'cym' | 'perc', string>>;
7
+ };
package/kits/tr-909.js ADDED
@@ -0,0 +1,22 @@
1
+ /** Roland TR-909 — CC0 1.0 / public domain — free to use, no attribution required. */
2
+ export const Tr909 = {
3
+ "name": "Roland TR-909",
4
+ "blurb": "Punchy transistor kick, snappy sampled snare, sizzling metal hats. House and techno.",
5
+ "family": "Machines",
6
+ "credit": "MckAudio TR8 sample pack, dedicated to the public domain (CC0)",
7
+ "license": "CC0 1.0 / public domain — free to use, no attribution required",
8
+ "licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
9
+ "voices": {
10
+ "bd": new URL('./tr-909/bd.flac', import.meta.url).href,
11
+ "sd": new URL('./tr-909/sd.flac', import.meta.url).href,
12
+ "rim": new URL('./tr-909/rim.flac', import.meta.url).href,
13
+ "clap": new URL('./tr-909/clap.flac', import.meta.url).href,
14
+ "ch": new URL('./tr-909/ch.flac', import.meta.url).href,
15
+ "oh": new URL('./tr-909/oh.flac', import.meta.url).href,
16
+ "lt": new URL('./tr-909/lt.flac', import.meta.url).href,
17
+ "mt": new URL('./tr-909/mt.flac', import.meta.url).href,
18
+ "ht": new URL('./tr-909/ht.flac', import.meta.url).href,
19
+ "cym": new URL('./tr-909/cym.flac', import.meta.url).href,
20
+ "perc": new URL('./tr-909/perc.flac', import.meta.url).href,
21
+ }
22
+ };
package/meta.json CHANGED
@@ -1202,19 +1202,19 @@
1202
1202
  "scale": "log",
1203
1203
  "unit": "s",
1204
1204
  "short": "Attack",
1205
- "long": "Time for signal to rise from zero to full level when triggered."
1205
+ "long": "Time for the level to rise from zero to full, in a straight line."
1206
1206
  },
1207
1207
  "decay": {
1208
1208
  "node": "adsrNode",
1209
1209
  "field": "decay",
1210
1210
  "label": "D",
1211
- "default": 0.1,
1211
+ "default": 0.46,
1212
1212
  "min": 0.001,
1213
- "max": 2,
1213
+ "max": 10,
1214
1214
  "scale": "log",
1215
1215
  "unit": "s",
1216
1216
  "short": "Decay",
1217
- "long": "Time to fall from peak to sustain level after attack completes."
1217
+ "long": "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."
1218
1218
  },
1219
1219
  "sustain": {
1220
1220
  "node": "adsrNode",
@@ -1225,19 +1225,19 @@
1225
1225
  "min": 0,
1226
1226
  "max": 1,
1227
1227
  "short": "Sustain",
1228
- "long": "Level held while the note is held. 0 = plucky, 1 = organ-like."
1228
+ "long": "Level held while the note is held. 0 = plucky, 1 = organ-like. Moving it while a note is held glides at the decay speed."
1229
1229
  },
1230
1230
  "release": {
1231
1231
  "node": "adsrNode",
1232
1232
  "field": "release",
1233
1233
  "label": "R",
1234
- "default": 0.3,
1234
+ "default": 2.1,
1235
1235
  "min": 0.001,
1236
- "max": 3,
1236
+ "max": 20,
1237
1237
  "scale": "log",
1238
1238
  "unit": "s",
1239
1239
  "short": "Release",
1240
- "long": "Time to fade to silence after note is released."
1240
+ "long": "Time to fade to silence (60 dB down) after the note is released, on an exponential curve like an analog envelope."
1241
1241
  },
1242
1242
  "depth": {
1243
1243
  "node": "envOut",
@@ -1255,19 +1255,19 @@
1255
1255
  "controlDescriptions": {
1256
1256
  "A": {
1257
1257
  "short": "Attack",
1258
- "long": "Time for signal to rise from zero to full level when triggered."
1258
+ "long": "Time for the level to rise from zero to full, in a straight line."
1259
1259
  },
1260
1260
  "D": {
1261
1261
  "short": "Decay",
1262
- "long": "Time to fall from peak to sustain level after attack completes."
1262
+ "long": "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."
1263
1263
  },
1264
1264
  "S": {
1265
1265
  "short": "Sustain",
1266
- "long": "Level held while the note is held. 0 = plucky, 1 = organ-like."
1266
+ "long": "Level held while the note is held. 0 = plucky, 1 = organ-like. Moving it while a note is held glides at the decay speed."
1267
1267
  },
1268
1268
  "R": {
1269
1269
  "short": "Release",
1270
- "long": "Time to fade to silence after note is released."
1270
+ "long": "Time to fade to silence (60 dB down) after the note is released, on an exponential curve like an analog envelope."
1271
1271
  },
1272
1272
  "DEPTH": {
1273
1273
  "short": "ENV Depth",
@@ -3289,7 +3289,7 @@
3289
3289
  "max": 10,
3290
3290
  "scale": "log",
3291
3291
  "short": "Reverb Decay",
3292
- "long": "RT60 of the reverb tank in seconds."
3292
+ "long": "RT60 of the reverb tank in seconds — the time to fall 60 dB, measured at 500 Hz. Treble dies faster, like a real hall."
3293
3293
  },
3294
3294
  "pitch": {
3295
3295
  "label": "PITCH",
@@ -3320,13 +3320,13 @@
3320
3320
  "min": 0,
3321
3321
  "max": 0.95,
3322
3322
  "short": "Shimmer Regen",
3323
- "long": "How much pitch-shifted signal is fed back into the tank. High = endless rising choir."
3323
+ "long": "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."
3324
3324
  }
3325
3325
  },
3326
3326
  "controlDescriptions": {
3327
3327
  "DECAY": {
3328
3328
  "short": "Reverb Decay",
3329
- "long": "RT60 of the reverb tank in seconds."
3329
+ "long": "RT60 of the reverb tank in seconds — the time to fall 60 dB, measured at 500 Hz. Treble dies faster, like a real hall."
3330
3330
  },
3331
3331
  "PITCH": {
3332
3332
  "short": "Pitch Shift",
@@ -3338,7 +3338,7 @@
3338
3338
  },
3339
3339
  "SHIMMER": {
3340
3340
  "short": "Shimmer Regen",
3341
- "long": "How much pitch-shifted signal is fed back into the tank. High = endless rising choir."
3341
+ "long": "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."
3342
3342
  }
3343
3343
  },
3344
3344
  "worklets": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpdutoit/squelchy",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Modular synth modules for plain Web Audio: oscillators, filters, envelopes, effects and drum kits as native-feeling nodes, with AudioWorklet DSP inlined and tree-shakeable.",
5
5
  "license": "MIT",
6
6
  "author": "jpdutoit",
@@ -27,6 +27,10 @@
27
27
  "types": "./index.d.ts",
28
28
  "import": "./index.js"
29
29
  },
30
+ "./kits/*": {
31
+ "types": "./kits/*.d.ts",
32
+ "import": "./kits/*.js"
33
+ },
30
34
  "./meta.json": "./meta.json",
31
35
  "./docs/*": "./docs/*",
32
36
  "./package.json": "./package.json"
@@ -36,6 +40,7 @@
36
40
  "*.js",
37
41
  "*.js.map",
38
42
  "index.d.ts",
43
+ "kits",
39
44
  "meta.json",
40
45
  "docs",
41
46
  "README.md",
@@ -20,7 +20,7 @@ import {
20
20
  tape_stop_default,
21
21
  vca_default,
22
22
  waveshaper_default
23
- } from "./chunk-NDUSYSHF.js";
23
+ } from "./chunk-MEZE4P3U.js";
24
24
 
25
25
  // src/lib-runtime/generated/worklet-src/master-limiter.ts
26
26
  var master_limiter_default = '(()=>{var b=Object.defineProperty;var x=(l,s,a)=>s in l?b(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a;var e=(l,s,a)=>x(l,typeof s!="symbol"?s+"":s,a);class C extends AudioWorkletProcessor{constructor(){super();e(this,"delay",[]);e(this,"gainRing");e(this,"gainSum");e(this,"len");e(this,"w",0);e(this,"env",1);e(this,"meterCountdown");e(this,"meterPeriod");e(this,"minGain",1);e(this,"inPeak",0);e(this,"outPeak",0);this.len=Math.max(8,Math.round(1.5/1e3*sampleRate)),this.gainRing=new Float32Array(this.len).fill(1),this.gainSum=this.len,this.meterPeriod=Math.max(1,Math.round(50/1e3*sampleRate)),this.meterCountdown=this.meterPeriod}static get parameterDescriptors(){return[{name:"ceiling",defaultValue:.98,minValue:.05,maxValue:1,automationRate:"k-rate"},{name:"release",defaultValue:120,minValue:5,maxValue:2e3,automationRate:"k-rate"},{name:"enabled",defaultValue:1,minValue:0,maxValue:1,automationRate:"k-rate"}]}ensureChannels(a,p){if(this.delay.length===a&&this.delay[0]?.length===this.len)return;const h=[];for(let i=0;i<a;i++)h[i]=this.delay[i]?.length===this.len?this.delay[i]:new Float32Array(this.len);this.delay=h}process(a,p,h){const i=a[0],m=p[0];if(!m||m.length===0)return!0;const v=m.length,P=m[0]?.length??0;if(!P)return!0;this.ensureChannels(v,P);const u=h.ceiling[0],A=h.release[0],R=h.enabled[0]>=.5,V=1-Math.exp(-1/(A/1e3*sampleRate)),M=this.len;for(let c=0;c<P;c++){let r=0;for(let n=0;n<v;n++){const d=i?.[n]??i?.[0],g=d?d[c]:0,f=g<0?-g:g;f>r&&(r=f)}r>=0||(r=0),r>this.inPeak&&(this.inPeak=r);const k=r>u?u/r:1;k<this.env?this.env=k:this.env+=(k-this.env)*V,this.gainSum+=this.env-this.gainRing[this.w],this.gainRing[this.w]=this.env;let o=this.gainSum/M;o>=0||(o=1),o>1&&(o=1),R||(o=1),o<this.minGain&&(this.minGain=o);for(let n=0;n<v;n++){const d=this.delay[n],g=d[this.w],f=i?.[n]??i?.[0],y=f?f[c]:0;d[this.w]=y===y?y:0;let t=g*o;t>u?t=u:t<-u?t=-u:t!==t&&(t=0),m[n][c]=t;const w=t<0?-t:t;w>this.outPeak&&(this.outPeak=w)}this.w=this.w+1>=M?0:this.w+1,--this.meterCountdown<=0&&(this.meterCountdown=this.meterPeriod,this.port.postMessage({gr:this.minGain<1?-20*Math.log10(Math.max(this.minGain,1e-6)):0,inPeak:this.inPeak,outPeak:this.outPeak}),this.minGain=1,this.inPeak=0,this.outPeak=0)}return!0}}registerProcessor("master-limiter",C);})();\n';
@@ -57,4 +57,4 @@ var WORKLET_SOURCES = {
57
57
  export {
58
58
  WORKLET_SOURCES
59
59
  };
60
- //# sourceMappingURL=worklets-inline-MUVFLGPY.js.map
60
+ //# sourceMappingURL=worklets-inline-DFWINMCS.js.map
@@ -1,7 +0,0 @@
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 S=Object.defineProperty;var x=(s,e,a)=>e in s?S(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a;var l=(s,e,a)=>x(s,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,a);class D extends AudioWorkletProcessor{constructor(){super(...arguments);l(this,\\\"_stage\\\",0);l(this,\\\"_level\\\",0);l(this,\\\"_prevGate\\\",0);l(this,\\\"_hold\\\",0);l(this,\\\"_prevEff\\\",!1)}static get parameterDescriptors(){return[{name:\\\"attack\\\",defaultValue:.01,minValue:.001,maxValue:2},{name:\\\"decay\\\",defaultValue:.1,minValue:.001,maxValue:2},{name:\\\"sustain\\\",defaultValue:.7,minValue:0,maxValue:1},{name:\\\"release\\\",defaultValue:.3,minValue:.001,maxValue:3}]}process(a,V,i){const f=a[0]?.[0],c=V[0]?.[0];if(!c)return!0;const n=sampleRate,h=i.attack,_=i.decay,v=i.sustain,u=i.release;for(let t=0;t<c.length;t++){const E=f?f[t]:0,d=E>.5,T=this._prevGate>.5,g=h.length>1?h[t]:h[0],p=_.length>1?_[t]:_[0],o=v.length>1?v[t]:v[0],k=u.length>1?u[t]:u[0];d&&!T?(this._hold=Math.ceil((g+p)*n)+1,this._stage=1):this._hold>0&&this._hold--;const A=d||this._hold>0,m=this._prevEff;switch(A&&!m?this._stage=1:!A&&m&&(this._stage=4),this._stage){case 1:{const r=1/Math.max(g*n,1);this._level+=r,this._level>=1&&(this._level=1,this._stage=2);break}case 2:{const r=(1-o)/Math.max(p*n,1);this._level-=r,this._level<=o&&(this._level=o,this._stage=3);break}case 3:this._level=o;break;case 4:{const r=this._level/Math.max(k*n,1);this._level-=r,this._level<=1e-4&&(this._level=0,this._stage=0);break}case 0:default:this._level=0;break}this._prevGate=E,this._prevEff=A,c[t]=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 at=Object.defineProperty;var nt=(h,u,r)=>u in h?at(h,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):h[u]=r;var a=(h,u,r)=>nt(h,typeof u!=\\\"symbol\\\"?u+\\\"\\\":u,r);const ot=[29.7,37.1,41.1,43.7],rt=[5,1.7],it=[4.3,2.3],F=.5,ct=1e-20;class lt extends AudioWorkletProcessor{constructor(r){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 f=r?.processorOptions?.size??1;this.ceiling=r?.processorOptions?.feedbackCeiling??.97;for(let i=0;i<4;i++){const o=ot[i]/1e3*f,c=Math.max(2,Math.round(o*sampleRate));this.combDelaySec.push(c/sampleRate),this.combLen.push(c),this.combBuf.push(new Float32Array(c))}for(let i=0;i<2;i++){const o=Math.max(2,Math.round(rt[i]/1e3*sampleRate));this.apLen.push(o),this.apBuf.push(new Float32Array(o));const c=Math.max(2,Math.round(it[i]/1e3*sampleRate));this.sApLen.push(c),this.sApBuf.push(new Float32Array(c))}}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(r){return this.combDelaySec.map(f=>Math.min(Math.pow(10,-3*f/Math.max(r,.05)),this.ceiling))}process(r,f,i){const o=f[0];if(!o||!o[0])return!0;const c=o[0],T=c.length,l=r[0],z=i.rt60[0],G=i.damping[0],j=this.targetGains(z),N=800*Math.pow(20,Math.max(0,Math.min(1,G))),W=1-Math.exp(-2*Math.PI*N/sampleRate),L=.15;for(let t=0;t<4;t++)this.g[t]+=(j[t]-this.g[t])*L;this.lpCoef+=(W-this.lpCoef)*L;const[C,_,O,P]=this.combBuf,[q,H,J,K]=this.combLen,M=this.g,x=this.lpCoef,n=this.lpState,e=this.combIdx,D=o.length>1?o[1]:null,Q=!!(l&&l.length>1);for(let t=0;t<T;t++){let m=0,b=0;if(l&&l.length){for(let s=0;s<l.length;s++)m+=l[s][t];l.length>1&&(m/=l.length),Q&&(b=.5*(l[0][t]-l[1][t]))}const U=C[e[0]],X=_[e[1]],Y=O[e[2]],Z=P[e[3]];n[0]+=(U-n[0])*x,n[1]+=(X-n[1])*x,n[2]+=(Y-n[2])*x,n[3]+=(Z-n[3])*x;const V=n[0],k=n[1],w=n[2],E=n[3],v=V*M[0],y=k*M[1],I=w*M[2],S=E*M[3],$=.5*(v+y+I+S),tt=.5*(v-y+I-S),et=.5*(v+y-I-S),st=.5*(v-y-I+S);C[e[0]]=m+b+$,_[e[1]]=m-b+tt,O[e[2]]=m+b+et,P[e[3]]=m-b+st,e[0]=e[0]+1===q?0:e[0]+1,e[1]=e[1]+1===H?0:e[1]+1,e[2]=e[2]+1===J?0:e[2]+1,e[3]=e[3]+1===K?0:e[3]+1;let R=.5*(V+w),B=.5*(k+E);for(let s=0;s<2;s++){const d=this.apBuf[s],p=this.apIdx[s],g=d[p],A=R+g*F;d[p]=A,R=g-A*F,this.apIdx[s]=p+1===this.apLen[s]?0:p+1}for(let s=0;s<2;s++){const d=this.sApBuf[s],p=this.sApIdx[s],g=d[p],A=B+g*F;d[p]=A,B=g-A*F,this.sApIdx[s]=p+1===this.sApLen[s]?0:p+1}D?(c[t]=R,D[t]=B):c[t]=.5*(R+B)}for(let t=0;t<4;t++)Math.abs(n[t])<ct&&(n[t]=0);for(let t=2;t<o.length;t++)o[t].set(o[t&1]);return!0}}registerProcessor(\\\"fdn-reverb\\\",lt);})();\\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 F=Object.defineProperty;var S=(i,s,e)=>s in i?F(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var r=(i,s,e)=>S(i,typeof s!=\\\"symbol\\\"?s+\\\"\\\":s,e);class N extends AudioWorkletProcessor{constructor(){super();r(this,\\\"ring\\\");r(this,\\\"ringLen\\\");r(this,\\\"writePos\\\",0);r(this,\\\"readPos\\\");r(this,\\\"grainPhase\\\");r(this,\\\"grainLen\\\");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])}static get parameterDescriptors(){return[{name:\\\"semitones\\\",defaultValue:12,minValue:-24,maxValue:24,automationRate:\\\"k-rate\\\"}]}process(e,P,l){const h=e[0]?.[0],o=P[0]?.[0];if(!o)return!0;const p=l.semitones[0],u=Math.pow(2,p/12),d=1/this.grainLen,L=2*Math.PI;for(let a=0;a<o.length;a++){const m=h?h[a]:0;this.ring[this.writePos]=m;let c=0;for(let t=0;t<2;t++){this.grainPhase[t]+=d,this.grainPhase[t]>=1?(this.grainPhase[t]-=1,this.readPos[t]=(this.writePos-this.grainLen+this.ringLen)%this.ringLen):(this.readPos[t]+=u,this.readPos[t]>=this.ringLen?this.readPos[t]-=this.ringLen:this.readPos[t]<0&&(this.readPos[t]+=this.ringLen));const g=this.readPos[t],n=g|0,w=g-n,A=(n+1)%this.ringLen,f=this.ring[n]+w*(this.ring[A]-this.ring[n]),y=.5-.5*Math.cos(L*this.grainPhase[t]);c+=f*y}o[a]=c,this.writePos=this.writePos+1===this.ringLen?0:this.writePos+1}return!0}}registerProcessor(\\\"pitch-shifter\\\",N);})();\\n\";\n", "export default \"(()=>{var X=Object.defineProperty;var Y=(n,o,e)=>o in n?X(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e;var s=(n,o,e)=>Y(n,typeof o!=\\\"symbol\\\"?o+\\\"\\\":o,e);const r=[{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}],v=r.length,G=.7,I=.95,Z=2.4,z=4,J=150,U=15,W=.98,j=1e-20;function q(n){if(n>3)return 1;if(n<-3)return-1;const o=n*n;return n*(27+o)/(27+9*o)}class Q 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<v;e++){this.apX.push(new Float32Array(r[e].stages)),this.apY.push(new Float32Array(r[e].stages));const c=Math.max(2,Math.round(r[e].delayMs/1e3*sampleRate));this.dLen.push(c),this.dBuf.push(new Float32Array(c)),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*J/sampleRate),this.dcCoef=1-Math.exp(-2*Math.PI*U/sampleRate),this.knockLen=Math.max(8,Math.round(z/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,c,m){const h=c[0];if(!h||!h[0])return!0;const y=h[0],A=h[1]??h[0],H=y.length,g=e[0]?.[0],F=e[0]?.[1]??g,b=e[1]?.[0],S=m.decay[0],T=Math.max(0,Math.min(1,m.tone[0])),V=.35+.42*Math.max(0,Math.min(1,m.drip[0]));this.a+=(V-this.a)*.1;const p=this.a,N=1100*Math.pow(6500/1100,T),_=1-Math.exp(-2*Math.PI*N/sampleRate);this.lpCoef+=(_-this.lpCoef)*.15;const O=this.lpCoef,w=(1+p)/(1-p);for(let a=0;a<v;a++){const l=(this.dLen[a]+r[a].stages*w)/sampleRate,u=Math.min(Math.pow(10,-3*l/Math.max(S,.05)),W);this.g[a]+=(u-this.g[a])*.15}const B=this.inHpCoef,D=this.dcCoef;for(let a=0;a<H;a++){if(b){const t=b[a];t>.5&&this.prevTrig<=.5&&(this.knockPos=0),this.prevTrig=t}const l=g?(g[a]+F[a])*.5:0;this.inHpState+=B*(l-this.inHpState);let u=(l-this.inHpState)*G;this.knockPos>=0&&(u+=Math.sin(Math.PI*this.knockPos/this.knockLen)*Z,++this.knockPos>=this.knockLen&&(this.knockPos=-1));let C=0,P=0;for(let t=0;t<v;t++){let d=u+this.fb[t]+j;const M=this.apX[t],x=this.apY[t],E=M.length;for(let i=0;i<E;i++){const L=-p*d+M[i]+p*x[i];M[i]=d,x[i]=L,d=L}const R=this.dBuf[t],f=this.dIdx[t],K=R[f];R[f]=d,this.dIdx[t]=f+1>=this.dLen[t]?0:f+1,this.lp[t]+=O*(K-this.lp[t]),this.dc[t]+=D*(this.lp[t]-this.dc[t]);const k=q(this.lp[t]-this.dc[t]);this.fb[t]=k*this.g[t],r[t].chan===0?C+=k:P+=k}y[a]=C*I,A[a]=P*I}return!0}}registerProcessor(\\\"spring-reverb\\\",Q);})();\\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
- }