The op-amp gain stage with the diode network either at its output or across its feedback resistor. More...
#include <distortion.hpp>
Public Types | |
| using | Model = DiodeModel |
| using | Topology = ClipperTopology |
Public Member Functions | |
| FeedbackClipperT () | |
| void | prepare (double sample_rate) |
| void | set_topology (Topology topology) |
| Topology | topology () const |
| void | set_diode_model (Model model) |
| void | set_symmetry (double symmetry) |
| void | set_feedback_resistance (double ohms) |
| void | set_input_resistance (double ohms) |
| void | set_knee_corner_hz (double hz) |
| double | linear_gain () const |
| The stage's linear (small-signal) gain, Rf/Rin — the bound the loop can never exceed at frequencies below the feedback capacitor's corner. | |
| void | reset () |
| int | last_iteration_count () const |
| SampleType | process (SampleType input) |
Static Public Attributes | |
| static constexpr double | kFeedbackResistanceDefault = 51000.0 |
| Feedback resistor: sets the linear gain Rf/Rin and, with Cf, the in-loop knee corner. | |
| static constexpr double | kInputResistanceDefault = 4700.0 |
| Input resistor. | |
| static constexpr double | kKneeCornerHzDefault = 720.0 |
| In-loop knee corner, fc = 1/(2π·Rf·Cf). | |
The op-amp gain stage with the diode network either at its output or across its feedback resistor.
The in-loop KCL at the virtual ground reduces to the SAME functional form as the to-ground ODE with v ≡ −vout, R ≡ Rf, C ≡ Cf, plus a vin/Rin forcing term. So this reuses the identical TR-BDF2 + Newton solver rather than introducing a second numerical method.
Small-signal gain and its bound (series law 1). At v → 0 the diodes' incremental conductance is Is/(n·Vt) — for silicon about 3.9e-13 S, utterly negligible against 1/Rf — so at zero signal the diodes are effectively an open circuit and the small-signal gain is exactly the linear Rf/Rin. As |v| grows the diodes' conductance grows exponentially, shunting more feedback current and REDUCING loop gain monotonically. The loop is therefore self-limiting, never self-amplifying, and Rf/Rin bounds it above at every amplitude. That is the tested invariant the Forge registry cites.
| using pulp::signal::FeedbackClipperT< SampleType >::Model = DiodeModel |
| using pulp::signal::FeedbackClipperT< SampleType >::Topology = ClipperTopology |
|
inline |
|
inline |
|
inline |
The stage's linear (small-signal) gain, Rf/Rin — the bound the loop can never exceed at frequencies below the feedback capacitor's corner.
Above that corner the capacitor shunts feedback current and the gain is lower, which is the topology's defining behaviour rather than a caveat.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |
Feedback resistor: sets the linear gain Rf/Rin and, with Cf, the in-loop knee corner.
[design parameter] default 51 kΩ, range 10 kΩ .. 200 kΩ.
|
staticconstexpr |
Input resistor.
Rf/Rin is the stage's linear gain. [design parameter] default 4.7 kΩ, range 1 kΩ .. 100 kΩ.
|
staticconstexpr |
In-loop knee corner, fc = 1/(2π·Rf·Cf).
Above it the capacitor shunts feedback current around the diodes, so high harmonics see less clipping-loop gain — the mechanism behind the smoother, brighter-forgiving character of this topology. The default sits in the documented behavioural neighbourhood, not on any schematic. [design parameter] default 720 Hz, range 100 Hz .. 5000 Hz.