Synthlet
Audio Modifiers
npm package

Clip Amplifier

An two-gain stage amplifier with clipping

import { ClipAmp, registerClipAmpWorklet, ClipType } from "synthlet"; // or "@synthlet/clip-amp";
 
const audioContext = new AudioContext();
registerClipAmpWorklet(audioContext);
 
const amp = ClipAmp(audioContext, {
  clipType: ClipType.Tanh,
  preGain: 3,
  postGain: 0.3,
});

Parameters

  • clipType: Clip type, currently only ClipType.Tanh, or ClipType.Bypass
  • preGain: Gain before clipping.
  • postGain: Gain after clipping.

On this page