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

Capacitor, bilinear discretization: b[n] = a[n-1], Rp = 1/(2 fs C). More...

#include <WDF.h>

Public Member Functions

 Capacitor (T farads) noexcept
 
void setCapacitance (T farads) noexcept
 
T getCapacitance () const noexcept
 Current capacitance in farads.
 
void prepare (double sampleRate) noexcept
 
void updatePorts () noexcept
 
void reset () noexcept
 
void offsetVoltage (T offset) noexcept
 Shifts the voltage reference without changing capacitor current. Stream-owner only; the finite offset is added to both wave variables and the delayed wave, preserving their difference.
 
double portResistance () const noexcept
 
T reflected () noexcept
 
void incident (T a) noexcept
 
T getVoltage () const noexcept
 
T getCurrent () const noexcept
 

Detailed Description

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

Capacitor, bilinear discretization: b[n] = a[n-1], Rp = 1/(2 fs C).

Definition at line 164 of file WDF.h.

Constructor & Destructor Documentation

◆ Capacitor()

template<FloatType T>
dspark::wdf::Capacitor< T >::Capacitor ( T  farads)
inlineexplicitnoexcept

Definition at line 167 of file WDF.h.

Member Function Documentation

◆ getCapacitance()

template<FloatType T>
T dspark::wdf::Capacitor< T >::getCapacitance ( ) const
inlinenoexcept

Current capacitance in farads.

Definition at line 172 of file WDF.h.

◆ getCurrent()

template<FloatType T>
T dspark::wdf::Capacitor< T >::getCurrent ( ) const
inlinenoexcept

Definition at line 193 of file WDF.h.

◆ getVoltage()

template<FloatType T>
T dspark::wdf::Capacitor< T >::getVoltage ( ) const
inlinenoexcept

Definition at line 192 of file WDF.h.

◆ incident()

template<FloatType T>
void dspark::wdf::Capacitor< T >::incident ( T  a)
inlinenoexcept

Definition at line 190 of file WDF.h.

◆ offsetVoltage()

template<FloatType T>
void dspark::wdf::Capacitor< T >::offsetVoltage ( T  offset)
inlinenoexcept

Shifts the voltage reference without changing capacitor current. Stream-owner only; the finite offset is added to both wave variables and the delayed wave, preserving their difference.

Definition at line 181 of file WDF.h.

◆ portResistance()

template<FloatType T>
double dspark::wdf::Capacitor< T >::portResistance ( ) const
inlinenoexcept

Definition at line 188 of file WDF.h.

◆ prepare()

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

Definition at line 174 of file WDF.h.

◆ reflected()

template<FloatType T>
T dspark::wdf::Capacitor< T >::reflected ( )
inlinenoexcept

Definition at line 189 of file WDF.h.

◆ reset()

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

Definition at line 176 of file WDF.h.

◆ setCapacitance()

template<FloatType T>
void dspark::wdf::Capacitor< T >::setCapacitance ( T  farads)
inlinenoexcept

Definition at line 169 of file WDF.h.

◆ updatePorts()

template<FloatType T>
void dspark::wdf::Capacitor< T >::updatePorts ( )
inlinenoexcept

Definition at line 175 of file WDF.h.


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