TracktionEngine
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tracktion::engine::ImpulseResponsePlugin Class Reference

ImpulseResponsePlugin that loads an impulse response and applies it the audio stream. More...

Inheritance diagram for tracktion::engine::ImpulseResponsePlugin:

Public Member Functions

 ImpulseResponsePlugin (PluginCreationInfo)
 Creates an ImpulseResponsePlugin. More...
 
 ~ImpulseResponsePlugin () override
 Destructor. More...
 
bool loadImpulseResponse (const void *sourceData, size_t sourceDataSize)
 Loads an impulse from binary audio file data i.e. More...
 
bool loadImpulseResponse (const juce::File &fileImpulseResponse)
 Loads an impulse from a file. More...
 
bool loadImpulseResponse (juce::AudioBuffer< float > &&bufferImpulseResponse, double sampleRateToStore, int bitDepthToStore)
 Loads an impulse from an AudioBuffer<float>. More...
 
juce::String getName () const override
 
juce::String getShortName (int) override
 
juce::String getPluginType () override
 
bool needsConstantBufferSize () override
 
juce::String getSelectableDescription () override
 
double getLatencySeconds () override
 
void initialise (const PluginInitialisationInfo &) override
 
void deinitialise () override
 
void reset () override
 
void applyToBuffer (const PluginRenderContext &) override
 
void restorePluginStateFromValueTree (const juce::ValueTree &) override
 
- Public Member Functions inherited from tracktion::engine::Plugin
 Plugin (PluginCreationInfo)
 
 ~Plugin () override
 
void selectableAboutToBeDeleted () override
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. More...
 
void playStartedOrStopped ()
 called by the system to let the plugin manage its automation stuff More...
 
virtual void initialiseFully ()
 Gives the plugin a chance to do extra initialisation when it's been added to an edit. More...
 
virtual void flushPluginStateToValueTree () override
 
virtual juce::String getVendor ()
 
virtual juce::String getIdentifierString ()
 A unique string to idenitify plugin independant of install location. More...
 
virtual juce::String getTooltip ()
 default returns the name, others can return special stuff if needed More...
 
virtual void setEnabled (bool)
 Enable/disable the plugin. More...
 
bool isEnabled () const noexcept
 
void setFrozen (bool shouldBeFrozen)
 This is a bit different to being enabled as when frozen a plugin can't be interacted with. More...
 
bool isFrozen () const noexcept
 
void setProcessingEnabled (bool p)
 Enable/Disable processing. More...
 
bool isProcessingEnabled () const noexcept
 
virtual void initialiseWithoutStopping (const PluginInitialisationInfo &)
 Tells the plugin that the audio graph has changed but the plugin isn't being re-initialised - i.e. More...
 
virtual void trackPropertiesChanged ()
 Track name or colour has changed. More...
 
virtual void prepareForNextBlock (TimePosition)
 Called between successive rendering blocks. More...
 
void applyToBufferWithAutomation (const PluginRenderContext &)
 
double getCpuUsage () const noexcept
 
virtual int getNumOutputChannelsGivenInputs (int numInputChannels)
 This must return the number of output channels that the plugin will produce, given a number of input channels. More...
 
virtual bool producesAudioWhenNoAudioInput ()
 
virtual bool noTail ()
 
virtual void getChannelNames (juce::StringArray *ins, juce::StringArray *outs)
 
virtual bool takesAudioInput ()
 
virtual bool takesMidiInput ()
 
virtual bool isSynth ()
 
virtual double getTailLength () const
 
virtual bool canSidechain ()
 
juce::StringArray getInputChannelNames ()
 
juce::StringArray getSidechainSourceNames (bool allowNone)
 
void setSidechainSourceByName (const juce::String &name)
 
juce::String getSidechainSourceName ()
 
void guessSidechainRouting ()
 
int getNumWires () const
 
WiregetWire (int index) const
 
void makeConnection (int srcChannel, int dstChannel, juce::UndoManager *)
 
void breakConnection (int srcChannel, int dstChannel)
 
virtual bool hasNameForMidiNoteNumber (int note, int midiChannel, juce::String &name)
 If it's a synth that names its notes, this can return the name it uses for this note 0-127. More...
 
virtual bool hasNameForMidiProgram (int programNum, int bank, juce::String &name)
 Returns the name for a midi program, if there is one. More...
 
virtual bool hasNameForMidiBank (int bank, juce::String &name)
 
virtual bool canBeAddedToClip ()
 
virtual bool canBeAddedToRack ()
 
virtual bool canBeAddedToFolderTrack ()
 
virtual bool canBeAddedToMaster ()
 
virtual bool canBeDisabled ()
 
virtual bool canBeMoved ()
 
virtual bool isMissing ()
 for things like VSTs where the DLL is missing. More...
 
virtual bool isDisabled ()
 Plugins can be disabled to avoid them crashing Edits. More...
 
bool isInRack () const
 
juce::ReferenceCountedObjectPtr< RackTypegetOwnerRackType () const
 
bool isClipEffectPlugin () const
 
virtual juce::AudioProcessor * getWrappedAudioProcessor () const
 
AutomatableParameter::Ptr getQuickControlParameter () const
 
void setQuickControlParameter (AutomatableParameter *)
 
virtual void deleteFromParent ()
 Attempts to delete this plugin, whether it's a master plugin, track plugin, etc. More...
 
void removeFromParent ()
 Detaches the plugin from any parent it might be in. More...
 
TrackgetOwnerTrack () const
 Returns the track if it's a track or clip plugin. More...
 
ClipgetOwnerClip () const
 Returns the clip if that's what it's in. More...
 
PluginListgetOwnerList () const
 
Ptr findPluginThatFeedsIntoThis () const
 
Ptr findPluginThatThisFeedsInto () const
 
void changed () override
 method from Selectable, that's been overridden here to also tell the edit that it's changed. More...
 
juce::Array< ReferencedItemgetReferencedItems () override
 
void reassignReferencedItem (const ReferencedItem &, ProjectItemID newID, double newStartTime) override
 
virtual void sourceMediaChanged ()
 Called when ProjectItem sources are re-assigned so you can reload from the new source. More...
 
bool setPluginToMirror (const Plugin::Ptr &)
 
virtual void updateFromMirroredPluginIfNeeded (Plugin &)
 
Plugin::Ptr getMirroredPlugin () const
 
bool baseClassNeedsInitialising () const noexcept
 
void baseClassInitialise (const PluginInitialisationInfo &)
 
void baseClassDeinitialise ()
 
void setSidechainSourceID (EditItemID newID)
 
EditItemID getSidechainSourceID () const
 
void showWindowExplicitly ()
 
void hideWindowForShutdown ()
 
juce::UndoManager * getUndoManager () const noexcept
 
- Public Member Functions inherited from tracktion::engine::Selectable
 Selectable ()
 
virtual ~Selectable ()
 
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected. More...
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions. More...
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 
- Public Member Functions inherited from tracktion::engine::Exportable
virtual ~Exportable ()=default
 
- Public Member Functions inherited from tracktion::engine::AutomatableEditItem
 AutomatableEditItem (Edit &, const juce::ValueTree &)
 
virtual ~AutomatableEditItem ()
 
juce::Array< AutomatableParameter * > getAutomatableParameters () const
 
int getNumAutomatableParameters () const
 
AutomatableParameter::Ptr getAutomatableParameter (int index) const
 
AutomatableParameter::Ptr getAutomatableParameterByID (const juce::String &paramID) 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. More...
 
void updateParameterStreams (TimePosition)
 Updates all the parameter streams to their positions at this time. More...
 
void updateActiveParameters ()
 Iterates all the parameters to find out which ones need to be automated. More...
 
void resetRecordingStatus ()
 Marks the end of an automation recording stream. More...
 
- Public Member Functions inherited from tracktion::engine::EditItem
 EditItem (EditItemID, Edit &)
 
virtual ~EditItem ()=default
 
- Public Member Functions inherited from tracktion::engine::MacroParameterElement
 MacroParameterElement (Edit &, const juce::ValueTree &)
 Constructor. More...
 
virtual ~MacroParameterElement ()=default
 Destructor. More...
 
int getNumMacroParameters () const
 Returns the number of macro parameters for this object. More...
 

Static Public Member Functions

static const char * getPluginName ()
 
- Static Public Member Functions inherited from tracktion::engine::Plugin
static bool areSelectedPluginsRackable (SelectionManager &)
 
static RackInstancewrapSelectedPluginsInRack (SelectionManager &)
 
static void sortPlugins (Plugin::Array &)
 
static void sortPlugins (std::vector< Plugin * > &)
 
- 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. More...
 
- Static Public Member Functions inherited from tracktion::engine::Exportable
static juce::Array< Exportable * > addAllExportables (Edit &)
 Returns all the Exportables contained in an Edit. More...
 

Public Attributes

juce::CachedValue< juce::String > name
 A name property. More...
 
juce::CachedValue< bool > normalise
 Normalise the IR file when loading from the state. More...
 
juce::CachedValue< bool > trimSilence
 Trim silence from the IR file when loading from the state. More...
 
AutomatableParameter::Ptr highPassCutoffParam
 Cutoff frequency for the high pass filter to applied after the IR. More...
 
AutomatableParameter::Ptr lowPassCutoffParam
 Cutoff frequency for the low pass filter to applied after the IR. More...
 
AutomatableParameter::Ptr gainParam
 Parameter for the gain to apply. More...
 
AutomatableParameter::Ptr mixParam
 Parameter for the mix control, 0.0 = dry, 1.0 = wet. More...
 
AutomatableParameter::Ptr filterQParam
 Parameter for the Q factor of the high pass and low pass filters. More...
 
- Public Attributes inherited from tracktion::engine::Plugin
std::unique_ptr< WindowStatewindowState
 
Engineengine
 
juce::ValueTree state
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 
- 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. More...
 
- Public Attributes inherited from tracktion::engine::MacroParameterElement
MacroParameterList macroParameterList
 

Static Public Attributes

static const char * xmlTypeName = "impulseResponse"
 

Additional Inherited Members

- Public Types inherited from tracktion::engine::Plugin
enum class  Type { allPlugins , folderTrackPlugins , effectPlugins }
 
using Ptr = juce::ReferenceCountedObjectPtr< Plugin >
 
using Array = juce::ReferenceCountedArray< Plugin >
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 
- Protected Member Functions inherited from tracktion::engine::Plugin
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeChanged () override
 
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
 
void valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 
virtual void processingChanged ()
 
AutomatableParameteraddParam (const juce::String &paramID, const juce::String &name, juce::NormalisableRange< float > valueRange)
 
AutomatableParameteraddParam (const juce::String &paramID, const juce::String &name, juce::NormalisableRange< float > valueRange, std::function< juce::String(float)> valueToStringFunction, std::function< float(const juce::String &)> stringToValueFunction)
 
- 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. More...
 
void restoreChangedParametersFromState ()
 Restores the value of any explicitly set parameters. More...
 
- Protected Member Functions inherited from tracktion::engine::ValueTreeAllEventListener
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
 
void valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
 
void valueTreeChildOrderChanged (juce::ValueTree &, int, int) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 
void valueTreeRedirected (juce::ValueTree &) override
 
- Static Protected Member Functions inherited from tracktion::engine::Plugin
static void getLeftRightChannelNames (juce::StringArray *ins, juce::StringArray *outs)
 
static void getLeftRightChannelNames (juce::StringArray *chans)
 
- Protected Attributes inherited from tracktion::engine::Plugin
juce::CachedValue< AtomicWrapper< bool > > enabled
 
juce::CachedValue< bool > frozen
 
juce::CachedValue< bool > processing
 
juce::CachedValue< juce::String > quickParamName
 
juce::CachedValue< EditItemIDmasterPluginID
 
juce::CachedValue< EditItemIDsidechainSourceID
 
double sampleRate = 44100.0
 
int blockSizeSamples = 512
 

Detailed Description

ImpulseResponsePlugin that loads an impulse response and applies it the audio stream.

Additionally this has high and low pass filters to shape the sound.

Constructor & Destructor Documentation

◆ ImpulseResponsePlugin()

tracktion::engine::ImpulseResponsePlugin::ImpulseResponsePlugin ( PluginCreationInfo  )

Creates an ImpulseResponsePlugin.

Initially this will be have no IR loaded, use one of the loadImpulseResponse methods to apply it to the audio.

◆ ~ImpulseResponsePlugin()

tracktion::engine::ImpulseResponsePlugin::~ImpulseResponsePlugin ( )
override

Destructor.

Member Function Documentation

◆ getPluginName()

static const char* tracktion::engine::ImpulseResponsePlugin::getPluginName ( )
static

◆ loadImpulseResponse() [1/3]

bool tracktion::engine::ImpulseResponsePlugin::loadImpulseResponse ( const void *  sourceData,
size_t  sourceDataSize 
)

Loads an impulse from binary audio file data i.e.

not a block of raw floats.

See also
juce::Convolution::loadImpulseResponse

◆ loadImpulseResponse() [2/3]

bool tracktion::engine::ImpulseResponsePlugin::loadImpulseResponse ( const juce::File &  fileImpulseResponse)

Loads an impulse from a file.

See also
juce::Convolution::loadImpulseResponse

◆ loadImpulseResponse() [3/3]

bool tracktion::engine::ImpulseResponsePlugin::loadImpulseResponse ( juce::AudioBuffer< float > &&  bufferImpulseResponse,
double  sampleRateToStore,
int  bitDepthToStore 
)

Loads an impulse from an AudioBuffer<float>.

See also
juce::Convolution::loadImpulseResponse

◆ getName()

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

◆ getShortName()

juce::String tracktion::engine::ImpulseResponsePlugin::getShortName ( int  )
overridevirtual

Reimplemented from tracktion::engine::Plugin.

◆ getPluginType()

juce::String tracktion::engine::ImpulseResponsePlugin::getPluginType ( )
overridevirtual

◆ needsConstantBufferSize()

bool tracktion::engine::ImpulseResponsePlugin::needsConstantBufferSize ( )
overridevirtual

◆ getSelectableDescription()

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

◆ getLatencySeconds()

double tracktion::engine::ImpulseResponsePlugin::getLatencySeconds ( )
overridevirtual

Reimplemented from tracktion::engine::Plugin.

◆ initialise()

void tracktion::engine::ImpulseResponsePlugin::initialise ( const PluginInitialisationInfo )
overridevirtual

◆ deinitialise()

void tracktion::engine::ImpulseResponsePlugin::deinitialise ( )
overridevirtual

◆ reset()

void tracktion::engine::ImpulseResponsePlugin::reset ( )
overridevirtual

Reimplemented from tracktion::engine::Plugin.

◆ applyToBuffer()

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

◆ restorePluginStateFromValueTree()

void tracktion::engine::ImpulseResponsePlugin::restorePluginStateFromValueTree ( const juce::ValueTree &  )
overridevirtual

Member Data Documentation

◆ xmlTypeName

const char* tracktion::engine::ImpulseResponsePlugin::xmlTypeName = "impulseResponse"
static

◆ name

juce::CachedValue<juce::String> tracktion::engine::ImpulseResponsePlugin::name

A name property.

This isn't used by the IR itselt but useful in UI contexts.

◆ normalise

juce::CachedValue<bool> tracktion::engine::ImpulseResponsePlugin::normalise

Normalise the IR file when loading from the state.

True by default.

◆ trimSilence

juce::CachedValue<bool> tracktion::engine::ImpulseResponsePlugin::trimSilence

Trim silence from the IR file when loading from the state.

False by default.

◆ highPassCutoffParam

AutomatableParameter::Ptr tracktion::engine::ImpulseResponsePlugin::highPassCutoffParam

Cutoff frequency for the high pass filter to applied after the IR.

◆ lowPassCutoffParam

AutomatableParameter::Ptr tracktion::engine::ImpulseResponsePlugin::lowPassCutoffParam

Cutoff frequency for the low pass filter to applied after the IR.

◆ gainParam

AutomatableParameter::Ptr tracktion::engine::ImpulseResponsePlugin::gainParam

Parameter for the gain to apply.

◆ mixParam

AutomatableParameter::Ptr tracktion::engine::ImpulseResponsePlugin::mixParam

Parameter for the mix control, 0.0 = dry, 1.0 = wet.

◆ filterQParam

AutomatableParameter::Ptr tracktion::engine::ImpulseResponsePlugin::filterQParam

Parameter for the Q factor of the high pass and low pass filters.


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