Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
context: AudioContext,
model: string,
protected defaults: Active
) {
super(context, model);
this.preHPFilter = new BiquadFilterNode(context, {
type: 'highpass',
Q: Math.SQRT1_2,
frequency: 20
});
this.analyserNode = new AnalyserNode(context, {
fftSize: 4096
});
this.processor = [this.preHPFilter, this.analyserNode];
connectNodes(this.processor);
this.applyDefaults();
this.worker = new Worker('./tuner.worker', { type: 'module' });
this.worker.onmessage = ({ data }: TunerResponseMessage) => {
if (this.isBypassEnabled) {
return;
}
this.noteSub$.next(data.note);
};