JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::dsp::Bias< FloatType > Class Template Reference

Adds a DC offset (voltage bias) to the audio samples. More...

#include "juce_Bias.h"

Public Member Functions

void setBias (FloatType newBias) noexcept
 Sets the DC bias.
 
FloatType getBias () const noexcept
 Returns the DC bias.
 
void setRampDurationSeconds (double newDurationSeconds) noexcept
 Sets the length of the ramp used for smoothing gain changes.
 
double getRampDurationSeconds () const noexcept
 
void prepare (const ProcessSpec &spec) noexcept
 Called before processing starts.
 
void reset () noexcept
 
template<typename SampleType >
SampleType processSample (SampleType inputSample) noexcept
 Returns the result of processing a single sample.
 
template<typename ProcessContext >
void process (const ProcessContext &context) noexcept
 Processes the input and output buffers supplied in the processing context.
 

Detailed Description

template<typename FloatType>
class juce::dsp::Bias< FloatType >

Adds a DC offset (voltage bias) to the audio samples.

This is a useful preprocessor for asymmetric waveshaping when a waveshaper is bookended by a bias on input and a DC-offset removing high pass filter on output.

This is an extremely simple bias implementation that simply adds a value to a signal. More complicated bias behaviours exist in real circuits - for your homework ;).

@tags{DSP}

Definition at line 41 of file juce_Bias.h.

Member Function Documentation

◆ getBias()

template<typename FloatType >
FloatType juce::dsp::Bias< FloatType >::getBias ( ) const
noexcept

Returns the DC bias.

Returns
DC bias, which should be in the range [-1, 1]

Definition at line 60 of file juce_Bias.h.

◆ getRampDurationSeconds()

template<typename FloatType >
double juce::dsp::Bias< FloatType >::getRampDurationSeconds ( ) const
noexcept

Definition at line 72 of file juce_Bias.h.

◆ prepare()

template<typename FloatType >
void juce::dsp::Bias< FloatType >::prepare ( const ProcessSpec spec)
noexcept

Called before processing starts.

Definition at line 76 of file juce_Bias.h.

◆ process()

template<typename FloatType >
void juce::dsp::Bias< FloatType >::process ( const ProcessContext context)
noexcept

Processes the input and output buffers supplied in the processing context.

Definition at line 98 of file juce_Bias.h.

◆ processSample()

template<typename FloatType >
template<typename SampleType >
SampleType juce::dsp::Bias< FloatType >::processSample ( SampleType  inputSample)
noexcept

Returns the result of processing a single sample.

Definition at line 90 of file juce_Bias.h.

◆ reset()

template<typename FloatType >
void juce::dsp::Bias< FloatType >::reset ( )
noexcept

Definition at line 82 of file juce_Bias.h.

◆ setBias()

template<typename FloatType >
void juce::dsp::Bias< FloatType >::setBias ( FloatType  newBias)
noexcept

Sets the DC bias.

Parameters
newBiasDC offset in range [-1, 1]

Definition at line 50 of file juce_Bias.h.

◆ setRampDurationSeconds()

template<typename FloatType >
void juce::dsp::Bias< FloatType >::setRampDurationSeconds ( double  newDurationSeconds)
noexcept

Sets the length of the ramp used for smoothing gain changes.

Definition at line 63 of file juce_Bias.h.


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