TracktionEngine
Loading...
Searching...
No Matches
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 ()
AudioClipBase & getClip ()

Static Public Member Functions

static juce::ValueTree create (EffectType)
static ClipEffect * create (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

Edit & edit
juce::ValueTree state
ClipEffects & clipEffects

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 &  )

References ClipEffects.

Referenced by ClipEffects, and create().

Member Function Documentation

◆ create() [1/2]

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

◆ create() [2/2]

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

References ClipEffect(), and ClipEffects.

◆ createEffectAndAddToValueTree()

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

◆ initialise()

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

◆ getTypeDisplayName()

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

◆ addEffectsToMenu()

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::FadeInOutEffect, engine::InvertEffect, engine::MakeMonoEffect, engine::NormaliseEffect, engine::PitchShiftEffect, engine::PluginEffect, engine::ReverseEffect, engine::StepVolumeEffect, engine::VolumeEffect, and engine::WarpTimeEffect.

◆ 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::MakeMonoEffect, engine::NormaliseEffect, engine::PitchShiftEffect, engine::PluginEffect, engine::StepVolumeEffect, and engine::VolumeEffect.

◆ 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: