@soundtouchjs/interpolation-strategy-linear
v2.0.3
Published
Linear interpolation strategy for SoundTouchJS and audio-worklet.
Maintainers
Readme
@soundtouchjs/interpolation-strategy-linear
Linear 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 { registerLinearStrategy } from '@soundtouchjs/interpolation-strategy-linear';
registerLinearStrategy({ registerInterpolationStrategy });
const st = new SoundTouch({
interpolationStrategy: 'linear',
});
st.setInterpolationStrategyParams({ edgeHoldFrames: 3 });Params
edgeHoldFrames(default1, normalized to0..32) — frames held at edges to avoid clicksblend(default1, normalized to0..1) —1= pure linear interpolation;0= nearest-neighbor; values between blend the twonormalize(defaultfalse) — when true, kernel weights are normalized to sum to 1zeroCrossings— alias foredgeHoldFrames(accepted for cross-strategy API consistency)
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
linearKernel: Interpolation kernel implementation.linearStrategy: Strategy descriptor with idlinear.registerLinearStrategy: Helper that registerslinearStrategyinto a compatible registry.linearStrategy.defaultParams: Runtime defaults for strategy params.
License
MPL-2.0 — see LICENSE for details.
