tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tracktion::engine::LFOModifier Class Reference
Inheritance diagram for tracktion::engine::LFOModifier:
tracktion::engine::Modifier tracktion::engine::ValueTreeAllEventListener tracktion::engine::AutomatableEditItem tracktion::engine::Selectable tracktion::engine::AutomatableParameter::ModifierSource juce::ReferenceCountedObject tracktion::engine::EditItem

Classes

struct  Assignment
 
struct  LFOModifierTimer
 

Public Types

enum  Wave {
  waveSine , waveTriangle , waveSawUp , waveSawDown ,
  waveSquare , fourStepsUp , fourStepsDown , eightStepsUp ,
  eightStepsDown , random , noise
}
 
using Ptr = juce::ReferenceCountedObjectPtr< LFOModifier >
 
using Array = juce::ReferenceCountedArray< LFOModifier >
 
- Public Types inherited from tracktion::engine::Modifier
enum class  ProcessingPosition { none , preFX , postFX }
 Determines the position in the FX chain where the modifier should be processed. More...
 
using Ptr = juce::ReferenceCountedObjectPtr< Modifier >
 
using Array = juce::ReferenceCountedArray< Modifier >
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 

Public Member Functions

 LFOModifier (Edit &, const juce::ValueTree &)
 
void initialise () override
 Call this once after construction to connect it to the audio graph.
 
juce::String getName () const override
 
float getCurrentValue () override
 Returns the current value of the LFO.
 
float getCurrentPhase () const
 Returns the current phase between 0 & 1.
 
AutomatableParameter::ModifierAssignmentcreateAssignment (const juce::ValueTree &) override
 Must return a new ModifierAssignment for a given state.
 
ProcessingPosition getProcessingPosition () override
 Should return the position in the plugin chain that this Modifier should be processed.
 
void applyToBuffer (const PluginRenderContext &) override
 Sub classes should implement this to process the Modifier.
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are.
 
virtual void initialise ()=0
 Call this once after construction to connect it to the audio graph.
 
virtual void initialise (double, int)
 Sub classes should implement this to initialise the Modifier.
 
- Public Member Functions inherited from tracktion::engine::Modifier
 Modifier (Edit &, const juce::ValueTree &)
 Creates a Modifier for a given state.
 
 ~Modifier () override
 Destructor.
 
void remove ()
 Removes this Modifier from its parent Track.
 
virtual juce::StringArray getMidiInputNames ()
 Can return an array of names represeting MIDI inputs.
 
virtual juce::StringArray getAudioInputNames ()
 Can return an array of names represeting audio inputs.
 
virtual void deinitialise ()
 Sub classes should implement this to deinitialise the Modifier.
 
bool baseClassNeedsInitialising () const noexcept
 Returns true if the Modifier needs initialising.
 
void baseClassInitialise (double sampleRate, int blockSizeSamples)
 Initialises the Modifier.
 
void baseClassDeinitialise ()
 Deinitialises the Modifier.
 
void baseClassApplyToBuffer (const PluginRenderContext &)
 Updates internal value history and calls the subclass's applyToBuffer method.
 
TimePosition getCurrentTime () const
 Returns the edit time of the current value.
 
float getValueAt (TimeDuration numSecondsBeforeNow) const
 Returns the value of the at a given time in the past.
 
std::vector< floatgetValues (TimeDuration numSecondsBeforeNow) const
 Returns a vector of previous sample values.
 
double getSampleRate () const
 Returns the sample rate the Modifier has been initialised with.
 
void selectableAboutToBeDeleted () override
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
 
- Public Member Functions inherited from tracktion::engine::AutomatableEditItem
 AutomatableEditItem (Edit &, const juce::ValueTree &)
 
virtual void flushPluginStateToValueTree ()
 
virtual void restorePluginStateFromValueTree (const juce::ValueTree &)
 
juce::Array< AutomatableParameter * > getAutomatableParameters () const
 
int getNumAutomatableParameters () const
 
AutomatableParameter::Ptr getAutomatableParameter (int index) const
 
AutomatableParameter::Ptr getAutomatableParameterByID (const juce::String &paramID) const
 
void visitAllAutomatableParams (const std::function< void(AutomatableParameter &)> &visit) const
 
void deleteParameter (AutomatableParameter *)
 
void deleteAutomatableParameters ()
 
int indexOfAutomatableParameter (const AutomatableParameter::Ptr &) const
 
AutomatableParameterTreegetParameterTree () const
 
juce::ReferenceCountedArray< AutomatableParametergetFlattenedParameterTree () const
 
void addParameterListChangeListener (ParameterListChangeListener *)
 
void removeParameterListChangeListener (ParameterListChangeListener *)
 
bool isAutomationNeeded () const noexcept
 
void setAutomatableParamPosition (TimePosition)
 
bool isBeingActivelyPlayed () const
 
virtual void updateAutomatableParamPosition (TimePosition)
 Updates all the auto params to their positions at this time.
 
void updateParameterStreams (TimePosition)
 Updates all the parameter streams to their positions at this time.
 
void updateActiveParameters ()
 Iterates all the parameters to find out which ones need to be automated.
 
void resetRecordingStatus ()
 Marks the end of an automation recording stream.
 
- Public Member Functions inherited from tracktion::engine::EditItem
 EditItem (EditItemID, Edit &)
 
- Public Member Functions inherited from tracktion::engine::Selectable
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected.
 
virtual void changed ()
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
void addListener (SelectableListener *)
 
void removeListener (SelectableListener *)
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions.
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 

Static Public Member Functions

static juce::StringArray getWaveNames ()
 
- Static Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
 

Public Attributes

juce::CachedValue< floatwave
 
juce::CachedValue< floatsyncType
 
juce::CachedValue< floatrate
 
juce::CachedValue< floatrateType
 
juce::CachedValue< floatdepth
 
juce::CachedValue< floatbipolar
 
juce::CachedValue< floatphase
 
juce::CachedValue< floatoffset
 
AutomatableParameter::Ptr waveParam
 
AutomatableParameter::Ptr syncTypeParam
 
AutomatableParameter::Ptr rateParam
 
AutomatableParameter::Ptr rateTypeParam
 
AutomatableParameter::Ptr depthParam
 
AutomatableParameter::Ptr bipolarParam
 
AutomatableParameter::Ptr phaseParam
 
AutomatableParameter::Ptr offsetParam
 
- Public Attributes inherited from tracktion::engine::Modifier
juce::ValueTree state
 Modifier internal state.
 
juce::CachedValue< juce::Colourcolour
 Colour property.
 
juce::CachedValue< floatenabled
 Enabled property.
 
AutomatableParameter::Ptr enabledParam
 Parameter to change the enabled state.
 
- Public Attributes inherited from tracktion::engine::AutomatableEditItem
juce::ValueTree elementState
 
juce::CachedValue< bool > remapOnTempoChange
 
- Public Attributes inherited from tracktion::engine::EditItem
Editedit
 
const EditItemID itemID
 Every EditItem has an ID which is unique within the edit.
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Additional Inherited Members

- Static Public Attributes inherited from tracktion::engine::Modifier
static constexpr TimeDuration maxHistoryTime
 The max number of seconds of modifier value history that is stored.
 
- Protected Member Functions inherited from tracktion::engine::Modifier
void setEditTime (TimePosition newEditTime)
 Subclasses can call this to update the edit time of the current value.
 
- Protected Member Functions inherited from tracktion::engine::AutomatableEditItem
virtual void buildParameterTree () const
 
void updateLastPlaybackTime ()
 
void clearParameterList ()
 
void addAutomatableParameter (const AutomatableParameter::Ptr &)
 
void rebuildParameterTree ()
 
void saveChangedParametersToState ()
 Saves the explicit value of any parameters that have deviated to the state.
 
void restoreChangedParametersFromState ()
 Restores the value of any explicitly set parameters.
 
- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 
void resetReferenceCount () noexcept
 

Detailed Description

Definition at line 15 of file tracktion_LFOModifier.h.

Member Typedef Documentation

◆ Array

Definition at line 23 of file tracktion_LFOModifier.h.

◆ Ptr

Definition at line 22 of file tracktion_LFOModifier.h.

Member Enumeration Documentation

◆ Wave

enum tracktion::engine::LFOModifier::Wave

Definition at line 62 of file tracktion_LFOModifier.h.

Constructor & Destructor Documentation

◆ LFOModifier()

tracktion::engine::LFOModifier::LFOModifier ( Edit e,
const juce::ValueTree v 
)

Definition at line 152 of file tracktion_LFOModifier.cpp.

◆ ~LFOModifier()

tracktion::engine::LFOModifier::~LFOModifier ( )
override

Definition at line 210 of file tracktion_LFOModifier.cpp.

Member Function Documentation

◆ applyToBuffer()

void tracktion::engine::LFOModifier::applyToBuffer ( const PluginRenderContext )
overridevirtual

Sub classes should implement this to process the Modifier.

Reimplemented from tracktion::engine::Modifier.

Definition at line 241 of file tracktion_LFOModifier.cpp.

◆ createAssignment()

AutomatableParameter::ModifierAssignment * tracktion::engine::LFOModifier::createAssignment ( const juce::ValueTree )
overridevirtual

Must return a new ModifierAssignment for a given state.

Implements tracktion::engine::Modifier.

Definition at line 236 of file tracktion_LFOModifier.cpp.

◆ getCurrentPhase()

float tracktion::engine::LFOModifier::getCurrentPhase ( ) const

Returns the current phase between 0 & 1.

Definition at line 234 of file tracktion_LFOModifier.cpp.

◆ getCurrentValue()

float tracktion::engine::LFOModifier::getCurrentValue ( )
overridevirtual

Returns the current value of the LFO.

N.B. this may be greater than +-1 if a suitable offset has been applied.

Implements tracktion::engine::Modifier.

Definition at line 233 of file tracktion_LFOModifier.cpp.

◆ getName()

juce::String tracktion::engine::LFOModifier::getName ( ) const
overridevirtual

Implements tracktion::engine::EditItem.

Definition at line 27 of file tracktion_LFOModifier.h.

◆ getProcessingPosition()

ProcessingPosition tracktion::engine::LFOModifier::getProcessingPosition ( )
overridevirtual

Should return the position in the plugin chain that this Modifier should be processed.

Reimplemented from tracktion::engine::Modifier.

Definition at line 41 of file tracktion_LFOModifier.h.

◆ getSelectableDescription()

juce::String tracktion::engine::LFOModifier::getSelectableDescription ( )
overridevirtual

Subclasses must return a description of what they are.

Implements tracktion::engine::Selectable.

Definition at line 59 of file tracktion_LFOModifier.h.

◆ getWaveNames()

juce::StringArray tracktion::engine::LFOModifier::getWaveNames ( )
static

Definition at line 275 of file tracktion_LFOModifier.cpp.

◆ initialise() [1/3]

void tracktion::engine::LFOModifier::initialise ( )
overridevirtual

Call this once after construction to connect it to the audio graph.

Implements tracktion::engine::Modifier.

Definition at line 223 of file tracktion_LFOModifier.cpp.

◆ initialise() [2/3]

virtual void tracktion::engine::Modifier::initialise ( )
virtual

Call this once after construction to connect it to the audio graph.

Implements tracktion::engine::Modifier.

◆ initialise() [3/3]

virtual void tracktion::engine::Modifier::initialise ( double  ,
int   
)
virtual

Sub classes should implement this to initialise the Modifier.

Reimplemented from tracktion::engine::Modifier.

Definition at line 81 of file tracktion_Modifier.h.

Member Data Documentation

◆ bipolar

juce::CachedValue<float> tracktion::engine::LFOModifier::bipolar

Definition at line 79 of file tracktion_LFOModifier.h.

◆ bipolarParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::bipolarParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ depth

juce::CachedValue<float> tracktion::engine::LFOModifier::depth

Definition at line 79 of file tracktion_LFOModifier.h.

◆ depthParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::depthParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ offset

juce::CachedValue<float> tracktion::engine::LFOModifier::offset

Definition at line 79 of file tracktion_LFOModifier.h.

◆ offsetParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::offsetParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ phase

juce::CachedValue<float> tracktion::engine::LFOModifier::phase

Definition at line 79 of file tracktion_LFOModifier.h.

◆ phaseParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::phaseParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ rate

juce::CachedValue<float> tracktion::engine::LFOModifier::rate

Definition at line 79 of file tracktion_LFOModifier.h.

◆ rateParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::rateParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ rateType

juce::CachedValue<float> tracktion::engine::LFOModifier::rateType

Definition at line 79 of file tracktion_LFOModifier.h.

◆ rateTypeParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::rateTypeParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ syncType

juce::CachedValue<float> tracktion::engine::LFOModifier::syncType

Definition at line 79 of file tracktion_LFOModifier.h.

◆ syncTypeParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::syncTypeParam

Definition at line 81 of file tracktion_LFOModifier.h.

◆ wave

juce::CachedValue<float> tracktion::engine::LFOModifier::wave

Definition at line 79 of file tracktion_LFOModifier.h.

◆ waveParam

AutomatableParameter::Ptr tracktion::engine::LFOModifier::waveParam

Definition at line 81 of file tracktion_LFOModifier.h.


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