🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

audio-filter

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-filter - npm Package Compare versions

Comparing version
2.2.1
to
2.2.2
+9
-2
effect/highpass.js

@@ -9,5 +9,6 @@ /**

import { highpass as biquadHp } from 'digital-filter/iir/biquad.js'
import butterworth from 'digital-filter/iir/butterworth.js'
import filter from 'digital-filter/core/filter.js'
let butterworth
/**

@@ -22,3 +23,7 @@ * @param {Float32Array|Float64Array} data - Input (modified in-place)

if (!params.coefs || params._fc !== fc || params._order !== order || params._Q !== Q || params._fs !== fs) {
params.coefs = order <= 2 ? [biquadHp(fc, Q, fs)] : butterworth(order, fc, fs, 'highpass')
if (order <= 2) params.coefs = [biquadHp(fc, Q, fs)]
else {
if (!butterworth) throw new Error('Import digital-filter/iir/butterworth.js for order > 2')
params.coefs = butterworth(order, fc, fs, 'highpass')
}
params._fc = fc; params._order = order; params._Q = Q; params._fs = fs

@@ -29,1 +34,3 @@ }

}
highpass.useButterworth = (bw) => { butterworth = bw }

@@ -9,5 +9,6 @@ /**

import { lowpass as biquadLp } from 'digital-filter/iir/biquad.js'
import butterworth from 'digital-filter/iir/butterworth.js'
import filter from 'digital-filter/core/filter.js'
let butterworth
/**

@@ -22,3 +23,7 @@ * @param {Float32Array|Float64Array} data - Input (modified in-place)

if (!params.coefs || params._fc !== fc || params._order !== order || params._Q !== Q || params._fs !== fs) {
params.coefs = order <= 2 ? [biquadLp(fc, Q, fs)] : butterworth(order, fc, fs, 'lowpass')
if (order <= 2) params.coefs = [biquadLp(fc, Q, fs)]
else {
if (!butterworth) throw new Error('Import digital-filter/iir/butterworth.js for order > 2')
params.coefs = butterworth(order, fc, fs, 'lowpass')
}
params._fc = fc; params._order = order; params._Q = Q; params._fs = fs

@@ -29,1 +34,3 @@ }

}
lowpass.useButterworth = (bw) => { butterworth = bw }
+1
-1
{
"name": "audio-filter",
"version": "2.2.1",
"version": "2.2.2",
"type": "module",

@@ -5,0 +5,0 @@ "sideEffects": false,