@logue/reverb 1.4.0 → 1.4.2

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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @logue/reverb
3
+ *
4
+ * @description JavaScript Reverb effect class
5
+ * @author Logue <logue@hotmail.co.jp>
6
+ * @copyright 2019-2025 By Masashi Yoshikawa All rights reserved.
7
+ * @license MIT
8
+ * @version 1.4.1
9
+ * @see {@link https://github.com/logue/Reverb.js}
10
+ */
11
+
12
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@thi.ng/colored-noise"),u=require("@thi.ng/transducers"),f=require("@thi.ng/random");const d={version:"1.4.1",date:"2025-07-12T06:07:47.985Z"},m={noise:"white",scale:1,peaks:2,randomAlgorithm:f.SYSTEM,decay:2,delay:0,reverse:!1,time:2,filterType:"allpass",filterFreq:2200,filterQ:1,mix:.5,once:!1};class o{static version=d.version;static build=d.date;ctx;wetGainNode;dryGainNode;filterNode;convolverNode;outputNode;options;isConnected;noise=s.white;noiseMap={blue:s.blue,green:s.green,pink:s.pink,red:s.red,brown:s.red,violet:s.violet,white:s.white};constructor(e,t){this.ctx=e,this.options=Object.assign(m,t),this.wetGainNode=this.ctx.createGain(),this.dryGainNode=this.ctx.createGain(),this.filterNode=this.ctx.createBiquadFilter(),this.convolverNode=this.ctx.createConvolver(),this.outputNode=this.ctx.createGain(),this.isConnected=!1,this.filterType(this.options.filterType),this.setNoise(this.options.noise),this.buildImpulse(),this.mix(this.options.mix)}connect(e){return this.isConnected&&this.options.once?(this.isConnected=!1,this.outputNode):(this.convolverNode.connect(this.filterNode),this.filterNode.connect(this.wetGainNode),e.connect(this.convolverNode),e.connect(this.dryGainNode),e.connect(this.wetGainNode),this.dryGainNode.connect(this.outputNode),this.wetGainNode.connect(this.outputNode),this.isConnected=!0,this.outputNode)}disconnect(e){return this.isConnected&&(this.convolverNode.disconnect(this.filterNode),this.filterNode.disconnect(this.wetGainNode)),this.isConnected=!1,e}mix(e){if(!o.inRange(e,0,1))throw new RangeError("[Reverb.js] Dry/Wet ratio must be between 0 to 1.");this.options.mix=e,this.dryGainNode.gain.value=1-e,this.wetGainNode.gain.value=e}time(e){if(!o.inRange(e,1,50))throw new RangeError("[Reverb.js] Time length of impulse response must be less than 50sec.");this.options.time=e,this.buildImpulse()}decay(e){if(!o.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response decay level must be less than 100.");this.options.decay=e,this.buildImpulse()}delay(e){if(!o.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response delay time must be less than 100.");this.options.delay=e,this.buildImpulse()}reverse(e){this.options.reverse=e,this.buildImpulse()}filterType(e="allpass"){this.filterNode.type=this.options.filterType=e}filterFreq(e){if(!o.inRange(e,20,2e4))throw new RangeError("[Reverb.js] Filter frequrncy must be between 20 and 20000.");this.options.filterFreq=e,this.filterNode.frequency.value=this.options.filterFreq}filterQ(e){if(!o.inRange(e,0,10))throw new RangeError("[Reverb.js] Filter Q value must be between 0 and 10.");this.options.filterQ=e,this.filterNode.Q.value=this.options.filterQ}peaks(e){this.options.peaks=e,this.buildImpulse()}scale(e){this.options.scale=e,this.buildImpulse()}getNoise(e){return[...u.take(e,this.noise({bins:this.options.peaks,scale:this.options.scale,rnd:this.options.randomAlgorithm}))]}setNoise(e){this.options.noise=e,this.noise=this.noiseMap[e]||s.white,this.buildImpulse()}setRandomAlgorithm(e){this.options.randomAlgorithm=e,this.buildImpulse()}static inRange(e,t,n){return e>=t&&e<=n}buildImpulse(){const e=this.ctx.sampleRate,t=Math.max(e*this.options.time,1),n=e*this.options.delay,a=this.ctx.createBuffer(2,t,e),l=new Float32Array(t),h=new Float32Array(t),c=this.getNoise(t),p=this.getNoise(t);for(let i=0;i<t;i++){let r=0;i<n?(l[i]=0,h[i]=0,r=this.options.reverse??!1?t-(i-n):i-n):r=this.options.reverse??!1?t-i:i,l[i]=(c[i]??0)*(1-r/t)**this.options.decay,h[i]=(p[i]??0)*(1-r/t)**this.options.decay}a.getChannelData(0).set(l),a.getChannelData(1).set(h),this.convolverNode.buffer=a}}exports.default=o;
package/dist/Reverb.es.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2019-2025 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.4.0
8
+ * @version 1.4.1
9
9
  * @see {@link https://github.com/logue/Reverb.js}
10
10
  */
11
11
 
@@ -13,8 +13,8 @@ import { white as l, violet as f, red as d, pink as m, green as N, blue as g } f
13
13
  import { take as v } from "@thi.ng/transducers";
14
14
  import { SYSTEM as w } from "@thi.ng/random";
15
15
  const c = {
16
- version: "1.4.0",
17
- date: "2025-06-01T11:08:05.639Z"
16
+ version: "1.4.1",
17
+ date: "2025-07-12T06:07:47.985Z"
18
18
  }, y = {
19
19
  noise: "white",
20
20
  scale: 1,
@@ -5,8 +5,8 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2019-2025 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.4.0
8
+ * @version 1.4.1
9
9
  * @see {@link https://github.com/logue/Reverb.js}
10
10
  */
11
11
 
12
- var Reverb=function(a,s,u,p){"use strict";const c={version:"1.4.0",date:"2025-06-01T11:08:05.639Z"},f={noise:"white",scale:1,peaks:2,randomAlgorithm:p.SYSTEM,decay:2,delay:0,reverse:!1,time:2,filterType:"allpass",filterFreq:2200,filterQ:1,mix:.5,once:!1};class n{static version=c.version;static build=c.date;ctx;wetGainNode;dryGainNode;filterNode;convolverNode;outputNode;options;isConnected;noise=s.white;noiseMap={blue:s.blue,green:s.green,pink:s.pink,red:s.red,brown:s.red,violet:s.violet,white:s.white};constructor(e,t){this.ctx=e,this.options=Object.assign(f,t),this.wetGainNode=this.ctx.createGain(),this.dryGainNode=this.ctx.createGain(),this.filterNode=this.ctx.createBiquadFilter(),this.convolverNode=this.ctx.createConvolver(),this.outputNode=this.ctx.createGain(),this.isConnected=!1,this.filterType(this.options.filterType),this.setNoise(this.options.noise),this.buildImpulse(),this.mix(this.options.mix)}connect(e){return this.isConnected&&this.options.once?(this.isConnected=!1,this.outputNode):(this.convolverNode.connect(this.filterNode),this.filterNode.connect(this.wetGainNode),e.connect(this.convolverNode),e.connect(this.dryGainNode),e.connect(this.wetGainNode),this.dryGainNode.connect(this.outputNode),this.wetGainNode.connect(this.outputNode),this.isConnected=!0,this.outputNode)}disconnect(e){return this.isConnected&&(this.convolverNode.disconnect(this.filterNode),this.filterNode.disconnect(this.wetGainNode)),this.isConnected=!1,e}mix(e){if(!n.inRange(e,0,1))throw new RangeError("[Reverb.js] Dry/Wet ratio must be between 0 to 1.");this.options.mix=e,this.dryGainNode.gain.value=1-e,this.wetGainNode.gain.value=e}time(e){if(!n.inRange(e,1,50))throw new RangeError("[Reverb.js] Time length of impulse response must be less than 50sec.");this.options.time=e,this.buildImpulse()}decay(e){if(!n.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response decay level must be less than 100.");this.options.decay=e,this.buildImpulse()}delay(e){if(!n.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response delay time must be less than 100.");this.options.delay=e,this.buildImpulse()}reverse(e){this.options.reverse=e,this.buildImpulse()}filterType(e="allpass"){this.filterNode.type=this.options.filterType=e}filterFreq(e){if(!n.inRange(e,20,2e4))throw new RangeError("[Reverb.js] Filter frequrncy must be between 20 and 20000.");this.options.filterFreq=e,this.filterNode.frequency.value=this.options.filterFreq}filterQ(e){if(!n.inRange(e,0,10))throw new RangeError("[Reverb.js] Filter Q value must be between 0 and 10.");this.options.filterQ=e,this.filterNode.Q.value=this.options.filterQ}peaks(e){this.options.peaks=e,this.buildImpulse()}scale(e){this.options.scale=e,this.buildImpulse()}getNoise(e){return[...u.take(e,this.noise({bins:this.options.peaks,scale:this.options.scale,rnd:this.options.randomAlgorithm}))]}setNoise(e){this.options.noise=e,this.noise=this.noiseMap[e]||s.white,this.buildImpulse()}setRandomAlgorithm(e){this.options.randomAlgorithm=e,this.buildImpulse()}static inRange(e,t,o){return e>=t&&e<=o}buildImpulse(){const e=this.ctx.sampleRate,t=Math.max(e*this.options.time,1),o=e*this.options.delay,h=this.ctx.createBuffer(2,t,e),l=new Float32Array(t),d=new Float32Array(t),m=this.getNoise(t),v=this.getNoise(t);for(let i=0;i<t;i++){let r=0;i<o?(l[i]=0,d[i]=0,r=this.options.reverse??!1?t-(i-o):i-o):r=this.options.reverse??!1?t-i:i,l[i]=(m[i]??0)*(1-r/t)**this.options.decay,d[i]=(v[i]??0)*(1-r/t)**this.options.decay}h.getChannelData(0).set(l),h.getChannelData(1).set(d),this.convolverNode.buffer=h}}return a.default=n,Object.defineProperty(a,"__esModule",{value:!0}),a}({},coloredNoise,transducers,random);
12
+ var Reverb=function(a,s,u,p){"use strict";const c={version:"1.4.1",date:"2025-07-12T06:07:47.985Z"},f={noise:"white",scale:1,peaks:2,randomAlgorithm:p.SYSTEM,decay:2,delay:0,reverse:!1,time:2,filterType:"allpass",filterFreq:2200,filterQ:1,mix:.5,once:!1};class n{static version=c.version;static build=c.date;ctx;wetGainNode;dryGainNode;filterNode;convolverNode;outputNode;options;isConnected;noise=s.white;noiseMap={blue:s.blue,green:s.green,pink:s.pink,red:s.red,brown:s.red,violet:s.violet,white:s.white};constructor(e,t){this.ctx=e,this.options=Object.assign(f,t),this.wetGainNode=this.ctx.createGain(),this.dryGainNode=this.ctx.createGain(),this.filterNode=this.ctx.createBiquadFilter(),this.convolverNode=this.ctx.createConvolver(),this.outputNode=this.ctx.createGain(),this.isConnected=!1,this.filterType(this.options.filterType),this.setNoise(this.options.noise),this.buildImpulse(),this.mix(this.options.mix)}connect(e){return this.isConnected&&this.options.once?(this.isConnected=!1,this.outputNode):(this.convolverNode.connect(this.filterNode),this.filterNode.connect(this.wetGainNode),e.connect(this.convolverNode),e.connect(this.dryGainNode),e.connect(this.wetGainNode),this.dryGainNode.connect(this.outputNode),this.wetGainNode.connect(this.outputNode),this.isConnected=!0,this.outputNode)}disconnect(e){return this.isConnected&&(this.convolverNode.disconnect(this.filterNode),this.filterNode.disconnect(this.wetGainNode)),this.isConnected=!1,e}mix(e){if(!n.inRange(e,0,1))throw new RangeError("[Reverb.js] Dry/Wet ratio must be between 0 to 1.");this.options.mix=e,this.dryGainNode.gain.value=1-e,this.wetGainNode.gain.value=e}time(e){if(!n.inRange(e,1,50))throw new RangeError("[Reverb.js] Time length of impulse response must be less than 50sec.");this.options.time=e,this.buildImpulse()}decay(e){if(!n.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response decay level must be less than 100.");this.options.decay=e,this.buildImpulse()}delay(e){if(!n.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response delay time must be less than 100.");this.options.delay=e,this.buildImpulse()}reverse(e){this.options.reverse=e,this.buildImpulse()}filterType(e="allpass"){this.filterNode.type=this.options.filterType=e}filterFreq(e){if(!n.inRange(e,20,2e4))throw new RangeError("[Reverb.js] Filter frequrncy must be between 20 and 20000.");this.options.filterFreq=e,this.filterNode.frequency.value=this.options.filterFreq}filterQ(e){if(!n.inRange(e,0,10))throw new RangeError("[Reverb.js] Filter Q value must be between 0 and 10.");this.options.filterQ=e,this.filterNode.Q.value=this.options.filterQ}peaks(e){this.options.peaks=e,this.buildImpulse()}scale(e){this.options.scale=e,this.buildImpulse()}getNoise(e){return[...u.take(e,this.noise({bins:this.options.peaks,scale:this.options.scale,rnd:this.options.randomAlgorithm}))]}setNoise(e){this.options.noise=e,this.noise=this.noiseMap[e]||s.white,this.buildImpulse()}setRandomAlgorithm(e){this.options.randomAlgorithm=e,this.buildImpulse()}static inRange(e,t,o){return e>=t&&e<=o}buildImpulse(){const e=this.ctx.sampleRate,t=Math.max(e*this.options.time,1),o=e*this.options.delay,h=this.ctx.createBuffer(2,t,e),l=new Float32Array(t),d=new Float32Array(t),m=this.getNoise(t),v=this.getNoise(t);for(let i=0;i<t;i++){let r=0;i<o?(l[i]=0,d[i]=0,r=this.options.reverse??!1?t-(i-o):i-o):r=this.options.reverse??!1?t-i:i,l[i]=(m[i]??0)*(1-r/t)**this.options.decay,d[i]=(v[i]??0)*(1-r/t)**this.options.decay}h.getChannelData(0).set(l),h.getChannelData(1).set(d),this.convolverNode.buffer=h}}return a.default=n,Object.defineProperty(a,"__esModule",{value:!0}),a}({},coloredNoise,transducers,random);
@@ -5,8 +5,8 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2019-2025 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.4.0
8
+ * @version 1.4.1
9
9
  * @see {@link https://github.com/logue/Reverb.js}
10
10
  */
11
11
 
12
- (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@thi.ng/colored-noise"),require("@thi.ng/transducers"),require("@thi.ng/random")):typeof define=="function"&&define.amd?define(["exports","@thi.ng/colored-noise","@thi.ng/transducers","@thi.ng/random"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.Reverb={},n.coloredNoise,n.transducers,n.random))})(this,function(n,i,u,p){"use strict";const c={version:"1.4.0",date:"2025-06-01T11:08:05.639Z"},f={noise:"white",scale:1,peaks:2,randomAlgorithm:p.SYSTEM,decay:2,delay:0,reverse:!1,time:2,filterType:"allpass",filterFreq:2200,filterQ:1,mix:.5,once:!1};class o{static version=c.version;static build=c.date;ctx;wetGainNode;dryGainNode;filterNode;convolverNode;outputNode;options;isConnected;noise=i.white;noiseMap={blue:i.blue,green:i.green,pink:i.pink,red:i.red,brown:i.red,violet:i.violet,white:i.white};constructor(e,t){this.ctx=e,this.options=Object.assign(f,t),this.wetGainNode=this.ctx.createGain(),this.dryGainNode=this.ctx.createGain(),this.filterNode=this.ctx.createBiquadFilter(),this.convolverNode=this.ctx.createConvolver(),this.outputNode=this.ctx.createGain(),this.isConnected=!1,this.filterType(this.options.filterType),this.setNoise(this.options.noise),this.buildImpulse(),this.mix(this.options.mix)}connect(e){return this.isConnected&&this.options.once?(this.isConnected=!1,this.outputNode):(this.convolverNode.connect(this.filterNode),this.filterNode.connect(this.wetGainNode),e.connect(this.convolverNode),e.connect(this.dryGainNode),e.connect(this.wetGainNode),this.dryGainNode.connect(this.outputNode),this.wetGainNode.connect(this.outputNode),this.isConnected=!0,this.outputNode)}disconnect(e){return this.isConnected&&(this.convolverNode.disconnect(this.filterNode),this.filterNode.disconnect(this.wetGainNode)),this.isConnected=!1,e}mix(e){if(!o.inRange(e,0,1))throw new RangeError("[Reverb.js] Dry/Wet ratio must be between 0 to 1.");this.options.mix=e,this.dryGainNode.gain.value=1-e,this.wetGainNode.gain.value=e}time(e){if(!o.inRange(e,1,50))throw new RangeError("[Reverb.js] Time length of impulse response must be less than 50sec.");this.options.time=e,this.buildImpulse()}decay(e){if(!o.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response decay level must be less than 100.");this.options.decay=e,this.buildImpulse()}delay(e){if(!o.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response delay time must be less than 100.");this.options.delay=e,this.buildImpulse()}reverse(e){this.options.reverse=e,this.buildImpulse()}filterType(e="allpass"){this.filterNode.type=this.options.filterType=e}filterFreq(e){if(!o.inRange(e,20,2e4))throw new RangeError("[Reverb.js] Filter frequrncy must be between 20 and 20000.");this.options.filterFreq=e,this.filterNode.frequency.value=this.options.filterFreq}filterQ(e){if(!o.inRange(e,0,10))throw new RangeError("[Reverb.js] Filter Q value must be between 0 and 10.");this.options.filterQ=e,this.filterNode.Q.value=this.options.filterQ}peaks(e){this.options.peaks=e,this.buildImpulse()}scale(e){this.options.scale=e,this.buildImpulse()}getNoise(e){return[...u.take(e,this.noise({bins:this.options.peaks,scale:this.options.scale,rnd:this.options.randomAlgorithm}))]}setNoise(e){this.options.noise=e,this.noise=this.noiseMap[e]||i.white,this.buildImpulse()}setRandomAlgorithm(e){this.options.randomAlgorithm=e,this.buildImpulse()}static inRange(e,t,r){return e>=t&&e<=r}buildImpulse(){const e=this.ctx.sampleRate,t=Math.max(e*this.options.time,1),r=e*this.options.delay,a=this.ctx.createBuffer(2,t,e),l=new Float32Array(t),d=new Float32Array(t),m=this.getNoise(t),g=this.getNoise(t);for(let s=0;s<t;s++){let h=0;s<r?(l[s]=0,d[s]=0,h=this.options.reverse??!1?t-(s-r):s-r):h=this.options.reverse??!1?t-s:s,l[s]=(m[s]??0)*(1-h/t)**this.options.decay,d[s]=(g[s]??0)*(1-h/t)**this.options.decay}a.getChannelData(0).set(l),a.getChannelData(1).set(d),this.convolverNode.buffer=a}}n.default=o,Object.defineProperty(n,"__esModule",{value:!0})});
12
+ (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@thi.ng/colored-noise"),require("@thi.ng/transducers"),require("@thi.ng/random")):typeof define=="function"&&define.amd?define(["exports","@thi.ng/colored-noise","@thi.ng/transducers","@thi.ng/random"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.Reverb={},n.coloredNoise,n.transducers,n.random))})(this,function(n,i,u,p){"use strict";const c={version:"1.4.1",date:"2025-07-12T06:07:47.985Z"},f={noise:"white",scale:1,peaks:2,randomAlgorithm:p.SYSTEM,decay:2,delay:0,reverse:!1,time:2,filterType:"allpass",filterFreq:2200,filterQ:1,mix:.5,once:!1};class o{static version=c.version;static build=c.date;ctx;wetGainNode;dryGainNode;filterNode;convolverNode;outputNode;options;isConnected;noise=i.white;noiseMap={blue:i.blue,green:i.green,pink:i.pink,red:i.red,brown:i.red,violet:i.violet,white:i.white};constructor(e,t){this.ctx=e,this.options=Object.assign(f,t),this.wetGainNode=this.ctx.createGain(),this.dryGainNode=this.ctx.createGain(),this.filterNode=this.ctx.createBiquadFilter(),this.convolverNode=this.ctx.createConvolver(),this.outputNode=this.ctx.createGain(),this.isConnected=!1,this.filterType(this.options.filterType),this.setNoise(this.options.noise),this.buildImpulse(),this.mix(this.options.mix)}connect(e){return this.isConnected&&this.options.once?(this.isConnected=!1,this.outputNode):(this.convolverNode.connect(this.filterNode),this.filterNode.connect(this.wetGainNode),e.connect(this.convolverNode),e.connect(this.dryGainNode),e.connect(this.wetGainNode),this.dryGainNode.connect(this.outputNode),this.wetGainNode.connect(this.outputNode),this.isConnected=!0,this.outputNode)}disconnect(e){return this.isConnected&&(this.convolverNode.disconnect(this.filterNode),this.filterNode.disconnect(this.wetGainNode)),this.isConnected=!1,e}mix(e){if(!o.inRange(e,0,1))throw new RangeError("[Reverb.js] Dry/Wet ratio must be between 0 to 1.");this.options.mix=e,this.dryGainNode.gain.value=1-e,this.wetGainNode.gain.value=e}time(e){if(!o.inRange(e,1,50))throw new RangeError("[Reverb.js] Time length of impulse response must be less than 50sec.");this.options.time=e,this.buildImpulse()}decay(e){if(!o.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response decay level must be less than 100.");this.options.decay=e,this.buildImpulse()}delay(e){if(!o.inRange(e,0,100))throw new RangeError("[Reverb.js] Impulse Response delay time must be less than 100.");this.options.delay=e,this.buildImpulse()}reverse(e){this.options.reverse=e,this.buildImpulse()}filterType(e="allpass"){this.filterNode.type=this.options.filterType=e}filterFreq(e){if(!o.inRange(e,20,2e4))throw new RangeError("[Reverb.js] Filter frequrncy must be between 20 and 20000.");this.options.filterFreq=e,this.filterNode.frequency.value=this.options.filterFreq}filterQ(e){if(!o.inRange(e,0,10))throw new RangeError("[Reverb.js] Filter Q value must be between 0 and 10.");this.options.filterQ=e,this.filterNode.Q.value=this.options.filterQ}peaks(e){this.options.peaks=e,this.buildImpulse()}scale(e){this.options.scale=e,this.buildImpulse()}getNoise(e){return[...u.take(e,this.noise({bins:this.options.peaks,scale:this.options.scale,rnd:this.options.randomAlgorithm}))]}setNoise(e){this.options.noise=e,this.noise=this.noiseMap[e]||i.white,this.buildImpulse()}setRandomAlgorithm(e){this.options.randomAlgorithm=e,this.buildImpulse()}static inRange(e,t,r){return e>=t&&e<=r}buildImpulse(){const e=this.ctx.sampleRate,t=Math.max(e*this.options.time,1),r=e*this.options.delay,a=this.ctx.createBuffer(2,t,e),l=new Float32Array(t),d=new Float32Array(t),m=this.getNoise(t),g=this.getNoise(t);for(let s=0;s<t;s++){let h=0;s<r?(l[s]=0,d[s]=0,h=this.options.reverse??!1?t-(s-r):s-r):h=this.options.reverse??!1?t-s:s,l[s]=(m[s]??0)*(1-h/t)**this.options.decay,d[s]=(g[s]??0)*(1-h/t)**this.options.decay}a.getChannelData(0).set(l),a.getChannelData(1).set(d),this.convolverNode.buffer=a}}n.default=o,Object.defineProperty(n,"__esModule",{value:!0})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@logue/reverb",
4
- "version": "1.4.0",
4
+ "version": "1.4.2",
5
5
  "description": "JavaScript Reverb effect class",
6
6
  "keywords": [
7
7
  "webaudio",
@@ -34,14 +34,23 @@
34
34
  "exports": {
35
35
  ".": {
36
36
  "import": "./dist/Reverb.es.js",
37
- "types": "./dist/Reverb.d.ts"
38
- }
37
+ "types": "./dist/Reverb.d.ts",
38
+ "require": "./dist/Reverb.cjs.js",
39
+ "default": "./dist/Reverb.es.js"
40
+ },
41
+ "./umd": {
42
+ "default": "./dist/Reverb.umd.js"
43
+ },
44
+ "./iife": {
45
+ "default": "./dist/Reverb.iife.js"
46
+ },
47
+ "./package.json": "./package.json"
39
48
  },
40
49
  "engines": {
41
- "node": ">=22.0.1",
50
+ "node": ">=22.0.2",
42
51
  "pnpm": ">=10.3.0"
43
52
  },
44
- "packageManager": "pnpm@10.11.0",
53
+ "packageManager": "pnpm@10.13.1",
45
54
  "sideEffects": false,
46
55
  "scripts": {
47
56
  "dev": "vite",
@@ -56,36 +65,36 @@
56
65
  "preview": "vite preview --mode=docs",
57
66
  "prepare": "husky"
58
67
  },
59
- "dependencies": {
60
- "@thi.ng/colored-noise": "^1.0.101",
61
- "@thi.ng/random": "^4.1.19",
62
- "@thi.ng/transducers": "^9.3.1"
68
+ "peerDependencies": {
69
+ "@thi.ng/colored-noise": "^1.0.103",
70
+ "@thi.ng/random": "^4.1.21",
71
+ "@thi.ng/transducers": "^9.5.1"
63
72
  },
64
73
  "devDependencies": {
65
- "@eslint/js": "^9.28.0",
66
- "@tsconfig/node-lts": "^22.0.1",
67
- "@types/node": "^22.15.29",
68
- "@typescript-eslint/eslint-plugin": "^8.33.0",
69
- "bootstrap": "^5.3.6",
70
- "eslint": "^9.28.0",
74
+ "@eslint/js": "^9.31.0",
75
+ "@tsconfig/node-lts": "^22.0.2",
76
+ "@types/node": "^24.0.13",
77
+ "@typescript-eslint/eslint-plugin": "^8.36.0",
78
+ "bootstrap": "^5.3.7",
79
+ "eslint": "^9.31.0",
71
80
  "eslint-config-prettier": "^10.1.5",
72
81
  "eslint-import-resolver-custom-alias": "^1.3.2",
73
- "eslint-import-resolver-typescript": "^4.4.2",
74
- "eslint-plugin-import": "^2.31.0",
82
+ "eslint-import-resolver-typescript": "^4.4.4",
83
+ "eslint-plugin-import": "^2.32.0",
75
84
  "eslint-plugin-yaml": "^1.1.2",
76
- "globals": "^16.2.0",
85
+ "globals": "^16.3.0",
77
86
  "husky": "^9.1.7",
78
87
  "jiti": "^2.4.2",
79
- "lint-staged": "^16.1.0",
88
+ "lint-staged": "^16.1.2",
80
89
  "npm-run-all2": "^8.0.4",
81
- "prettier": "^3.5.3",
90
+ "prettier": "^3.6.2",
82
91
  "rimraf": "^6.0.1",
83
- "rollup-plugin-visualizer": "^6.0.1",
92
+ "rollup-plugin-visualizer": "^6.0.3",
84
93
  "typescript": "^5.8.3",
85
- "typescript-eslint": "^8.33.0",
86
- "vite": "^6.3.5",
94
+ "typescript-eslint": "^8.36.0",
95
+ "vite": "^7.0.4",
87
96
  "vite-plugin-banner": "^0.8.1",
88
- "vite-plugin-checker": "^0.9.3",
97
+ "vite-plugin-checker": "^0.10.0",
89
98
  "vite-plugin-dts": "^4.5.4"
90
99
  },
91
100
  "husky": {
@@ -100,11 +109,5 @@
100
109
  "resolutions": {
101
110
  "json5": ">=2.2.3",
102
111
  "yaml": ">=2.3.2"
103
- },
104
- "pnpm": {
105
- "onlyBuiltDependencies": [
106
- "esbuild",
107
- "unrs-resolver"
108
- ]
109
112
  }
110
- }
113
+ }