DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::wdf::ToneStackFMV< T > Class Template Reference

Exact Fender '59 Bassman treble/bass/middle tone stack. More...

#include <WDF.h>

Classes

struct  AnalogStateSpace
 Continuous-time state space of the same network. More...
 

Public Member Functions

 ToneStackFMV (double sourceResistance=1e3, double loadResistance=1e6)
 
void prepare (double sampleRate) noexcept
 Prepares the network (allocates nothing).
 
void reset () noexcept
 Clears capacitor states. RT-safe.
 
void copyStateFrom (const ToneStackFMV &source, T inputOffset=T(0)) noexcept
 Copies the capacitor history from an identically prepared stack.
 
void setControls (T treble, T bass, T middle) noexcept
 Sets the three controls, [0, 1] each.
 
T processSample (T input) noexcept
 Processes one sample (input volts -> wiper volts).
 
AnalogStateSpace analogStateSpace () const noexcept
 

Detailed Description

template<FloatType T>
class dspark::wdf::ToneStackFMV< T >

Exact Fender '59 Bassman treble/bass/middle tone stack.

Topology and component values after Yeh & Smith, "Discretization of the '59 Fender Bassman Tone Stack" (DAFx-06), figure 1: C1 = 250 pF into the treble pot (R1 = 250 k ohm, output at the wiper), R4 = 56 k ohm into the slope node, C2 = C3 = 20 nF from the slope node to the bass rheostat (l*R2, R2 = 1 M ohm) and to the middle pot wiper (R3 = 25 k ohm) respectively. The source is modelled with a series output resistance (cathode-follower buffer) and the wiper drives a grid-load resistance.

Solved exactly as one 12-port R-type. The suite verifies it sample-exact against the bilinear transform of the paper's symbolic transfer function. Controls are not orthogonal – that interaction is the circuit's character.

Definition at line 846 of file WDF.h.

Constructor & Destructor Documentation

◆ ToneStackFMV()

template<FloatType T>
dspark::wdf::ToneStackFMV< T >::ToneStackFMV ( double  sourceResistance = 1e3,
double  loadResistance = 1e6 
)
inlineexplicit
Parameters
sourceResistanceDriving stage output impedance (default 1 k ohm).
loadResistanceFollowing stage grid load (default 1 M ohm).

Definition at line 853 of file WDF.h.

Member Function Documentation

◆ analogStateSpace()

template<FloatType T>
AnalogStateSpace dspark::wdf::ToneStackFMV< T >::analogStateSpace ( ) const
inlinenoexcept

Definition at line 963 of file WDF.h.

◆ copyStateFrom()

template<FloatType T>
void dspark::wdf::ToneStackFMV< T >::copyStateFrom ( const ToneStackFMV< T > &  source,
T  inputOffset = T(0) 
)
inlinenoexcept

Copies the capacitor history from an identically prepared stack.

Stream-owner only: neither stack may be processed concurrently. Both stacks must have the same sample rate and controls. Port connections remain owned by the destination; no allocation or scattering rebuild occurs. An optional input offset shifts all three coupling capacitors by the same DC voltage; the subsequent input must use that reference. The stack blocks DC, so this reference shift preserves its output.

Definition at line 895 of file WDF.h.

◆ prepare()

template<FloatType T>
void dspark::wdf::ToneStackFMV< T >::prepare ( double  sampleRate)
inlinenoexcept

Prepares the network (allocates nothing).

Definition at line 877 of file WDF.h.

◆ processSample()

template<FloatType T>
T dspark::wdf::ToneStackFMV< T >::processSample ( T  input)
inlinenoexcept

Processes one sample (input volts -> wiper volts).

Definition at line 935 of file WDF.h.

◆ reset()

template<FloatType T>
void dspark::wdf::ToneStackFMV< T >::reset ( )
inlinenoexcept

Clears capacitor states. RT-safe.

Definition at line 884 of file WDF.h.

◆ setControls()

template<FloatType T>
void dspark::wdf::ToneStackFMV< T >::setControls ( T  treble,
T  bass,
T  middle 
)
inlinenoexcept

Sets the three controls, [0, 1] each.

Treble and middle pots are linear, the bass pot is a log-taper rheostat (squared approximation), matching the original circuit.

Definition at line 914 of file WDF.h.


The documentation for this class was generated from the following file: