TracktionEngine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
engine::ClipEffect Class Referenceabstract

#include <tracktion_ClipEffects.h>

Inheritance diagram for engine::ClipEffect:

Public Types

enum class  EffectType {
  none , volume , fadeInOut , tapeStartStop ,
  stepVolume , pitchShift , warpTime , normalise ,
  makeMono , reverse , invert , filter ,
  firstEffect = volume , lastEffect = filter
}
 

Public Member Functions

virtual void initialise ()
 
 ClipEffect (const juce::ValueTree &, ClipEffects &)
 
EffectType getType () const
 
virtual juce::ReferenceCountedObjectPtr< ClipEffectRenderJob > createRenderJob (const AudioFile &sourceFile, TimeDuration sourceLength)=0
 Subclasses should return a job that can render the source.
 
virtual bool hasProperties ()
 Return true here to show a properties button in the editor and enable the propertiesButtonPressed callback.
 
virtual void propertiesButtonPressed (SelectionManager &)
 
virtual void sourceChanged ()
 Callback to indicate the destination file has changed.
 
HashCode getHash () const
 Returns the hash for this effect.
 
AudioFile getSourceFile () const
 
AudioFile getDestinationFile () const
 
bool isUsingFile (const AudioFile &) const
 
virtual void flushStateToValueTree ()
 
juce::UndoManager & getUndoManager ()
 
AudioClipBasegetClip ()
 

Static Public Member Functions

static juce::ValueTree create (EffectType)
 
static ClipEffectcreate (const juce::ValueTree &, ClipEffects &)
 
static void createEffectAndAddToValueTree (Edit &, juce::ValueTree parent, ClipEffect::EffectType, int index)
 
static juce::String getTypeDisplayName (EffectType)
 
static void addEffectsToMenu (juce::PopupMenu &)
 

Public Attributes

Editedit
 
juce::ValueTree state
 
ClipEffectsclipEffects
 

Protected Member Functions

virtual HashCode getIndividualHash () const
 
void valueTreeChanged () override
 
- Protected Member Functions inherited from 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
 

Member Enumeration Documentation

◆ EffectType

enum class engine::ClipEffect::EffectType
strong
Enumerator
none 
volume 
fadeInOut 
tapeStartStop 
stepVolume 
pitchShift 
warpTime 
normalise 
makeMono 
reverse 
invert 
filter 
firstEffect 
lastEffect 

Constructor & Destructor Documentation

◆ ClipEffect()

engine::ClipEffect::ClipEffect ( const juce::ValueTree &  ,
ClipEffects  
)

Member Function Documentation

◆ create() [1/2]

static juce::ValueTree engine::ClipEffect::create ( EffectType  )
static

◆ create() [2/2]

static ClipEffect * engine::ClipEffect::create ( const juce::ValueTree &  ,
ClipEffects  
)
static

◆ createEffectAndAddToValueTree()

static void engine::ClipEffect::createEffectAndAddToValueTree ( Edit ,
juce::ValueTree  parent,
ClipEffect::EffectType  ,
int  index 
)
static

◆ initialise()

virtual void engine::ClipEffect::initialise ( )
virtual

◆ getTypeDisplayName()

static juce::String engine::ClipEffect::getTypeDisplayName ( EffectType  )
static

◆ addEffectsToMenu()

static void engine::ClipEffect::addEffectsToMenu ( juce::PopupMenu &  )
static

◆ getType()

EffectType engine::ClipEffect::getType ( ) const

◆ createRenderJob()

virtual juce::ReferenceCountedObjectPtr< ClipEffectRenderJob > engine::ClipEffect::createRenderJob ( const AudioFile sourceFile,
TimeDuration  sourceLength 
)
pure virtual

Subclasses should return a job that can render the source.

N.B. because the sourceFile may not be valid at the time of job creation you should use the sourceLength parameter to determine how to build the render node.

Implemented in engine::WarpTimeEffect, engine::PluginEffect, engine::MakeMonoEffect, engine::ReverseEffect, engine::InvertEffect, engine::VolumeEffect, engine::FadeInOutEffect, engine::StepVolumeEffect, engine::PitchShiftEffect, and engine::NormaliseEffect.

◆ hasProperties()

virtual bool engine::ClipEffect::hasProperties ( )
virtual

Return true here to show a properties button in the editor and enable the propertiesButtonPressed callback.

Reimplemented in engine::VolumeEffect, engine::StepVolumeEffect, engine::PitchShiftEffect, engine::PluginEffect, engine::NormaliseEffect, and engine::MakeMonoEffect.

◆ propertiesButtonPressed()

virtual void engine::ClipEffect::propertiesButtonPressed ( SelectionManager )
virtual

◆ sourceChanged()

virtual void engine::ClipEffect::sourceChanged ( )
virtual

Callback to indicate the destination file has changed.

Reimplemented in engine::WarpTimeEffect.

◆ getHash()

HashCode engine::ClipEffect::getHash ( ) const

Returns the hash for this effect.

N.B. as effects are serial their hash will change if any preceeding effects change.

See also
getIndividualHash

◆ getSourceFile()

AudioFile engine::ClipEffect::getSourceFile ( ) const

◆ getDestinationFile()

AudioFile engine::ClipEffect::getDestinationFile ( ) const

◆ isUsingFile()

bool engine::ClipEffect::isUsingFile ( const AudioFile ) const

◆ flushStateToValueTree()

virtual void engine::ClipEffect::flushStateToValueTree ( )
virtual

Reimplemented in engine::PluginEffect.

◆ getUndoManager()

juce::UndoManager & engine::ClipEffect::getUndoManager ( )

◆ getClip()

AudioClipBase & engine::ClipEffect::getClip ( )

◆ getIndividualHash()

virtual HashCode engine::ClipEffect::getIndividualHash ( ) const
protectedvirtual

◆ valueTreeChanged()

void engine::ClipEffect::valueTreeChanged ( )
overrideprotectedvirtual

Member Data Documentation

◆ edit

Edit& engine::ClipEffect::edit

◆ state

juce::ValueTree engine::ClipEffect::state

◆ clipEffects

ClipEffects& engine::ClipEffect::clipEffects

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