@soundtouchjs/interpolation-strategy-hann
v2.0.3
Published
Hann interpolation strategy for SoundTouchJS and audio-worklet.
Maintainers
Readme
@soundtouchjs/interpolation-strategy-hann
Hann interpolation strategy plugin for SoundTouchJS.
I accept cash if you like what's been done.
Part of the SoundTouchJS monorepo — for more information and so much more.
Usage
import { registerInterpolationStrategy, SoundTouch } from '@soundtouchjs/core';
import { registerHannStrategy } from '@soundtouchjs/interpolation-strategy-hann';
registerHannStrategy({ registerInterpolationStrategy });
const st = new SoundTouch({
interpolationStrategy: 'hann',
});
st.setInterpolationStrategyParams({ zeroCrossings: 6 });Profile
Good general-purpose quality with moderate roll-off.
Params
zeroCrossings(default4, normalized to2..8)normalize(defaultfalse) — when true, kernel weights are normalized to sum to 1windowPower(default1) — exponent applied to the Hann window shape; values above 1 sharpen the window
Related docs
- Core interpolation registration API: https://cutterscrossing.com/SoundTouchJS/?path=/docs/interpolation-strategies-strategy-plugin-authoring--docs
- Core interpolation strategy overview: https://cutterscrossing.com/SoundTouchJS/?path=/docs/interpolation-strategies--docs
Exports
hannKernel: Interpolation kernel implementation.hannStrategy: Strategy descriptor with idhann.registerHannStrategy: Helper that registershannStrategyinto a compatible registry.hannStrategy.defaultParams: Runtime defaults for strategy params.
License
MPL-2.0 — see LICENSE for details.
