{"_id":"@audio/measure-ir","_rev":"2-32e93b30326d8b90c0dc20ae1590ebc0","name":"@audio/measure-ir","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@audio/measure-ir","version":"1.0.0","keywords":["audio","dsp","measurement","ir"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/measure-ir@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"dist":{"shasum":"6eb6dc9d8c9c6a2d46470dab6bb83ffb630083da","tarball":"https://registry.npmjs.org/@audio/measure-ir/-/measure-ir-1.0.0.tgz","fileCount":2,"integrity":"sha512-aj7l8xcm945a8VNEiBdVgsniP7Aqnl+bmRbikic9Qpe3EjeL2XJqEIL2VjPc8svyViIQhmfcQwFizGd4cTcAMA==","signatures":[{"sig":"MEUCIQCEzQ8VUOfvJ8nvejYHoreOpz0e7NyZg5shRkXoErPiDQIgUO918l6PBLXIphN2hj/4XB+Db2lmtQmVZK2qDpZ4fe4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3263},"main":"ir.js","type":"module","engines":{"node":">=18"},"exports":{".":"./ir.js","./package.json":"./package.json"},"gitHead":"daf713bfbd560c7730c8492bb420abffdbfebcf8","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"_npmVersion":"11.12.1","description":"Impulse-response capture — exponential sine sweep deconvolution (Farina 2000), self-calibrated","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"fourier-transform":"^2.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/measure-ir_1.0.0_1783540371745_0.5867824438178473","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/measure-ir","version":"1.0.1","description":"Impulse-response capture — exponential sine sweep deconvolution (Farina 2000), self-calibrated","type":"module","sideEffects":false,"main":"ir.js","exports":{".":"./ir.js","./package.json":"./package.json"},"dependencies":{"fourier-transform":"^2.2.0"},"keywords":["audio","dsp","measurement","ir"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/audiojs/measure.git","directory":"packages/measure-ir"},"types":"index.d.ts","funding":"https://github.com/sponsors/audiojs","gitHead":"9dcc57aa1a8a1dc669478cc4c9b25f3d28d1dfc0","_id":"@audio/measure-ir@1.0.1","bugs":{"url":"https://github.com/audiojs/measure/issues"},"homepage":"https://github.com/audiojs/measure#readme","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-vdHiBzrB1/gozFFzKpkWtx4aCYBvmXSWAVzm4httRCQl2qulvOxv4S91ZWRQDZyIEAlG8SQ+EWYTF34IYa5rjw==","shasum":"b4f9a35639a357b478eca700659f62ec158bf6fd","tarball":"https://registry.npmjs.org/@audio/measure-ir/-/measure-ir-1.0.1.tgz","fileCount":4,"unpackedSize":6789,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCUMRRtmMC2DWJV8oxAgOS4URdA3AunKH4pfeBcg/8OjgIgMch4zDizT3Fc9yO60D2FkWdmbLHNel+LqdWRtCUu3L8="}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/measure-ir_1.0.1_1783731639652_0.9779870188268063"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:52:51.568Z","modified":"2026-07-11T01:00:39.940Z","1.0.0":"2026-07-08T19:52:51.872Z","1.0.1":"2026-07-11T01:00:39.785Z"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","keywords":["audio","dsp","measurement","ir"],"description":"Impulse-response capture — exponential sine sweep deconvolution (Farina 2000), self-calibrated","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/measure-ir [![npm](https://img.shields.io/npm/v/@audio/measure-ir)](https://www.npmjs.com/package/@audio/measure-ir) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nImpulse-response capture — exponential sine sweep deconvolution (Farina 2000), self-calibrated\n\n```\nnpm install @audio/measure-ir\n```\n\n```js\nimport ir from '@audio/measure-ir'\n```\n\nFarina exponential-sine-sweep (ESS) deconvolution: the inverse filter is the time-reversed sweep with `exp(−t/L)` amplitude compensation for the sweep's 1/f energy density. Convolving the recording with it collapses the sweep to an impulse at t=0; harmonic distortion products land at negative time and are trimmed away — the ESS advantage over linear sweeps or MLS. Self-deconvolution of the sweep against its own inverse filter calibrates the output so an identity system (recorded === sweep) yields δ = 1.0.\n\n> Farina, A. — *Simultaneous Measurement of Impulse Response and Distortion with a Swept-Sine Technique*, AES 108th Convention, 2000.\n\n```js\nlet h = ir(recorded, { sweep, f0: 20, f1: 20000, fs, length: 1000 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `sweep` | — | required — the exponential sine sweep that was played (`Float32Array`) |\n| `f0` | `20` | sweep start frequency, Hz |\n| `f1` | `fs/2 * 0.95` | sweep end frequency, Hz |\n| `fs` | `44100` | sample rate |\n| `length` | `recorded.length - sweep.length + 1` | samples of IR to return |\n\nReturns a `Float32Array`: the impulse response, direct path at index 0, calibrated to unit gain. Throws `RangeError` if `opts.sweep` is omitted.\n\nAlso exports `convFFT(a, b)` (zero-padded FFT convolution) and `inverseSweep(sweep, {f0, f1, fs})` — the building blocks `@audio/measure-align` and `@audio/measure-latency` reuse for their own cross-correlation.\n\n**Use when:** capturing the impulse response of a room, cabinet, or signal chain from a recorded exponential sweep — feeds `@audio/reverb-convolution` and `@audio/amp-cabinet`.\n\n---\n\nPart of [@audio/measure](https://github.com/audiojs/measure) — the measure family umbrella.\n\nMIT © [audiojs](https://github.com/audiojs)\n","readmeFilename":"README.md","homepage":"https://github.com/audiojs/measure#readme","repository":{"type":"git","url":"git+https://github.com/audiojs/measure.git","directory":"packages/measure-ir"},"bugs":{"url":"https://github.com/audiojs/measure/issues"}}