|
LMMS
|
#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 |
Private Attributes | |
| std::function< NumericType(NumericType)> | generator |
| std::unique_ptr< LookupTableTransform< NumericType > > | lookupTable |
| Array< NumericType > | rampBuffer |
| SmoothedValue< NumericType > | frequency { static_cast<NumericType> (440.0) } |
| NumericType | sampleRate = 48000.0 |
| Phase< NumericType > | phase |
Generates a signal based on a user-supplied function.
@tags{DSP}
| 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)
|
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.
|
inlinenoexcept |
Returns the current frequency of the oscillator.
|
inline |
Initialises the oscillator with a waveform.
|
inlinenoexcept |
Returns true if the Oscillator has been initialised.
|
inlinenoexcept |
Called before processing starts.
|
inlinenoexcept |
Processes the input and output buffers supplied in the processing context.
|
inlinenoexcept |
Returns the result of processing a single sample.
|
inlinenoexcept |
Resets the internal state of the oscillator
|
inlinenoexcept |
Sets the frequency of the oscillator.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |