{"_id":"@audio/eq-fir","_rev":"3-ad6a02022bc4db2b2f15668a81c3168e","name":"@audio/eq-fir","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@audio/eq-fir","version":"1.0.0","keywords":["audio","dsp","eq","fir","linear-phase","firequalizer"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/eq-fir@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":"09afd2d35c1b4864a3eeb1d04f13f66bb36c37ab","tarball":"https://registry.npmjs.org/@audio/eq-fir/-/eq-fir-1.0.0.tgz","fileCount":2,"integrity":"sha512-IqEQ0PY7/0gilQoJmn8mSbK7skieB0YhtQURy69/wYovnOPBZAbP+DelnVxMfdRmcl0/v8NKS6XkZN30TaBYHQ==","signatures":[{"sig":"MEYCIQCuYyW7CRykEgwVdKpWt2kr1p4oH/fcCotWCL/yd8IMQAIhAI8dGNadtzxUamEcHro7iUt8NECeKuOxDtJYzC0NymK8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3023},"main":"fir.js","type":"module","engines":{"node":">=18"},"exports":{".":"./fir.js","./package.json":"./package.json"},"gitHead":"72c5a044b913e86d97a310d88639a9bbefc1d629","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"_npmVersion":"11.12.1","description":"FIR convolution EQ — linear-phase, arbitrary magnitude response (frequency-sampling design; firequalizer / match-EQ class)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eq-fir_1.0.0_1783540286762_0.5743860751806207","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/eq-fir","version":"1.0.1","keywords":["audio","dsp","eq","fir","linear-phase","firequalizer"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/eq-fir@1.0.1","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/eq#readme","bugs":{"url":"https://github.com/audiojs/eq/issues"},"dist":{"shasum":"443ef1b100935e4a316f0e0e5cafda66879c7bac","tarball":"https://registry.npmjs.org/@audio/eq-fir/-/eq-fir-1.0.1.tgz","fileCount":3,"integrity":"sha512-yhUTLRMcyhqwC5DlYg3ZwslfQXGNUxQFWsEZUUXsO0CTxGy1fAGXDf44cQ3ad7Tk7ZhrZEk64tiSGAb+V1bPLQ==","signatures":[{"sig":"MEYCIQCb5AAKVt+PIUFF7dRkJTkJECIv73dZoTly3DrKNPJXCwIhAIrB+lS1QMXs2oh/DTQeHIL2P2NlyPYY5XaY8z76VHz5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5459},"main":"fir.js","type":"module","types":"./fir.d.ts","engines":{"node":">=18"},"exports":{".":"./fir.js","./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"4422964cc7a979b84b9372069860aec52e776025","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/eq.git","type":"git","directory":"packages/eq-fir"},"_npmVersion":"11.12.1","description":"FIR convolution EQ — linear-phase, arbitrary magnitude response (frequency-sampling design; firequalizer / match-EQ class)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eq-fir_1.0.1_1783731555013_0.9370069544844968","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"_id":"@audio/eq-fir@1.0.2","bugs":{"url":"https://github.com/audiojs/eq/issues"},"dist":{"shasum":"62a7bb129fe26b14f99976b10e90dafef019fff0","tarball":"https://registry.npmjs.org/@audio/eq-fir/-/eq-fir-1.0.2.tgz","fileCount":4,"integrity":"sha512-SDXz/N7+2oaitwuCqybou2Udtht6THynRuSwAusn7bGa5hV4Q/8r5Nlubk+2YFXoG/WrDpfskXz1uDfkjWTbCg==","signatures":[{"sig":"MEUCIQDe9mPKlwN43UcelWWIPltRL7Su4rvy+cB+vqI/sVMqdAIgVlIdkjz3adBgG64G2tRaWmPN1KgEUpsisvXw1mL6XF8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCC19l+hBDBBJrr1xg9oWSLHJ/mFTOSR0HyNlMrnqUxvAIhAPe22hbC5jYaoEsEpHdioynK2DNrS12t4qE5Be4gj41I"}],"unpackedSize":9411},"main":"fir.js","name":"@audio/eq-fir","type":"module","types":"./fir.d.ts","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"exports":{".":{"types":"./fir.d.ts","default":"./fir.js"},"./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"74126a418f9fb0760b58b399f0d2344f425b3358","license":"MIT","version":"1.0.2","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"homepage":"https://github.com/audiojs/eq#readme","keywords":["audio","dsp","eq","fir","linear-phase","firequalizer"],"repository":{"url":"git+https://github.com/audiojs/eq.git","type":"git","directory":"packages/eq-fir"},"_npmVersion":"11.12.1","description":"FIR convolution EQ — linear-phase, arbitrary magnitude response (frequency-sampling design; firequalizer / match-EQ class)","directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"fourier-transform":"^2.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eq-fir_1.0.2_1790521375211_0.6525587159682864"}}},"time":{"created":"2026-07-08T19:51:26.202Z","modified":"2026-09-27T15:02:55.448Z","1.0.0":"2026-07-08T19:51:26.896Z","1.0.1":"2026-07-11T00:59:15.147Z","1.0.2":"2026-09-27T15:02:55.285Z"},"bugs":{"url":"https://github.com/audiojs/eq/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/eq#readme","keywords":["audio","dsp","eq","fir","linear-phase","firequalizer"],"repository":{"url":"git+https://github.com/audiojs/eq.git","type":"git","directory":"packages/eq-fir"},"description":"FIR convolution EQ — linear-phase, arbitrary magnitude response (frequency-sampling design; firequalizer / match-EQ class)","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/eq-fir [![npm](https://img.shields.io/npm/v/@audio/eq-fir)](https://www.npmjs.com/package/@audio/eq-fir) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nLinear-phase FIR EQ from an arbitrary magnitude response — firequalizer / match-EQ class\n\n```\nnpm install @audio/eq-fir\n```\n\n```js\nimport firEq, { design } from '@audio/eq-fir'\n```\n\nFFmpeg firequalizer's class of EQ: frequency-sampling design builds an odd-length, type-I symmetric FIR from a target dB curve (a list of `{f, gain}` points, linearly interpolated, or a `frequency => dB` function), Hann-windowed against Gibbs ripple. Whole-buffer, time-aligned apply — the group delay of `(taps-1)/2` samples is compensated internally, so the filtered output stays time-aligned with the input. This is the substrate for match-EQ tools like Matchering: hand it a captured target spectrum and it approximates that response with a finite, windowed FIR. Resolution and ripple depend on the tap count.\n\n```js\nfirEq(data, { response: [{ f: 100, gain: -3 }, { f: 1000, gain: 0 }, { f: 8000, gain: 4 }] })\n\n// or design once, reuse across buffers\nlet coefs = design(f => (f > 5000 ? 6 : 0), { taps: 1023, fs: 48000 })\nfirEq(bufA, { coefs })\nfirEq(bufB, { coefs })\n```\n\n| Param | Default | |\n|---|---|---|\n| `response` | — | `{f, gain}[]` dB points (linear interpolation, clamped outside) or `f => dB` function. Ignored if `coefs` given |\n| `coefs` | — | Precomputed `Float64Array` from `design()` — skips the design step |\n| `taps` | `511` | FIR length — forced odd (type-I symmetric) |\n| `fs` | `44100` | Sample rate, Hz |\n\nUnlike the biquad-based atoms in this family, `firEq` holds no state across calls — `taps`/`response` (or `coefs`) are used fresh every call, convolved directly against `data` with zero-padded edges. There's no streaming/chunked mode: call it with the whole buffer. Only typed arrays are accepted (`Float32Array`/`Float64Array`, via `TypedArray#set`) — plain `number[]` is not supported.\n\n**Use when:** approximating a captured target spectrum with a linear-phase filter, or any EQ curve too irregular for a handful of biquads — where phase linearity matters more than CPU cost.\n\n---\n\nPart of [@audio/eq](https://github.com/audiojs/eq) — the eq family umbrella.\n\nMIT © [audiojs](https://github.com/audiojs)\n","readmeFilename":"README.md"}