TracktionEngine
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
tracktion::engine::ClipEffect Class Referenceabstract
Inheritance diagram for tracktion::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, double sourceLength)=0
 Subclasses should return a job that can render the source. More...
 
virtual bool hasProperties ()
 Return true here to show a properties button in the editor and enable the propertiesButtonPressed callback. More...
 
virtual void propertiesButtonPressed (SelectionManager &)
 
virtual void sourceChanged ()
 Callback to indicate the destination file has changed. More...
 
HashCode getHash () const
 Returns the hash for this effect. More...
 
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 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
 

Member Enumeration Documentation

◆ EffectType

Enumerator
none 
volume 
fadeInOut 
tapeStartStop 
stepVolume 
pitchShift 
warpTime 
normalise 
makeMono 
reverse 
invert 
filter 
firstEffect 
lastEffect 

Constructor & Destructor Documentation

◆ ClipEffect()

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

Member Function Documentation

◆ create() [1/2]

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

◆ create() [2/2]

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

◆ createEffectAndAddToValueTree()

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

◆ initialise()

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

◆ getTypeDisplayName()

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

◆ addEffectsToMenu()

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

◆ getType()

EffectType tracktion::engine::ClipEffect::getType ( ) const

◆ createRenderJob()

virtual juce::ReferenceCountedObjectPtr<ClipEffectRenderJob> tracktion::engine::ClipEffect::createRenderJob ( const AudioFile sourceFile,
double  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 tracktion::engine::NormaliseEffect, tracktion::engine::PitchShiftEffect, tracktion::engine::StepVolumeEffect, tracktion::engine::FadeInOutEffect, tracktion::engine::VolumeEffect, tracktion::engine::InvertEffect, tracktion::engine::ReverseEffect, tracktion::engine::MakeMonoEffect, tracktion::engine::PluginEffect, and tracktion::engine::WarpTimeEffect.

◆ hasProperties()

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

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

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

◆ propertiesButtonPressed()

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

◆ sourceChanged()

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

Callback to indicate the destination file has changed.

Reimplemented in tracktion::engine::WarpTimeEffect.

◆ getHash()

HashCode tracktion::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 tracktion::engine::ClipEffect::getSourceFile ( ) const

◆ getDestinationFile()

AudioFile tracktion::engine::ClipEffect::getDestinationFile ( ) const

◆ isUsingFile()

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

◆ flushStateToValueTree()

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

◆ getUndoManager()

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

◆ getClip()

AudioClipBase& tracktion::engine::ClipEffect::getClip ( )

◆ getIndividualHash()

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

◆ valueTreeChanged()

void tracktion::engine::ClipEffect::valueTreeChanged ( )
overrideprotectedvirtual

Member Data Documentation

◆ edit

Edit& tracktion::engine::ClipEffect::edit

◆ state

juce::ValueTree tracktion::engine::ClipEffect::state

◆ clipEffects

ClipEffects& tracktion::engine::ClipEffect::clipEffects

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