DSPark 1.8.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 116 of file WDF.h.

Constructor & Destructor Documentation

◆ Capacitor()

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

Definition at line 119 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 124 of file WDF.h.

◆ getCurrent()

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

Definition at line 145 of file WDF.h.

◆ getVoltage()

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

Definition at line 144 of file WDF.h.

◆ incident()

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

Definition at line 142 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 133 of file WDF.h.

◆ portResistance()

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

Definition at line 140 of file WDF.h.

◆ prepare()

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

Definition at line 126 of file WDF.h.

◆ reflected()

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

Definition at line 141 of file WDF.h.

◆ reset()

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

Definition at line 128 of file WDF.h.

◆ setCapacitance()

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

Definition at line 121 of file WDF.h.

◆ updatePorts()

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

Definition at line 127 of file WDF.h.


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