11namespace tracktion {
inline namespace engine
20 virtual void updateStreamTime (
TimePosition editTime,
int numSamples) = 0;
136 int initialiseCount = 0;
137 double sampleRate = 44100.0;
142 mutable choc::fifo::SingleReaderSingleWriterFIFO<std::pair<int, float>> valueFifoQueue;
176 void deleteObject (
Modifier*)
override;
179 void newObjectAdded (
Modifier*)
override;
181 void objectRemoved (
Modifier*)
override;
183 void objectOrderChanged()
override;
191template<
typename ModifierType>
197 if (
auto type =
dynamic_cast<ModifierType*
> (m))
ObjectClass * add(ObjectClass *newObject)
Base class for elements that have some kind of automatable parameters.
The Tracktion Edit class!
Holds a list of Modifiers that have been added to a Track.
~ModifierList() override
Destructor.
static bool isModifier(const juce::Identifier &)
Tests whether the Identifier is of a known Modifier type.
juce::ReferenceCountedObjectPtr< Modifier > insertModifier(juce::ValueTree, int index, SelectionManager *)
Adds a Modifier from a state at a given index.
juce::ReferenceCountedArray< Modifier > getModifiers() const
Returns all the Modifiers in the list.
Base class for things that can be selected, and whose properties can appear in the properties panel.
Manages a list of items that are currently selected.
Modifier::Ptr findModifierForID(ModifierList &ml, EditItemID modifierID)
Returns a Modifier if it can be found in the list.
juce::Array< ModifierType * > getModifiersOfType(const AutomatableParameter &ap)
Returns all the modifers in use of a specific type.
Represents a duration in real-life time.
Represents a position in real-life time.
Connects a modifier source to an AutomatableParameter.
Base class for things that can be used to modify parameters.
Base class for objects which need to know about the global Edit time every block.
Bass class for parameter Modifiers.
virtual AutomatableParameter::ModifierAssignment * createAssignment(const juce::ValueTree &)=0
Must return a new ModifierAssignment for a given state.
virtual void initialise(double, int)
Sub classes should implement this to initialise the Modifier.
virtual juce::StringArray getAudioInputNames()
Can return an array of names represeting audio inputs.
virtual float getCurrentValue()=0
Must return the current value of the modifier.
void selectableAboutToBeDeleted() override
Called just before the selectable is about to be deleted so any subclasses should still be valid at t...
juce::ValueTree state
Modifier internal state.
void baseClassApplyToBuffer(const PluginRenderContext &)
Updates internal value history and calls the subclass's applyToBuffer method.
virtual void applyToBuffer(const PluginRenderContext &)
Sub classes should implement this to process the Modifier.
TimePosition getCurrentTime() const
Returns the edit time of the current value.
void setEditTime(TimePosition newEditTime)
Subclasses can call this to update the edit time of the current value.
~Modifier() override
Destructor.
virtual void deinitialise()
Sub classes should implement this to deinitialise the Modifier.
void baseClassInitialise(double sampleRate, int blockSizeSamples)
Initialises the Modifier.
static constexpr TimeDuration maxHistoryTime
The max number of seconds of modifier value history that is stored.
virtual juce::StringArray getMidiInputNames()
Can return an array of names represeting MIDI inputs.
virtual void initialise()=0
Call this once after construction to connect it to the audio graph.
juce::CachedValue< juce::Colour > colour
Colour property.
AutomatableParameter::Ptr enabledParam
Parameter to change the enabled state.
void remove()
Removes this Modifier from its parent Track.
juce::CachedValue< float > enabled
Enabled property.
bool baseClassNeedsInitialising() const noexcept
Returns true if the Modifier needs initialising.
virtual ProcessingPosition getProcessingPosition()
Should return the position in the plugin chain that this Modifier should be processed.
void baseClassDeinitialise()
Deinitialises the Modifier.
float getValueAt(TimeDuration numSecondsBeforeNow) const
Returns the value of the at a given time in the past.
ProcessingPosition
Determines the position in the FX chain where the modifier should be processed.
@ none
The Modifier needs no processing.
@ preFX
The Modifier is processed before the plugn chain.
@ postFX
The Modifier is processed after the plugn chain.
double getSampleRate() const
Returns the sample rate the Modifier has been initialised with.
std::vector< float > getValues(TimeDuration numSecondsBeforeNow) const
Returns a vector of previous sample values.
The context passed to plugin render methods to provide it with buffers to fill.