OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_Oscillator.h>
Public Types | |
using | NumericType = typename SampleTypeHelpers::ElementType< SampleType >::Type |
Public Member Functions | |
Oscillator ()=default | |
Oscillator (const std::function< NumericType(NumericType)> &function, size_t lookupTableNumPoints=0) | |
bool | isInitialised () const noexcept |
void | initialise (const std::function< NumericType(NumericType)> &function, size_t lookupTableNumPoints=0) |
void | setFrequency (NumericType newFrequency, bool force=false) noexcept |
NumericType | getFrequency () const noexcept |
void | prepare (const ProcessSpec &spec) noexcept |
void | reset () noexcept |
SampleType JUCE_VECTOR_CALLTYPE | processSample (SampleType input) noexcept |
template<typename ProcessContext > | |
void | process (const ProcessContext &context) noexcept |
Generates a signal based on a user-supplied function.
Definition at line 38 of file juce_Oscillator.h.
using juce::dsp::Oscillator< SampleType >::NumericType = typename SampleTypeHelpers::ElementType<SampleType>::Type |
The NumericType is the underlying primitive type used by the SampleType (which could be either a primitive or vector)
Definition at line 44 of file juce_Oscillator.h.
|
default |
Creates an uninitialised oscillator. Call initialise before first use.
|
inline |
Creates an oscillator with a periodic input function (-pi..pi).
If lookup table is not zero, then the function will be approximated with a lookup table.
Definition at line 54 of file juce_Oscillator.h.
|
inlinenoexcept |
Returns the current frequency of the oscillator.
Definition at line 97 of file juce_Oscillator.h.
|
inline |
Initialises the oscillator with a waveform.
Definition at line 64 of file juce_Oscillator.h.
Referenced by juce::dsp::Oscillator< SampleType >::Oscillator().
|
inlinenoexcept |
Returns true if the Oscillator has been initialised.
Definition at line 61 of file juce_Oscillator.h.
Referenced by juce::dsp::Oscillator< SampleType >::process(), and juce::dsp::Oscillator< SampleType >::processSample().
|
inlinenoexcept |
Called before processing starts.
Definition at line 101 of file juce_Oscillator.h.
|
inlinenoexcept |
Processes the input and output buffers supplied in the processing context.
Definition at line 129 of file juce_Oscillator.h.
|
inlinenoexcept |
Returns the result of processing a single sample.
Definition at line 120 of file juce_Oscillator.h.
|
inlinenoexcept |
Resets the internal state of the oscillator
Definition at line 110 of file juce_Oscillator.h.
Referenced by juce::dsp::Oscillator< SampleType >::prepare().
|
inlinenoexcept |
Sets the frequency of the oscillator.
Definition at line 85 of file juce_Oscillator.h.