Loading...
Searching...
No Matches
juce::dsp::Bias< FloatType > Class Template Reference

## 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 ;).

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

- juce_dsp/widgets/juce_Bias.h

## Public Member Functions

| Bias () noexcept=default
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.

## Constructors and Destructors

## Bias()

template<typename FloatType>

juce::dsp::Bias< FloatType >::Bias | ( |  | ) |

default noexcept

## Member Functions

## setBias()

template<typename FloatType>

void juce::dsp::Bias< FloatType >::setBias | ( | FloatType | newBias | ) |

inline noexcept

Sets the DC bias.

Parameters

  newBias | DC offset in range [-1, 1]

References jassert, and setBias().

Referenced by setBias().

## getBias()

template<typename FloatType>

FloatType juce::dsp::Bias< FloatType >::getBias | ( |  | ) | const

inline noexcept

Returns the DC bias.

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

## setRampDurationSeconds()

template<typename FloatType>

void juce::dsp::Bias< FloatType >::setRampDurationSeconds | ( | double | newDurationSeconds | ) |

inline noexcept

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

References juce::approximatelyEqual().

## getRampDurationSeconds()

template<typename FloatType>

double juce::dsp::Bias< FloatType >::getRampDurationSeconds | ( |  | ) | const

inline noexcept

## prepare()

template<typename FloatType>

void juce::dsp::Bias< FloatType >::prepare | ( | const ProcessSpec & | spec | ) |

inline noexcept

Called before processing starts.

## reset()

template<typename FloatType>

void juce::dsp::Bias< FloatType >::reset | ( |  | ) |

inline noexcept

## processSample()

template<typename FloatType>
template<typename SampleType>

SampleType juce::dsp::Bias< FloatType >::processSample | ( | SampleType | inputSample | ) |

inline noexcept

Returns the result of processing a single sample.

## process()

template<typename FloatType>
template<typename ProcessContext>

void juce::dsp::Bias< FloatType >::process | ( | const ProcessContext & | context | ) |

inline noexcept

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

References jassert, JUCE_BEGIN_IGNORE_WARNINGS_MSVC, and JUCE_END_IGNORE_WARNINGS_MSVC.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited