Search guides and the APICtrl K
  1. API reference
  2. DSP

screamer.h

The Tube Screamer's clipping stage, as its circuit.

#include <sonore/screamer.h>
On this page

Design notes

The op-amp device earns its keep here: the TS-808's drive stage is a non-inverting op-amp whose GROUND LEG is 4.7 kOhm + 47 nF (so the gain falls to unity below ~720 Hz: the famous "bass stays clean" voicing, the same 723 Hz figure targets.ts grades against) and whose FEEDBACK arm is 51 kOhm + a 500 kOhm drive pot with 51 pF and the 1N914 pair across it. Because the diodes clip the FEEDBACK, the output is structurally input + clipped(gain excess): the "clean signal rides on top" behaviour every Tube Screamer analysis names (Yeh's thesis treats the op-amp as ideal, which is what circuit.h's nullor is; the chip never rails in this stage). The netlist below is that public schematic, solved whole at 4x.

The TONE stage is deliberately STRUCTURAL, and says so: a single-knob crossfade hinged at the same 723 Hz voicing. The tone control's real active network is not modelled component-for-component here. Building it from the schematic on circuit.h is a follow-up, not an assumption.

A full-scale sample is one volt at the (buffered) input, as fuzz.h.

Included by dsp.h.

Types 1

The TS-808's clipping stage as its circuit -- the non-inverting op-amp with the 1N914 pair in its feedback, solved at 4x on circuit.h's engine -- followed by a structural one-knob tone control (see the file comment for what is modelled and what is not).

One channel, per sample, a full-scale sample being one volt at the input. Call setSampleRate() in prepare() and report latencySamples() to the host. Drive, tone and level are 0..1. The setters and process() run on the audio thread. The level glides; the drive moves a resistor. The same drive again costs nothing; a new one re-factorises the circuit's matrix on the next sample, so set it once a block, not per sample.

↑↓ to move↵ to openEvery public name in the headers, and every guide