@logue/reverb 1.5.1 → 1.6.0

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 @@
1
+ {"version":3,"file":"Reverb.es.js","sources":["../src/interfaces/OptionInterface.ts","../src/Meta.ts","../src/NoiseType.ts","../src/index.ts"],"sourcesContent":["import type { INorm } from '@thi.ng/random';\nimport { SYSTEM } from '@thi.ng/random';\nimport type { NoiseType } from '@/NoiseType';\n\n/** Reverb Option */\nexport interface OptionInterface {\n /**\n * IR (Inpulse Response) colord noise algorithm (BLUE, GREEN, PINK, RED, VIOLET, WHITE)\n * @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/colored-noise}\n */\n noise: NoiseType;\n /** IR source noise scale */\n scale: number;\n /** Number of IR source noise peaks */\n peaks: number;\n /**\n * Randam noise algorythm\n * @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/random}\n */\n randomAlgorithm: INorm;\n /** Decay */\n decay: number;\n /** Delay until impulse response is generated */\n delay: number;\n /** Filter frequency applied to impulse response[Hz] */\n filterFreq: number;\n /** Filter quality for impulse response */\n filterQ: number;\n /** Filter type for impulse response */\n filterType: BiquadFilterType;\n /** Dry/Wet ratio */\n mix: number;\n /** Invert the impulse response */\n reverse?: boolean;\n /** Impulse response length */\n time: number;\n /** Prevents multiple effectors from being connected. */\n once: boolean;\n}\n\n/** Default Value */\nexport const defaults: OptionInterface = {\n noise: 'white',\n scale: 1,\n peaks: 2,\n randomAlgorithm: SYSTEM,\n decay: 2,\n delay: 0,\n reverse: false,\n time: 2,\n filterType: 'allpass',\n filterFreq: 2200,\n filterQ: 1,\n mix: 0.5,\n once: false,\n};\n","import type MetaInterface from '@/interfaces/MetaInterface';\n\nconst meta: MetaInterface = {\n version: __APP_VERSION__,\n date: __BUILD_DATE__,\n};\nexport default meta;\n","import {\n blue,\n type ColoredNoiseOpts,\n green,\n pink,\n red,\n violet,\n white,\n} from '@thi.ng/colored-noise';\n\n/** Noise Type */\nexport type NoiseType =\n | 'blue'\n | 'brown'\n | 'green'\n | 'pink'\n | 'red'\n | 'violet'\n | 'white';\n\nexport const NoiseType: Record<\n NoiseType,\n (opts?: Partial<ColoredNoiseOpts>) => Generator<number, void, unknown>\n> = {\n blue,\n brown: red,\n green,\n pink,\n red,\n violet,\n white,\n};\n","/// <reference path=\"./env.d.ts\" />\nimport { type ColoredNoiseOpts, white } from '@thi.ng/colored-noise';\nimport type { INorm } from '@thi.ng/random';\nimport { take } from '@thi.ng/transducers';\nimport { defaults, type OptionInterface } from '@/interfaces/OptionInterface';\nimport Meta from '@/Meta';\nimport { type NoiseType, NoiseType as NoiseTypeMap } from '@/NoiseType';\n\n/**\n * Reverb effect class\n */\nexport default class Reverb {\n /** Version strings */\n static readonly version: string = Meta.version;\n /** Build date */\n static readonly build: string = Meta.date;\n /** AudioContext */\n private readonly ctx: AudioContext;\n /** Wet Level (Reverberated node) */\n private readonly wetGainNode: GainNode;\n /** Dry Level (Original sound node) */\n private readonly dryGainNode: GainNode;\n /** Impulse response filter */\n private readonly filterNode: BiquadFilterNode;\n /** Convolution node for applying impulse response */\n private readonly convolverNode: ConvolverNode;\n /** Output gain node */\n private readonly outputNode: GainNode;\n /** Option */\n private readonly options: OptionInterface;\n /** Connected flag */\n private isConnected: boolean;\n /** Noise Generator */\n private noise: (\n _opts?: Partial<ColoredNoiseOpts>,\n ) => Generator<number, void, unknown> = white;\n /**\n * Map of noise types to their respective generator functions.\n */\n private readonly noiseMap: Record<\n NoiseType,\n (opts?: Partial<ColoredNoiseOpts>) => Generator<number, void, unknown>\n > = NoiseTypeMap;\n\n /**\n * Constructor\n *\n * @param ctx - Root AudioContext\n * @param options - Configure\n */\n constructor(ctx: AudioContext, options: Partial<OptionInterface> = {}) {\n // Store the master AudioContext.\n this.ctx = ctx;\n // Keep shared defaults immutable across instances/tests.\n this.options = Object.assign({}, defaults, options);\n // Initialize audio nodes.\n this.wetGainNode = this.ctx.createGain();\n this.dryGainNode = this.ctx.createGain();\n this.filterNode = this.ctx.createBiquadFilter();\n this.convolverNode = this.ctx.createConvolver();\n this.outputNode = this.ctx.createGain();\n // Reset connected flag.\n this.isConnected = false;\n this.filterType(this.options.filterType);\n this.setNoise(this.options.noise);\n // Generate the impulse response.\n this.buildImpulse();\n // Set the initial dry/wet ratio.\n this.mix(this.options.mix);\n }\n\n /**\n * Connect the node for the reverb effect to the original sound node.\n *\n * @param sourceNode - Input source node\n */\n public connect(sourceNode: AudioNode): AudioNode {\n if (this.isConnected && this.options.once) {\n // Already connected: reset flag and return the output node as-is.\n this.isConnected = false;\n return this.outputNode;\n }\n // Connect convolver to filter node.\n this.convolverNode.connect(this.filterNode);\n // Connect filter node to wet gain.\n this.filterNode.connect(this.wetGainNode);\n // Connect source to convolver (wet path).\n sourceNode.connect(this.convolverNode);\n // Connect source to dry gain.\n sourceNode.connect(this.dryGainNode);\n // Connect source directly to wet gain.\n sourceNode.connect(this.wetGainNode);\n // Connect dry gain to output.\n this.dryGainNode.connect(this.outputNode);\n // Connect wet gain to output.\n this.wetGainNode.connect(this.outputNode);\n // Mark as connected.\n this.isConnected = true;\n\n return this.outputNode;\n }\n\n /**\n * Disconnect the reverb node\n *\n * @param sourceNode - Input source node\n */\n public disconnect(sourceNode?: AudioNode): AudioNode | undefined {\n // Nodes are not connected in the initial state; skip disconnect to avoid errors.\n if (this.isConnected) {\n // Disconnect convolver from filter node.\n this.convolverNode.disconnect(this.filterNode);\n // Disconnect filter node from wet gain.\n this.filterNode.disconnect(this.wetGainNode);\n }\n // Clear connected flag.\n this.isConnected = false;\n\n // Return the source node to mirror common Web Audio API patterns.\n return sourceNode;\n }\n\n /**\n * Dry/Wet ratio\n *\n * @param mix - Ratio (0~1)\n */\n public mix(mix: number): void {\n if (!Reverb.inRange(mix, 0, 1)) {\n throw new RangeError('[Reverb.js] Dry/Wet ratio must be between 0 to 1.');\n }\n this.options.mix = mix;\n this.dryGainNode.gain.value = 1 - mix;\n this.wetGainNode.gain.value = mix;\n console.debug(`[Reverb.js] Set dry/wet ratio to ${mix * 100}%`);\n }\n\n /**\n * Set Impulse Response time length (second)\n *\n * @param value - IR length\n */\n public time(value: number): void {\n if (!Reverb.inRange(value, 1, 50)) {\n throw new RangeError(\n '[Reverb.js] Time length of impulse response must be less than 50sec.',\n );\n }\n this.options.time = value;\n this.buildImpulse();\n console.debug(\n `[Reverb.js] Set impulse response time length to ${value}sec.`,\n );\n }\n\n /**\n * Impulse response decay rate.\n *\n * @param value - Decay value\n */\n public decay(value: number): void {\n if (!Reverb.inRange(value, 0, 100)) {\n throw new RangeError(\n '[Reverb.js] Impulse Response decay level must be less than 100.',\n );\n }\n this.options.decay = value;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set impulse response decay level to ${value}.`);\n }\n\n /**\n * Delay before reverberation starts\n *\n * @param value - Time[ms]\n */\n public delay(value: number): void {\n if (!Reverb.inRange(value, 0, 100)) {\n throw new RangeError(\n '[Reverb.js] Impulse Response delay time must be less than 100.',\n );\n }\n this.options.delay = value;\n this.buildImpulse();\n console.debug(\n `[Reverb.js] Set impulse response delay time to ${value}sec.`,\n );\n }\n\n /**\n * Reverse the impulse response.\n *\n * @param reverse - Reverse IR\n */\n public reverse(reverse: boolean): void {\n this.options.reverse = reverse;\n this.buildImpulse();\n console.debug(\n `[Reverb.js] Inpulse response is ${reverse ? '' : 'not '}reversed.`,\n );\n }\n\n /**\n * Filter for impulse response\n *\n * @param type - Filiter Type\n */\n public filterType(type: BiquadFilterType = 'allpass'): void {\n this.filterNode.type = this.options.filterType = type;\n console.debug(`[Reverb.js] Set filter type to ${type}`);\n }\n\n /**\n * Filter frequency applied to impulse response\n *\n * @param freq - Frequency\n */\n public filterFreq(freq: number): void {\n if (!Reverb.inRange(freq, 20, 20000)) {\n throw new RangeError(\n '[Reverb.js] Filter frequrncy must be between 20 and 20000.',\n );\n }\n this.options.filterFreq = freq;\n this.filterNode.frequency.value = this.options.filterFreq;\n console.debug(`[Reverb.js] Set filter frequency to ${freq}Hz.`);\n }\n\n /**\n * Filter quality.\n *\n * @param q - Quality\n */\n public filterQ(q: number): void {\n if (!Reverb.inRange(q, 0, 10)) {\n throw new RangeError(\n '[Reverb.js] Filter Q value must be between 0 and 10.',\n );\n }\n this.options.filterQ = q;\n this.filterNode.Q.value = this.options.filterQ;\n console.debug(`[Reverb.js] Set filter Q to ${q}.`);\n }\n\n /**\n * set IR source noise peaks\n *\n * @param p - Peaks\n */\n public peaks(p: number): void {\n this.options.peaks = p;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR source noise peaks to ${p}.`);\n }\n\n /**\n * set IR source noise scale.\n *\n * @param s - Scale\n */\n public scale(s: number): void {\n this.options.scale = s;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR source noise scale to ${s}.`);\n }\n\n /**\n * Noise source\n *\n * @param duration - length of IR.\n */\n private getNoise(duration: number): number[] {\n return [\n ...take<number>(\n duration,\n this.noise({\n bins: this.options.peaks,\n scale: this.options.scale,\n rnd: this.options.randomAlgorithm,\n }),\n ),\n ];\n }\n\n /**\n * Inpulse Response Noise algorithm.\n *\n * @param type - IR noise algorithm type.\n */\n public setNoise(type: NoiseType): void {\n this.options.noise = type;\n switch (type) {\n case 'blue':\n this.noise = this.noiseMap.blue;\n break;\n case 'brown':\n this.noise = this.noiseMap.brown;\n break;\n case 'green':\n this.noise = this.noiseMap.green;\n break;\n case 'pink':\n this.noise = this.noiseMap.pink;\n break;\n case 'red':\n this.noise = this.noiseMap.red;\n break;\n case 'violet':\n this.noise = this.noiseMap.violet;\n break;\n case 'white':\n this.noise = this.noiseMap.white;\n break;\n default:\n this.noise = white;\n break;\n }\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR generator source noise type to ${type}.`);\n }\n\n /**\n * Set the random number algorithm used for noise generation.\n *\n * @param algorithm - Random algorithm implementing {@link INorm}\n */\n public setRandomAlgorithm(algorithm: INorm): void {\n this.options.randomAlgorithm = algorithm;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR source noise generator.`);\n }\n\n /**\n * Return true if in range, otherwise false\n *\n * @param x - Target value\n * @param min - Minimum value\n * @param max - Maximum value\n */\n private static inRange(x: number, min: number, max: number): boolean {\n return x >= min && x <= max;\n }\n\n /** Builds the impulse response buffer from the current options. */\n private buildImpulse(): void {\n /** Sample rate of the AudioContext. */\n const rate: number = this.ctx.sampleRate;\n /** Total IR length in samples. */\n const duration: number = Math.max(rate * this.options.time, 1);\n /** Delay before IR onset, in samples. */\n const delayDuration: number = rate * this.options.delay;\n /** IR audio buffer (stereo). */\n const impulse: AudioBuffer = this.ctx.createBuffer(2, duration, rate);\n /** Left channel sample array. */\n const impulseL: Float32Array = new Float32Array(duration);\n /** Right channel sample array. */\n const impulseR: Float32Array = new Float32Array(duration);\n /** Temporary single-sample buffers used with Float32Array.set(). */\n const sampleL = new Float32Array(1);\n const sampleR = new Float32Array(1);\n /** Noise source for left channel. */\n const noiseL: number[] = this.getNoise(duration);\n /** Noise source for right channel. */\n const noiseR: number[] = this.getNoise(duration);\n\n for (let i = 0; i < duration; i++) {\n /** Decay position index (accounts for reverse and delay). */\n let n: number;\n\n if (i < delayDuration) {\n // Zero out samples within the delay period.\n sampleL[0] = 0;\n sampleR[0] = 0;\n impulseL.set(sampleL, i);\n impulseR.set(sampleR, i);\n n =\n (this.options.reverse ?? false)\n ? duration - (i - delayDuration)\n : i - delayDuration;\n } else {\n n = (this.options.reverse ?? false) ? duration - i : i;\n }\n // Apply exponential decay to the noise source over time.\n sampleL[0] =\n (noiseL.at(i) ?? 0) * (1 - n / duration) ** this.options.decay;\n sampleR[0] =\n (noiseR.at(i) ?? 0) * (1 - n / duration) ** this.options.decay;\n impulseL.set(sampleL, i);\n impulseR.set(sampleR, i);\n }\n\n // Write the generated wave table into the IR buffer.\n impulse.getChannelData(0).set(impulseL);\n impulse.getChannelData(1).set(impulseR);\n\n this.convolverNode.buffer = impulse;\n }\n}\n"],"names":["defaults","SYSTEM","meta","__APP_VERSION__","__BUILD_DATE__","NoiseType","blue","red","green","pink","violet","white","Reverb","sourceNode","mix","RangeError","console","value","reverse","type","freq","q","p","s","duration","take","algorithm","x","min","max","rate","Math","delayDuration","impulse","impulseL","Float32Array","impulseR","sampleL","sampleR","noiseL","noiseR","i","n","ctx","options","NoiseTypeMap","Object","Meta"],"mappings":";;;;;;;;;;;;;;AAyCO,MAAMA,WAA4B;IACvC,OAAO;IACP,OAAO;IACP,OAAO;IACP,iBAAiBC;IACjB,OAAO;IACP,OAAO;IACP,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,KAAK;IACL,MAAM;AACR;ACrDA,MAAMC,OAAsB;IAC1B,SAASC;IACT,MAAMC;AACR;AACA,aAAeF;ACcR,MAAMG,YAGT;IACFC,MAAIA;IACJ,OAAOC;IACPC,OAAKA;IACLC,MAAIA;IACJF,KAAGA;IACHG,QAAMA;IACNC,OAAKA;AACP;;;;;;;;;;;ACpBe,MAAMC;IAiEZ,QAAQC,UAAqB,EAAa;QAC/C,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAEzC,IAAI,CAAC,WAAW,GAAG;YACnB,OAAO,IAAI,CAAC,UAAU;QACxB;QAEA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU;QAE1C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW;QAExCA,WAAW,OAAO,CAAC,IAAI,CAAC,aAAa;QAErCA,WAAW,OAAO,CAAC,IAAI,CAAC,WAAW;QAEnCA,WAAW,OAAO,CAAC,IAAI,CAAC,WAAW;QAEnC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU;QAExC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU;QAExC,IAAI,CAAC,WAAW,GAAG;QAEnB,OAAO,IAAI,CAAC,UAAU;IACxB;IAOO,WAAWA,UAA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IAC3B;AAwUF;AAhYE,iBAFmBhC,QAEH,WAAkBmC,KAAK,OAAO;AAE9C,iBAJmBnC,QAIH,SAAgBmC,KAAK,IAAI"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @logue/reverb
3
+ *
4
+ * @description JavaScript Reverb effect class
5
+ * @author Logue <logue@hotmail.co.jp>
6
+ * @copyright 2019-2026 By Masashi Yoshikawa All rights reserved.
7
+ * @license MIT
8
+ * @version 1.6.0
9
+ * @see {@link https://github.com/logue/Reverb.js}
10
+ */
11
+
12
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Reverb=t():e.Reverb=t()}(global,()=>(()=>{"use strict";var e={};e.d=(t,i,s)=>{var o=(i,s)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,[s]:i[o]})};o(i,"get"),o(s,"value")},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{default:()=>R});let i=1/0x100000000;class s{float(e=1){return this.int()*i*e}probability(e){return this.float()<e}norm(e=1){return(this.int()*i-.5)*2*e}normMinMax(e,t){let i=this.minmax(e,t);return .5>this.float()?i:-i}minmax(e,t){return this.float()*(t-e)+e}minmaxInt(e,t){let i=(0|t)-(e|=0);return i?e+this.int()%i:e}minmaxUint(e,t){let i=(t>>>0)-(e>>>=0);return i?e+this.int()%i:e}}let o=new class extends s{constructor(e){super(),this.rnd=e}rnd;float(e=1){return this.rnd()*e}norm(e=1){return(this.rnd()-.5)*2*e}int(){return 0x100000000*this.rnd()>>>0}}(Math.random),n={bins:2,scale:1,rnd:o};function*r(e){let{scale:t,rnd:i}={...n,...e};for(;;)yield i.norm(t)}let l=e=>e;class a{value;constructor(e){this.value=e}deref(){return this.value}}let h=e=>e instanceof a,d=e=>e instanceof a?e.deref():e,c={noise:"white",scale:1,peaks:2,randomAlgorithm:o,decay:2,delay:0,reverse:!1,time:2,filterType:"allpass",filterFreq:2200,filterQ:1,mix:.5,once:!1},u=(e,t,i)=>{let s=Array(e);for(let o=0;o<e;o++)s[o]=i.norm(t);return s},f=e=>e.reduce((e,t)=>e+t,0);function*p(e,t){let i=[e[Symbol.iterator](),t[Symbol.iterator]()];for(let e=0;;e^=1){let t=i[e].next();if(t.done)return;yield t.value}}function*b(e){let{bins:t,scale:i,rnd:s}={...n,...e},o=u(t,i,s);o.forEach((e,t)=>o[t]=1&t?e:-e);let r=1/t,l=f(o);for(let e=0,n=-1;;++e>=t&&(e=0))l-=o[e],l+=o[e]=n*s.norm(i),n^=0xfffffffe,yield n*l*r}function*m(e){let{bins:t,scale:i,rnd:s}={...n,...e},o=u(t,i,s),r=1/t,l=f(o);for(let e=0;;++e>=t&&(e=0))l-=o[e],l+=o[e]=s.norm(i),yield l*r}let v=e=>{let t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t},y={blue:b,brown:m,green:e=>p(b(e),b(e)),pink:function*(e){let{bins:t=8,scale:i,rnd:s}={...n,...e},o=u(t,i,s),r=1/t,l=f(o);for(let e=0;;e=e+1>>>0){let n=v(e)%t;l-=o[n],l+=o[n]=s.norm(i),yield l*r}},red:m,violet:e=>p(m(e),m(e)),white:r};function g(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class R{connect(e){return this.isConnected&&this.options.once?this.isConnected=!1:(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(!R.inRange(e,0,1))throw 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,console.debug(`[Reverb.js] Set dry/wet ratio to ${100*e}%`)}time(e){if(!R.inRange(e,1,50))throw RangeError("[Reverb.js] Time length of impulse response must be less than 50sec.");this.options.time=e,this.buildImpulse(),console.debug(`[Reverb.js] Set impulse response time length to ${e}sec.`)}decay(e){if(!R.inRange(e,0,100))throw RangeError("[Reverb.js] Impulse Response decay level must be less than 100.");this.options.decay=e,this.buildImpulse(),console.debug(`[Reverb.js] Set impulse response decay level to ${e}.`)}delay(e){if(!R.inRange(e,0,100))throw RangeError("[Reverb.js] Impulse Response delay time must be less than 100.");this.options.delay=e,this.buildImpulse(),console.debug(`[Reverb.js] Set impulse response delay time to ${e}sec.`)}reverse(e){this.options.reverse=e,this.buildImpulse(),console.debug(`[Reverb.js] Inpulse response is ${e?"":"not "}reversed.`)}filterType(e="allpass"){this.filterNode.type=this.options.filterType=e,console.debug(`[Reverb.js] Set filter type to ${e}`)}filterFreq(e){if(!R.inRange(e,20,2e4))throw RangeError("[Reverb.js] Filter frequrncy must be between 20 and 20000.");this.options.filterFreq=e,this.filterNode.frequency.value=this.options.filterFreq,console.debug(`[Reverb.js] Set filter frequency to ${e}Hz.`)}filterQ(e){if(!R.inRange(e,0,10))throw RangeError("[Reverb.js] Filter Q value must be between 0 and 10.");this.options.filterQ=e,this.filterNode.Q.value=this.options.filterQ,console.debug(`[Reverb.js] Set filter Q to ${e}.`)}peaks(e){this.options.peaks=e,this.buildImpulse(),console.debug(`[Reverb.js] Set IR source noise peaks to ${e}.`)}scale(e){this.options.scale=e,this.buildImpulse(),console.debug(`[Reverb.js] Set IR source noise scale to ${e}.`)}getNoise(e){return[...function e(t,i){return"function"==typeof i?.[Symbol.iterator]?function*(e,t){let i=("function"==typeof e?.xform?e.xform():e)([()=>[],l,(e,t)=>(e.push(t),e)]),s=i[1],o=i[2];for(let e of t){let t=o([],e);if(h(t))return void(yield*d(s(t.deref())));t.length&&(yield*t)}yield*d(s([]))}(e(t),i):e=>{let i,s=e[2],o=t;return i=(e,t)=>{let i;return--o>0?s(e,t):0===o?(i=s(e,t))instanceof a?i:new a(i):new a(e)},[e[0],e[1],i]}}(e,this.noise({bins:this.options.peaks,scale:this.options.scale,rnd:this.options.randomAlgorithm}))]}setNoise(e){switch(this.options.noise=e,e){case"blue":this.noise=this.noiseMap.blue;break;case"brown":this.noise=this.noiseMap.brown;break;case"green":this.noise=this.noiseMap.green;break;case"pink":this.noise=this.noiseMap.pink;break;case"red":this.noise=this.noiseMap.red;break;case"violet":this.noise=this.noiseMap.violet;break;case"white":this.noise=this.noiseMap.white;break;default:this.noise=r}this.buildImpulse(),console.debug(`[Reverb.js] Set IR generator source noise type to ${e}.`)}setRandomAlgorithm(e){this.options.randomAlgorithm=e,this.buildImpulse(),console.debug("[Reverb.js] Set IR source noise generator.")}static inRange(e,t,i){return e>=t&&e<=i}buildImpulse(){let e=this.ctx.sampleRate,t=Math.max(e*this.options.time,1),i=e*this.options.delay,s=this.ctx.createBuffer(2,t,e),o=new Float32Array(t),n=new Float32Array(t),r=new Float32Array(1),l=new Float32Array(1),a=this.getNoise(t),h=this.getNoise(t);for(let e=0;e<t;e++){let s;e<i?(r[0]=0,l[0]=0,o.set(r,e),n.set(l,e),s=this.options.reverse?t-(e-i):e-i):s=this.options.reverse?t-e:e,r[0]=(a.at(e)??0)*(1-s/t)**this.options.decay,l[0]=(h.at(e)??0)*(1-s/t)**this.options.decay,o.set(r,e),n.set(l,e)}s.getChannelData(0).set(o),s.getChannelData(1).set(n),this.convolverNode.buffer=s}constructor(e,t={}){g(this,"ctx",void 0),g(this,"wetGainNode",void 0),g(this,"dryGainNode",void 0),g(this,"filterNode",void 0),g(this,"convolverNode",void 0),g(this,"outputNode",void 0),g(this,"options",void 0),g(this,"isConnected",void 0),g(this,"noise",r),g(this,"noiseMap",y),this.ctx=e,this.options=Object.assign({},c,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)}}return g(R,"version","1.6.0"),g(R,"build","2026-06-27T10:08:29.918Z"),t})());
13
+ //# sourceMappingURL=Reverb.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Reverb.umd.js","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../node_modules/.pnpm/@thi.ng+random@4.1.52/node_modules/@thi.ng/random/arandom.js","../node_modules/.pnpm/@thi.ng+random@4.1.52/node_modules/@thi.ng/random/system.js","../node_modules/.pnpm/@thi.ng+random@4.1.52/node_modules/@thi.ng/random/wrapped.js","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/api.js","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/white.js","../node_modules/.pnpm/@thi.ng+api@8.12.26/node_modules/@thi.ng/api/fn.js","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/reduced.js","../src/interfaces/OptionInterface.ts","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/utils.js","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/blue.js","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/red.js","../node_modules/.pnpm/@thi.ng+binary@3.6.15/node_modules/@thi.ng/binary/count.js","../src/NoiseType.ts","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/green.js","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/pink.js","../node_modules/.pnpm/@thi.ng+colored-noise@1.0.136/node_modules/@thi.ng/colored-noise/violet.js","../src/index.ts","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/take.js","../node_modules/.pnpm/@thi.ng+checks@3.10.0/node_modules/@thi.ng/checks/is-iterable.js","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/iterator.js","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/ensure.js","../node_modules/.pnpm/@thi.ng+checks@3.10.0/node_modules/@thi.ng/checks/implements-function.js","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/reduce.js","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/push.js","../node_modules/.pnpm/@thi.ng+transducers@9.6.40/node_modules/@thi.ng/transducers/compr.js","../src/Meta.ts"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const INV_MAX = 1 / 2 ** 32;\nclass ARandom {\n float(norm = 1) {\n return this.int() * INV_MAX * norm;\n }\n probability(p) {\n return this.float() < p;\n }\n norm(norm = 1) {\n return (this.int() * INV_MAX - 0.5) * 2 * norm;\n }\n normMinMax(min, max) {\n const x = this.minmax(min, max);\n return this.float() < 0.5 ? x : -x;\n }\n minmax(min, max) {\n return this.float() * (max - min) + min;\n }\n minmaxInt(min, max) {\n min |= 0;\n const range = (max | 0) - min;\n return range ? min + this.int() % range : min;\n }\n minmaxUint(min, max) {\n min >>>= 0;\n const range = (max >>> 0) - min;\n return range ? min + this.int() % range : min;\n }\n}\nexport {\n ARandom\n};\n","import { WrappedRandom } from \"./wrapped.js\";\nconst SYSTEM = new WrappedRandom(Math.random);\nexport {\n SYSTEM\n};\n","import { ARandom } from \"./arandom.js\";\nclass WrappedRandom extends ARandom {\n constructor(rnd) {\n super();\n this.rnd = rnd;\n }\n rnd;\n float(norm = 1) {\n return this.rnd() * norm;\n }\n norm(norm = 1) {\n return (this.rnd() - 0.5) * 2 * norm;\n }\n int() {\n return this.rnd() * 4294967296 >>> 0;\n }\n}\nexport {\n WrappedRandom\n};\n","import { SYSTEM } from \"@thi.ng/random/system\";\nconst DEFAULT_OPTS = {\n bins: 2,\n scale: 1,\n rnd: SYSTEM\n};\nexport {\n DEFAULT_OPTS\n};\n","import { DEFAULT_OPTS } from \"./api.js\";\nfunction* white(opts) {\n const { scale, rnd } = { ...DEFAULT_OPTS, ...opts };\n while (true) {\n yield rnd.norm(scale);\n }\n}\nexport {\n white\n};\n","const identity = (x) => x;\nconst always = () => true;\nconst never = () => false;\nexport {\n always,\n identity,\n never\n};\n","class Reduced {\n value;\n constructor(val) {\n this.value = val;\n }\n deref() {\n return this.value;\n }\n}\nconst reduced = (x) => new Reduced(x);\nconst isReduced = (x) => x instanceof Reduced;\nconst ensureReduced = (x) => x instanceof Reduced ? x : new Reduced(x);\nconst unreduced = (x) => x instanceof Reduced ? x.deref() : x;\nexport {\n Reduced,\n ensureReduced,\n isReduced,\n reduced,\n unreduced\n};\n","import type { INorm } from '@thi.ng/random';\nimport { SYSTEM } from '@thi.ng/random';\nimport type { NoiseType } from '@/NoiseType';\n\n/** Reverb Option */\nexport interface OptionInterface {\n /**\n * IR (Inpulse Response) colord noise algorithm (BLUE, GREEN, PINK, RED, VIOLET, WHITE)\n * @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/colored-noise}\n */\n noise: NoiseType;\n /** IR source noise scale */\n scale: number;\n /** Number of IR source noise peaks */\n peaks: number;\n /**\n * Randam noise algorythm\n * @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/random}\n */\n randomAlgorithm: INorm;\n /** Decay */\n decay: number;\n /** Delay until impulse response is generated */\n delay: number;\n /** Filter frequency applied to impulse response[Hz] */\n filterFreq: number;\n /** Filter quality for impulse response */\n filterQ: number;\n /** Filter type for impulse response */\n filterType: BiquadFilterType;\n /** Dry/Wet ratio */\n mix: number;\n /** Invert the impulse response */\n reverse?: boolean;\n /** Impulse response length */\n time: number;\n /** Prevents multiple effectors from being connected. */\n once: boolean;\n}\n\n/** Default Value */\nexport const defaults: OptionInterface = {\n noise: 'white',\n scale: 1,\n peaks: 2,\n randomAlgorithm: SYSTEM,\n decay: 2,\n delay: 0,\n reverse: false,\n time: 2,\n filterType: 'allpass',\n filterFreq: 2200,\n filterQ: 1,\n mix: 0.5,\n once: false,\n};\n","const preseed = (n, scale, rnd) => {\n const state = new Array(n);\n for (let i = 0; i < n; i++) {\n state[i] = rnd.norm(scale);\n }\n return state;\n};\nconst sum = (src) => src.reduce((sum2, x) => sum2 + x, 0);\nfunction* interleave(a, b) {\n const src = [a[Symbol.iterator](), b[Symbol.iterator]()];\n for (let i = 0; true; i ^= 1) {\n const next = src[i].next();\n if (next.done) return;\n yield next.value;\n }\n}\nexport {\n interleave,\n preseed,\n sum\n};\n","import { DEFAULT_OPTS } from \"./api.js\";\nimport { preseed, sum } from \"./utils.js\";\nfunction* blue(opts) {\n const { bins, scale, rnd } = { ...DEFAULT_OPTS, ...opts };\n const state = preseed(bins, scale, rnd);\n state.forEach((x, i) => state[i] = i & 1 ? x : -x);\n const invN = 1 / bins;\n let acc = sum(state);\n for (let i = 0, sign = -1; true; ++i >= bins && (i = 0)) {\n acc -= state[i];\n acc += state[i] = sign * rnd.norm(scale);\n sign ^= 4294967294;\n yield sign * acc * invN;\n }\n}\nexport {\n blue\n};\n","import { DEFAULT_OPTS } from \"./api.js\";\nimport { preseed, sum } from \"./utils.js\";\nfunction* red(opts) {\n const { bins, scale, rnd } = { ...DEFAULT_OPTS, ...opts };\n const state = preseed(bins, scale, rnd);\n const invN = 1 / bins;\n let acc = sum(state);\n for (let i = 0; true; ++i >= bins && (i = 0)) {\n acc -= state[i];\n acc += state[i] = rnd.norm(scale);\n yield acc * invN;\n }\n}\nexport {\n red\n};\n","const popCount = (x) => (x = x - (x >>> 1 & 1431655765), x = (x & 858993459) + (x >>> 2 & 858993459), (x + (x >>> 4) & 252645135) * 16843009 >>> 24);\nconst popCountArray = (data, start = 0, n = data.length) => {\n let num = 0;\n for (let end = start + n; start < end; start++) {\n const x = data[start];\n x > 0 && (num += popCount(x));\n }\n return num;\n};\nconst hammingDist = (x, y) => popCount(x ^ y);\nconst clz32 = (x) => x !== 0 ? 31 - (Math.log(x >>> 0) / Math.LN2 | 0) : 32;\nconst ctz32 = (x) => {\n let c = 32;\n x &= -x;\n x && c--;\n x & 65535 && (c -= 16);\n x & 16711935 && (c -= 8);\n x & 252645135 && (c -= 4);\n x & 858993459 && (c -= 2);\n x & 1431655765 && (c -= 1);\n return c;\n};\nconst bitSize = (x) => x > 1 ? Math.ceil(Math.log2(x)) : 0;\nexport {\n bitSize,\n clz32,\n ctz32,\n hammingDist,\n popCount,\n popCountArray\n};\n","import {\n blue,\n type ColoredNoiseOpts,\n green,\n pink,\n red,\n violet,\n white,\n} from '@thi.ng/colored-noise';\n\n/** Noise Type */\nexport type NoiseType =\n | 'blue'\n | 'brown'\n | 'green'\n | 'pink'\n | 'red'\n | 'violet'\n | 'white';\n\nexport const NoiseType: Record<\n NoiseType,\n (opts?: Partial<ColoredNoiseOpts>) => Generator<number, void, unknown>\n> = {\n blue,\n brown: red,\n green,\n pink,\n red,\n violet,\n white,\n};\n","import { blue } from \"./blue.js\";\nimport { interleave } from \"./utils.js\";\nconst green = (opts) => interleave(blue(opts), blue(opts));\nexport {\n green\n};\n","import { ctz32 } from \"@thi.ng/binary/count\";\nimport { DEFAULT_OPTS } from \"./api.js\";\nimport { preseed, sum } from \"./utils.js\";\nfunction* pink(opts) {\n const { bins = 8, scale, rnd } = { ...DEFAULT_OPTS, ...opts };\n const state = preseed(bins, scale, rnd);\n const invN = 1 / bins;\n let acc = sum(state);\n for (let i = 0; true; i = i + 1 >>> 0) {\n const id = ctz32(i) % bins;\n acc -= state[id];\n acc += state[id] = rnd.norm(scale);\n yield acc * invN;\n }\n}\nexport {\n pink\n};\n","import { red } from \"./red.js\";\nimport { interleave } from \"./utils.js\";\nconst violet = (opts) => interleave(red(opts), red(opts));\nexport {\n violet\n};\n","/// <reference path=\"./env.d.ts\" />\nimport { type ColoredNoiseOpts, white } from '@thi.ng/colored-noise';\nimport type { INorm } from '@thi.ng/random';\nimport { take } from '@thi.ng/transducers';\nimport { defaults, type OptionInterface } from '@/interfaces/OptionInterface';\nimport Meta from '@/Meta';\nimport { type NoiseType, NoiseType as NoiseTypeMap } from '@/NoiseType';\n\n/**\n * Reverb effect class\n */\nexport default class Reverb {\n /** Version strings */\n static readonly version: string = Meta.version;\n /** Build date */\n static readonly build: string = Meta.date;\n /** AudioContext */\n private readonly ctx: AudioContext;\n /** Wet Level (Reverberated node) */\n private readonly wetGainNode: GainNode;\n /** Dry Level (Original sound node) */\n private readonly dryGainNode: GainNode;\n /** Impulse response filter */\n private readonly filterNode: BiquadFilterNode;\n /** Convolution node for applying impulse response */\n private readonly convolverNode: ConvolverNode;\n /** Output gain node */\n private readonly outputNode: GainNode;\n /** Option */\n private readonly options: OptionInterface;\n /** Connected flag */\n private isConnected: boolean;\n /** Noise Generator */\n private noise: (\n _opts?: Partial<ColoredNoiseOpts>,\n ) => Generator<number, void, unknown> = white;\n /**\n * Map of noise types to their respective generator functions.\n */\n private readonly noiseMap: Record<\n NoiseType,\n (opts?: Partial<ColoredNoiseOpts>) => Generator<number, void, unknown>\n > = NoiseTypeMap;\n\n /**\n * Constructor\n *\n * @param ctx - Root AudioContext\n * @param options - Configure\n */\n constructor(ctx: AudioContext, options: Partial<OptionInterface> = {}) {\n // Store the master AudioContext.\n this.ctx = ctx;\n // Keep shared defaults immutable across instances/tests.\n this.options = Object.assign({}, defaults, options);\n // Initialize audio nodes.\n this.wetGainNode = this.ctx.createGain();\n this.dryGainNode = this.ctx.createGain();\n this.filterNode = this.ctx.createBiquadFilter();\n this.convolverNode = this.ctx.createConvolver();\n this.outputNode = this.ctx.createGain();\n // Reset connected flag.\n this.isConnected = false;\n this.filterType(this.options.filterType);\n this.setNoise(this.options.noise);\n // Generate the impulse response.\n this.buildImpulse();\n // Set the initial dry/wet ratio.\n this.mix(this.options.mix);\n }\n\n /**\n * Connect the node for the reverb effect to the original sound node.\n *\n * @param sourceNode - Input source node\n */\n public connect(sourceNode: AudioNode): AudioNode {\n if (this.isConnected && this.options.once) {\n // Already connected: reset flag and return the output node as-is.\n this.isConnected = false;\n return this.outputNode;\n }\n // Connect convolver to filter node.\n this.convolverNode.connect(this.filterNode);\n // Connect filter node to wet gain.\n this.filterNode.connect(this.wetGainNode);\n // Connect source to convolver (wet path).\n sourceNode.connect(this.convolverNode);\n // Connect source to dry gain.\n sourceNode.connect(this.dryGainNode);\n // Connect source directly to wet gain.\n sourceNode.connect(this.wetGainNode);\n // Connect dry gain to output.\n this.dryGainNode.connect(this.outputNode);\n // Connect wet gain to output.\n this.wetGainNode.connect(this.outputNode);\n // Mark as connected.\n this.isConnected = true;\n\n return this.outputNode;\n }\n\n /**\n * Disconnect the reverb node\n *\n * @param sourceNode - Input source node\n */\n public disconnect(sourceNode?: AudioNode): AudioNode | undefined {\n // Nodes are not connected in the initial state; skip disconnect to avoid errors.\n if (this.isConnected) {\n // Disconnect convolver from filter node.\n this.convolverNode.disconnect(this.filterNode);\n // Disconnect filter node from wet gain.\n this.filterNode.disconnect(this.wetGainNode);\n }\n // Clear connected flag.\n this.isConnected = false;\n\n // Return the source node to mirror common Web Audio API patterns.\n return sourceNode;\n }\n\n /**\n * Dry/Wet ratio\n *\n * @param mix - Ratio (0~1)\n */\n public mix(mix: number): void {\n if (!Reverb.inRange(mix, 0, 1)) {\n throw new RangeError('[Reverb.js] Dry/Wet ratio must be between 0 to 1.');\n }\n this.options.mix = mix;\n this.dryGainNode.gain.value = 1 - mix;\n this.wetGainNode.gain.value = mix;\n console.debug(`[Reverb.js] Set dry/wet ratio to ${mix * 100}%`);\n }\n\n /**\n * Set Impulse Response time length (second)\n *\n * @param value - IR length\n */\n public time(value: number): void {\n if (!Reverb.inRange(value, 1, 50)) {\n throw new RangeError(\n '[Reverb.js] Time length of impulse response must be less than 50sec.',\n );\n }\n this.options.time = value;\n this.buildImpulse();\n console.debug(\n `[Reverb.js] Set impulse response time length to ${value}sec.`,\n );\n }\n\n /**\n * Impulse response decay rate.\n *\n * @param value - Decay value\n */\n public decay(value: number): void {\n if (!Reverb.inRange(value, 0, 100)) {\n throw new RangeError(\n '[Reverb.js] Impulse Response decay level must be less than 100.',\n );\n }\n this.options.decay = value;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set impulse response decay level to ${value}.`);\n }\n\n /**\n * Delay before reverberation starts\n *\n * @param value - Time[ms]\n */\n public delay(value: number): void {\n if (!Reverb.inRange(value, 0, 100)) {\n throw new RangeError(\n '[Reverb.js] Impulse Response delay time must be less than 100.',\n );\n }\n this.options.delay = value;\n this.buildImpulse();\n console.debug(\n `[Reverb.js] Set impulse response delay time to ${value}sec.`,\n );\n }\n\n /**\n * Reverse the impulse response.\n *\n * @param reverse - Reverse IR\n */\n public reverse(reverse: boolean): void {\n this.options.reverse = reverse;\n this.buildImpulse();\n console.debug(\n `[Reverb.js] Inpulse response is ${reverse ? '' : 'not '}reversed.`,\n );\n }\n\n /**\n * Filter for impulse response\n *\n * @param type - Filiter Type\n */\n public filterType(type: BiquadFilterType = 'allpass'): void {\n this.filterNode.type = this.options.filterType = type;\n console.debug(`[Reverb.js] Set filter type to ${type}`);\n }\n\n /**\n * Filter frequency applied to impulse response\n *\n * @param freq - Frequency\n */\n public filterFreq(freq: number): void {\n if (!Reverb.inRange(freq, 20, 20000)) {\n throw new RangeError(\n '[Reverb.js] Filter frequrncy must be between 20 and 20000.',\n );\n }\n this.options.filterFreq = freq;\n this.filterNode.frequency.value = this.options.filterFreq;\n console.debug(`[Reverb.js] Set filter frequency to ${freq}Hz.`);\n }\n\n /**\n * Filter quality.\n *\n * @param q - Quality\n */\n public filterQ(q: number): void {\n if (!Reverb.inRange(q, 0, 10)) {\n throw new RangeError(\n '[Reverb.js] Filter Q value must be between 0 and 10.',\n );\n }\n this.options.filterQ = q;\n this.filterNode.Q.value = this.options.filterQ;\n console.debug(`[Reverb.js] Set filter Q to ${q}.`);\n }\n\n /**\n * set IR source noise peaks\n *\n * @param p - Peaks\n */\n public peaks(p: number): void {\n this.options.peaks = p;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR source noise peaks to ${p}.`);\n }\n\n /**\n * set IR source noise scale.\n *\n * @param s - Scale\n */\n public scale(s: number): void {\n this.options.scale = s;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR source noise scale to ${s}.`);\n }\n\n /**\n * Noise source\n *\n * @param duration - length of IR.\n */\n private getNoise(duration: number): number[] {\n return [\n ...take<number>(\n duration,\n this.noise({\n bins: this.options.peaks,\n scale: this.options.scale,\n rnd: this.options.randomAlgorithm,\n }),\n ),\n ];\n }\n\n /**\n * Inpulse Response Noise algorithm.\n *\n * @param type - IR noise algorithm type.\n */\n public setNoise(type: NoiseType): void {\n this.options.noise = type;\n switch (type) {\n case 'blue':\n this.noise = this.noiseMap.blue;\n break;\n case 'brown':\n this.noise = this.noiseMap.brown;\n break;\n case 'green':\n this.noise = this.noiseMap.green;\n break;\n case 'pink':\n this.noise = this.noiseMap.pink;\n break;\n case 'red':\n this.noise = this.noiseMap.red;\n break;\n case 'violet':\n this.noise = this.noiseMap.violet;\n break;\n case 'white':\n this.noise = this.noiseMap.white;\n break;\n default:\n this.noise = white;\n break;\n }\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR generator source noise type to ${type}.`);\n }\n\n /**\n * Set the random number algorithm used for noise generation.\n *\n * @param algorithm - Random algorithm implementing {@link INorm}\n */\n public setRandomAlgorithm(algorithm: INorm): void {\n this.options.randomAlgorithm = algorithm;\n this.buildImpulse();\n console.debug(`[Reverb.js] Set IR source noise generator.`);\n }\n\n /**\n * Return true if in range, otherwise false\n *\n * @param x - Target value\n * @param min - Minimum value\n * @param max - Maximum value\n */\n private static inRange(x: number, min: number, max: number): boolean {\n return x >= min && x <= max;\n }\n\n /** Builds the impulse response buffer from the current options. */\n private buildImpulse(): void {\n /** Sample rate of the AudioContext. */\n const rate: number = this.ctx.sampleRate;\n /** Total IR length in samples. */\n const duration: number = Math.max(rate * this.options.time, 1);\n /** Delay before IR onset, in samples. */\n const delayDuration: number = rate * this.options.delay;\n /** IR audio buffer (stereo). */\n const impulse: AudioBuffer = this.ctx.createBuffer(2, duration, rate);\n /** Left channel sample array. */\n const impulseL: Float32Array = new Float32Array(duration);\n /** Right channel sample array. */\n const impulseR: Float32Array = new Float32Array(duration);\n /** Temporary single-sample buffers used with Float32Array.set(). */\n const sampleL = new Float32Array(1);\n const sampleR = new Float32Array(1);\n /** Noise source for left channel. */\n const noiseL: number[] = this.getNoise(duration);\n /** Noise source for right channel. */\n const noiseR: number[] = this.getNoise(duration);\n\n for (let i = 0; i < duration; i++) {\n /** Decay position index (accounts for reverse and delay). */\n let n: number;\n\n if (i < delayDuration) {\n // Zero out samples within the delay period.\n sampleL[0] = 0;\n sampleR[0] = 0;\n impulseL.set(sampleL, i);\n impulseR.set(sampleR, i);\n n =\n (this.options.reverse ?? false)\n ? duration - (i - delayDuration)\n : i - delayDuration;\n } else {\n n = (this.options.reverse ?? false) ? duration - i : i;\n }\n // Apply exponential decay to the noise source over time.\n sampleL[0] =\n (noiseL.at(i) ?? 0) * (1 - n / duration) ** this.options.decay;\n sampleR[0] =\n (noiseR.at(i) ?? 0) * (1 - n / duration) ** this.options.decay;\n impulseL.set(sampleL, i);\n impulseR.set(sampleR, i);\n }\n\n // Write the generated wave table into the IR buffer.\n impulse.getChannelData(0).set(impulseL);\n impulse.getChannelData(1).set(impulseR);\n\n this.convolverNode.buffer = impulse;\n }\n}\n","import { isIterable } from \"@thi.ng/checks/is-iterable\";\nimport { compR } from \"./compr.js\";\nimport { iterator } from \"./iterator.js\";\nimport { ensureReduced, reduced } from \"./reduced.js\";\nfunction take(n, src) {\n return isIterable(src) ? iterator(take(n), src) : (rfn) => {\n const r = rfn[2];\n let m = n;\n return compR(\n rfn,\n (acc, x) => --m > 0 ? r(acc, x) : m === 0 ? ensureReduced(r(acc, x)) : reduced(acc)\n );\n };\n}\nexport {\n take\n};\n","const isIterable = (x) => typeof x?.[Symbol.iterator] === \"function\";\nexport {\n isIterable\n};\n","import { NO_OP, SEMAPHORE } from \"@thi.ng/api/api\";\nimport { isIterable } from \"@thi.ng/checks/is-iterable\";\nimport { ensureTransducer } from \"./ensure.js\";\nimport { push } from \"./push.js\";\nimport { isReduced, unreduced } from \"./reduced.js\";\nfunction* iterator(xform, src) {\n const rfn = ensureTransducer(xform)(push());\n const complete = rfn[1];\n const reduce = rfn[2];\n for (const x of src) {\n const y = reduce([], x);\n if (isReduced(y)) {\n yield* unreduced(complete(y.deref()));\n return;\n }\n if (y.length) {\n yield* y;\n }\n }\n yield* unreduced(complete([]));\n}\nfunction* iterator1(xform, src) {\n const reduce = ensureTransducer(xform)([NO_OP, NO_OP, (_, x) => x])[2];\n for (const x of src) {\n let y = reduce(SEMAPHORE, x);\n if (isReduced(y)) {\n y = unreduced(y.deref());\n if (y !== SEMAPHORE) {\n yield y;\n }\n return;\n }\n if (y !== SEMAPHORE) {\n yield y;\n }\n }\n}\nconst __iter = (xform, args, impl = iterator1) => {\n const n = args.length - 1;\n return isIterable(args[n]) ? args.length > 1 ? impl(xform.apply(null, args.slice(0, n)), args[n]) : impl(xform(), args[0]) : void 0;\n};\nexport {\n __iter,\n iterator,\n iterator1\n};\n","import { implementsFunction } from \"@thi.ng/checks/implements-function\";\nconst ensureTransducer = (x) => implementsFunction(x, \"xform\") ? x.xform() : x;\nexport {\n ensureTransducer\n};\n","const implementsFunction = (x, fn) => typeof x?.[fn] === \"function\";\nexport {\n implementsFunction\n};\n","import { identity } from \"@thi.ng/api/fn\";\nimport { implementsFunction } from \"@thi.ng/checks/implements-function\";\nimport { isArrayLike } from \"@thi.ng/checks/is-arraylike\";\nimport { isIterable } from \"@thi.ng/checks/is-iterable\";\nimport { illegalArity } from \"@thi.ng/errors/illegal-arity\";\nimport { isReduced, unreduced } from \"./reduced.js\";\nconst __parseArgs = (args) => args.length === 2 ? [void 0, args[1]] : args.length === 3 ? [args[1], args[2]] : illegalArity(args.length);\nfunction reduce(...args) {\n const rfn = args[0];\n const init = rfn[0];\n const complete = rfn[1];\n const reduce2 = rfn[2];\n args = __parseArgs(args);\n const acc = args[0] == null ? init() : args[0];\n const src = args[1];\n return unreduced(\n complete(\n implementsFunction(src, \"$reduce\") ? src.$reduce(reduce2, acc) : isArrayLike(src) ? __reduceArray(reduce2, acc, src) : __reduceIterable(reduce2, acc, src)\n )\n );\n}\nfunction reduceRight(...args) {\n const [init, complete, reduce2] = args[0];\n args = __parseArgs(args);\n let acc = args[0] == null ? init() : args[0];\n const src = args[1];\n for (let i = src.length; i-- > 0; ) {\n acc = reduce2(acc, src[i]);\n if (isReduced(acc)) {\n acc = acc.deref();\n break;\n }\n }\n return unreduced(complete(acc));\n}\nconst __reduceArray = (rfn, acc, src) => {\n for (let i = 0, n = src.length; i < n; i++) {\n acc = rfn(acc, src[i]);\n if (isReduced(acc)) {\n acc = acc.deref();\n break;\n }\n }\n return acc;\n};\nconst __reduceIterable = (rfn, acc, src) => {\n for (const x of src) {\n acc = rfn(acc, x);\n if (isReduced(acc)) {\n acc = acc.deref();\n break;\n }\n }\n return acc;\n};\nconst reducer = (init, rfn) => [init, identity, rfn];\nconst $$reduce = (rfn, args) => {\n const n = args.length - 1;\n return isIterable(args[n]) ? args.length > 1 ? reduce(rfn.apply(null, args.slice(0, n)), args[n]) : reduce(rfn(), args[0]) : void 0;\n};\nexport {\n $$reduce,\n reduce,\n reduceRight,\n reducer\n};\n","import { reducer } from \"./reduce.js\";\nfunction push(src) {\n return src ? [...src] : reducer(\n () => [],\n (acc, x) => (acc.push(x), acc)\n );\n}\nexport {\n push\n};\n","const compR = (rfn, fn) => [rfn[0], rfn[1], fn];\nexport {\n compR\n};\n","import type MetaInterface from '@/interfaces/MetaInterface';\n\nconst meta: MetaInterface = {\n version: __APP_VERSION__,\n date: __BUILD_DATE__,\n};\nexport default meta;\n"],"names":["Object","e","Symbol","Math","defaults","SYSTEM","s","Array","b","NoiseType","blue","red","green","pink","violet","white","Reverb","sourceNode","mix","RangeError","console","value","reverse","type","freq","q","p","duration","take","algorithm","x","min","max","rate","delayDuration","impulse","impulseL","Float32Array","impulseR","sampleL","sampleR","noiseL","noiseR","i","n","ctx","options","NoiseTypeMap","__APP_VERSION__","__BUILD_DATE__"],"mappings":";;;;;;;;;;;uOAAA,GAAoB,CAAC,CAAG,CAAC,EAAS,EAAS,KAC1C,IAAI,EAAS,CAAC,EAAM,KACnB,IAAI,IAAI,KAAO,EACX,EAAoB,CAAC,CAAC,EAAM,IAAQ,CAAC,EAAoB,CAAC,CAAC,EAAS,IACtEA,OAAO,cAAc,CAAC,EAAS,EAAK,CAAE,WAAY,GAAM,CAAC,EAAK,CAAE,CAAI,CAAC,EAAI,AAAC,EAG7E,EACA,EAAO,EAAS,OAChB,EAAO,EAAQ,QAChB,ECVA,EAAoB,CAAC,CAAG,CAAC,EAAK,IAAUA,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClF,EAAoB,CA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EA,OAAiB,aAAjB,QAEA,OAAiB,UAAjB,QAEA,OAAQ,cAAR,QAEA,OAAQ,QAEgC/B,GAIxC,OAAiB,WAGbgC,GAUF,IAAI,CAAC,GAAG,CAAGF,EAEX,IAAI,CAAC,OAAO,CAAG7C,OAAO,MAAM,CAAC,CAAC,EAAGI,EAAU0C,GAE3C,IAAI,CAAC,WAAW,CAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GACtC,IAAI,CAAC,WAAW,CAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GACtC,IAAI,CAAC,UAAU,CAAG,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAC7C,IAAI,CAAC,aAAa,CAAG,IAAI,CAAC,GAAG,CAAC,eAAe,GAC7C,IAAI,CAAC,UAAU,CAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GAErC,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAEhC,IAAI,CAAC,YAAY,GAEjB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAC3B,CAwUF,QAhYE,EAFmB9B,EAEH,USVPgC,STYT,EAJmBhC,EAIH,QSXViC"}
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.5.1",
4
+ "version": "1.6.0",
5
5
  "description": "JavaScript Reverb effect class",
6
6
  "keywords": [
7
7
  "webaudio",
@@ -29,95 +29,65 @@
29
29
  ],
30
30
  "main": "dist/Reverb.umd.js",
31
31
  "module": "dist/Reverb.es.js",
32
- "browser": "dist/Reverb.iife.js",
32
+ "browser": "dist/Reverb.umd.js",
33
33
  "types": "dist/Reverb.d.ts",
34
34
  "exports": {
35
35
  ".": {
36
36
  "import": "./dist/Reverb.es.js",
37
37
  "types": "./dist/Reverb.d.ts",
38
- "require": "./dist/Reverb.cjs.js",
38
+ "require": "./dist/Reverb.umd.js",
39
39
  "default": "./dist/Reverb.es.js"
40
40
  },
41
41
  "./umd": {
42
42
  "default": "./dist/Reverb.umd.js"
43
43
  },
44
- "./iife": {
45
- "default": "./dist/Reverb.iife.js"
46
- },
47
44
  "./package.json": "./package.json"
48
45
  },
49
46
  "engines": {
50
47
  "node": ">=24.13.0"
51
48
  },
52
- "packageManager": "pnpm@11.1.2",
49
+ "packageManager": "pnpm@11.9.0",
53
50
  "sideEffects": false,
54
51
  "scripts": {
55
- "dev": "vite",
56
- "clean": "rimraf node_modules/.vite",
57
- "type-check": "tsc --noEmit --composite false",
58
- "build": "run-p type-check build-only",
59
- "build:docs": "vite build --mode=docs",
60
- "build:analyze": "vite build --mode=analyze",
61
- "build:clean": "rimraf dist",
62
- "build-only": "vite build",
52
+ "dev": "rslib --watch",
53
+ "dev:docs": "rsbuild",
54
+ "preview": "rsbuild preview",
63
55
  "lint": "run-s lint:*",
64
- "lint:oxlint": "oxlint . --fix",
65
- "lint:eslint": "eslint . --fix --cache --cache-location ./node_modules/.vite/eslint-cache",
66
- "lint:prettier": "prettier \"./**/*.{js,ts,json,css,sass,scss,htm,html,vue,md}\" -w -u",
67
- "preview": "vite preview --mode=docs",
68
- "prepare": "husky",
69
- "test": "vitest",
70
- "test:run": "vitest run",
71
- "test:coverage": "vitest run --coverage",
72
- "version": "auto-changelog -p && git add CHANGELOG.md"
56
+ "lint:check": "biome check --write",
57
+ "lint:rslint": "rslint .",
58
+ "lint:format": "prettier --write .",
59
+ "build": "run-s build:lib build:dts",
60
+ "build:lib": "rslib build",
61
+ "build:dts": "dts-bundle-generator --project ./tsconfig.app.json --no-banner -o dist/Reverb.d.ts src/index.ts",
62
+ "test": "rstest",
63
+ "test:watch": "rstest --watch",
64
+ "version": "auto-changelog -p && git add CHANGELOG.md",
65
+ "prepare": "husky install"
73
66
  },
74
67
  "peerDependencies": {
75
68
  "@thi.ng/colored-noise": "^1",
76
69
  "@thi.ng/random": "^4",
77
- "@thi.ng/transducers": "^9"
70
+ "@thi.ng/transducers": "^9.6.0"
78
71
  },
79
72
  "devDependencies": {
80
- "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
81
- "@eslint/js": "^10.0.1",
82
- "@eslint/markdown": "^8.0.1",
73
+ "@biomejs/biome": "2.5.1",
74
+ "@rsbuild/core": "^2.1.1",
75
+ "@rslib/core": "^0.23.1",
76
+ "@rslint/core": "^0.6.3",
77
+ "@rstest/adapter-rslib": "^0.10.6",
78
+ "@rstest/core": "^0.10.6",
83
79
  "@tsconfig/node-lts": "^24.0.0",
84
- "@types/node": "^25.8.0",
85
- "@typescript-eslint/eslint-plugin": "^8.59.3",
86
- "@vitest/coverage-v8": "^4.1.6",
87
- "@vitest/eslint-plugin": "^1.6.17",
88
- "bootstrap": "^5.3.8",
89
- "eslint": "^10.4.0",
90
- "eslint-config-prettier": "^10.1.8",
91
- "eslint-import-resolver-custom-alias": "^1.3.2",
92
- "eslint-import-resolver-typescript": "^4.4.4",
93
- "eslint-plugin-import-x": "^4.16.2",
94
- "eslint-plugin-oxlint": "^1.65.0",
95
- "eslint-plugin-security": "^4.0.0",
96
- "globals": "^17.6.0",
97
- "happy-dom": "^20.9.0",
80
+ "@types/node": "^26.0.1",
81
+ "@types/three": "^0.185.0",
82
+ "dts-bundle-generator": "^9.5.1",
98
83
  "husky": "^9.1.7",
99
- "jiti": "^2.7.0",
100
- "lint-staged": "^17.0.5",
101
- "npm-run-all2": "^8.0.4",
102
- "oxlint": "^1.65.0",
103
- "prettier": "^3.8.3",
104
- "rimraf": "^6.1.3",
105
- "rollup-plugin-visualizer": "^7.0.1",
106
- "typescript": "^6.0.3",
107
- "typescript-eslint": "^8.59.3",
108
- "vite": "^8.0.13",
109
- "vite-plugin-banner": "^0.8.1",
110
- "vite-plugin-checker": "^0.13.0",
111
- "vite-plugin-dts": "^5.0.0",
112
- "vitest": "^4.1.6"
113
- },
114
- "husky": {
115
- "hooks": {
116
- "pre-commit": "lint-staged"
117
- }
84
+ "lint-staged": "^17.0.8",
85
+ "npm-run-all2": "^9.0.2",
86
+ "prettier": "^3.8.5",
87
+ "three": "^0.185.0",
88
+ "typescript": "^6.0.3"
118
89
  },
119
90
  "lint-staged": {
120
- "*.{js,ts,json,htm,html}": "eslint --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint",
121
- "*": "prettier -w -u"
91
+ "*": "pnpm lint:format"
122
92
  }
123
93
  }
package/dist/Meta.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { default as MetaInterface } from './interfaces/MetaInterface';
2
- declare const meta: MetaInterface;
3
- export default meta;
@@ -1,4 +0,0 @@
1
- import { ColoredNoiseOpts } from '@thi.ng/colored-noise';
2
- /** Noise Type */
3
- export type NoiseType = 'blue' | 'brown' | 'green' | 'pink' | 'red' | 'violet' | 'white';
4
- export declare const NoiseType: Record<NoiseType, (opts?: Partial<ColoredNoiseOpts>) => Generator<number, void, unknown>>;
package/dist/demo.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/demo.flac DELETED
Binary file
@@ -1,7 +0,0 @@
1
- /** Meta Information Interface */
2
- export default interface MetaInterface {
3
- /** Version */
4
- version: string;
5
- /** Build Date */
6
- date: string;
7
- }
@@ -1,39 +0,0 @@
1
- import { NoiseType } from './NoiseType';
2
- import { INorm } from '@thi.ng/random';
3
- /** Reverb Option */
4
- export default interface OptionInterface {
5
- /**
6
- * IR (Inpulse Response) colord noise algorithm (BLUE, GREEN, PINK, RED, VIOLET, WHITE)
7
- * @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/colored-noise}
8
- */
9
- noise: NoiseType;
10
- /** IR source noise scale */
11
- scale: number;
12
- /** Number of IR source noise peaks */
13
- peaks: number;
14
- /**
15
- * Randam noise algorythm
16
- * @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/random}
17
- */
18
- randomAlgorithm: INorm;
19
- /** Decay */
20
- decay: number;
21
- /** Delay until impulse response is generated */
22
- delay: number;
23
- /** Filter frequency applied to impulse response[Hz] */
24
- filterFreq: number;
25
- /** Filter quality for impulse response */
26
- filterQ: number;
27
- /** Filter type for impulse response */
28
- filterType: BiquadFilterType;
29
- /** Dry/Wet ratio */
30
- mix: number;
31
- /** Invert the impulse response */
32
- reverse?: boolean;
33
- /** Impulse response length */
34
- time: number;
35
- /** Prevents multiple effectors from being connected. */
36
- once: boolean;
37
- }
38
- /** Default Value */
39
- export declare const defaults: OptionInterface;