|
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 |
Generates a signal based on a user-supplied function. More...
#include "juce_Oscillator.h"
Public Types | |
| using | 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) | |
Public Member Functions | |
| Oscillator ()=default | |
| Creates an uninitialised oscillator. | |
| Oscillator (const std::function< NumericType(NumericType)> &function, size_t lookupTableNumPoints=0) | |
| Creates an oscillator with a periodic input function (-pi..pi). | |
| bool | isInitialised () const noexcept |
| Returns true if the Oscillator has been initialised. | |
| void | initialise (const std::function< NumericType(NumericType)> &function, size_t lookupTableNumPoints=0) |
| Initialises the oscillator with a waveform. | |
| void | setFrequency (NumericType newFrequency, bool force=false) noexcept |
| Sets the frequency of the oscillator. | |
| NumericType | getFrequency () const noexcept |
| Returns the current frequency of the oscillator. | |
| void | prepare (const ProcessSpec &spec) noexcept |
| Called before processing starts. | |
| void | reset () noexcept |
| Resets the internal state of the oscillator. | |
| SampleType JUCE_VECTOR_CALLTYPE | processSample (SampleType input) 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. | |
Generates a signal based on a user-supplied function.
@tags{DSP}
Definition at line 35 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 41 of file juce_Oscillator.h.
|
default |
Creates an uninitialised oscillator.
Call initialise before first use.
| juce::dsp::Oscillator< SampleType >::Oscillator | ( | const std::function< NumericType(NumericType)> & | function, |
| size_t | lookupTableNumPoints = 0 |
||
| ) |
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 51 of file juce_Oscillator.h.
|
noexcept |
Returns the current frequency of the oscillator.
Definition at line 94 of file juce_Oscillator.h.
| void juce::dsp::Oscillator< SampleType >::initialise | ( | const std::function< NumericType(NumericType)> & | function, |
| size_t | lookupTableNumPoints = 0 |
||
| ) |
Initialises the oscillator with a waveform.
Definition at line 61 of file juce_Oscillator.h.
|
noexcept |
Returns true if the Oscillator has been initialised.
Definition at line 58 of file juce_Oscillator.h.
|
noexcept |
Called before processing starts.
Definition at line 98 of file juce_Oscillator.h.
|
noexcept |
Processes the input and output buffers supplied in the processing context.
Definition at line 126 of file juce_Oscillator.h.
|
noexcept |
Returns the result of processing a single sample.
Definition at line 117 of file juce_Oscillator.h.
|
noexcept |
Resets the internal state of the oscillator.
Definition at line 107 of file juce_Oscillator.h.
|
noexcept |
Sets the frequency of the oscillator.
Definition at line 82 of file juce_Oscillator.h.