Synthlet
Audio Modifiers
npm package

Virtual Analog Filter

A Voltage Controlled Filter (VCF) module

import { VirtualAnalogFilter, PolyblepOscillator, AdsrAmp } from "synthlet";
 
const osc = PolyblepOscillator(audioContext, {
  frequency: 440,
});
const filter = VirtualAnalogFilter(audioContext, {
  type: VirtualAnalogFilter.MOOG_LADDER,
  frequency: 2000,
});
const vca = AdsrAmp(audioContext);
osc.connect(filter).connect(vca).connect(audioContext.destination);
 
vca.trigger.value = 1;

Parameters

  • type: The filter type [0-8]. See below.
  • frequency: The filter base cutoff frequency in Hz.
  • detune: The filter frequency detune in semitones [-127,127]. Good for modulation.
  • resonance: The normalized filter resonance [0,1]. 1 means self oscillation.

Valid types are:

  • VirtualAnalogFilter.MOOG_LADDER
  • VirtualAnalogFilter.MOOG_HALF_LADDER
  • VirtualAnalogFilter.KORG35_LPF
  • VirtualAnalogFilter.KORG35_HPF
  • VirtualAnalogFilter.DIODE_LADDER
  • VirtualAnalogFilter.OBERHEIM_LPF
  • VirtualAnalogFilter.OBERHEIM_HPF
  • VirtualAnalogFilter.OBERHEIM_BPF
  • VirtualAnalogFilter.OBERHEIM_BSF

On this page