Audacity  2.2.2
Classes | Macros | Functions
Effect.h File Reference
#include "../Audacity.h"
#include "../MemoryX.h"
#include <set>
#include <wx/bmpbuttn.h>
#include <wx/defs.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/tglbtn.h>
#include <wx/event.h>
#include "audacity/ConfigInterface.h"
#include "audacity/EffectInterface.h"
#include "../Experimental.h"
#include "../SampleFormat.h"
#include "../SelectedRegion.h"
#include "../Shuttle.h"
#include "../Internat.h"
#include "../widgets/ProgressDialog.h"
#include "../Track.h"

Go to the source code of this file.

Classes

class  Effect
 Base class for many of the effects in Audacity. More...
 
class  Effect::AddedAnalysisTrack
 
class  Effect::ModifiedAnalysisTrack
 
class  EffectDialog
 New (Jun-2006) base class for effects dialogs. Likely to get greater use in future. More...
 
class  EffectUIHost
 
class  EffectPresetsDialog
 

Macros

#define BUILTIN_EFFECT_PREFIX   wxT("Built-in Effect: ")
 
#define ID_EFFECT_PREVIEW   ePreviewID
 
#define Param(name, type, key, def, min, max, scale)
 
#define PBasic(name, type, key, def)
 
#define PRange(name, type, key, def, min, max)
 
#define PScale(name, type, key, def, min, max, scale)
 
#define ReadParam(type, name)
 
#define ReadBasic(type, name)
 
#define ReadAndVerifyEnum(name, list, listSize)
 
#define ReadAndVerifyEnumWithObsoletes(name, list, listSize, obsoleteList, nObsolete)
 
#define ReadAndVerifyInt(name)   ReadParam(int, name)
 
#define ReadAndVerifyDouble(name)   ReadParam(double, name)
 
#define ReadAndVerifyFloat(name)   ReadParam(float, name)
 
#define ReadAndVerifyBool(name)   ReadBasic(bool, name)
 
#define ReadAndVerifyString(name)   ReadBasic(wxString, name)
 

Functions

float TrapFloat (float x, float min, float max)
 
double TrapDouble (double x, double min, double max)
 
long TrapLong (long x, long min, long max)
 

Macro Definition Documentation

#define BUILTIN_EFFECT_PREFIX   wxT("Built-in Effect: ")
#define ID_EFFECT_PREVIEW   ePreviewID

Definition at line 557 of file Effect.h.

#define Param (   name,
  type,
  key,
  def,
  min,
  max,
  scale 
)
Value:
static const wxChar * KEY_ ## name = (key); \
static const type DEF_ ## name = (def); \
static const type MIN_ ## name = (min); \
static const type MAX_ ## name = (max); \
static const type SCL_ ## name = (scale);
int min(int a, int b)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 753 of file Effect.h.

#define PBasic (   name,
  type,
  key,
  def 
)
Value:
static const wxChar * KEY_ ## name = (key); \
static const type DEF_ ## name = (def);
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 760 of file Effect.h.

#define PRange (   name,
  type,
  key,
  def,
  min,
  max 
)
Value:
PBasic(name, type, key, def); \
static const type MIN_ ## name = (min); \
static const type MAX_ ## name = (max);
#define PBasic(name, type, key, def)
Definition: Effect.h:760
int min(int a, int b)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 764 of file Effect.h.

#define PScale (   name,
  type,
  key,
  def,
  min,
  max,
  scale 
)
Value:
PRange(name, type, key, def, min, max); \
static const type SCL_ ## name = (scale);
#define PRange(name, type, key, def, min, max)
Definition: Effect.h:764
int min(int a, int b)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 769 of file Effect.h.

#define ReadAndVerifyBool (   name)    ReadBasic(bool, name)
#define ReadAndVerifyDouble (   name)    ReadParam(double, name)
#define ReadAndVerifyEnum (   name,
  list,
  listSize 
)
Value:
int name; \
if (!parms.ReadAndVerify(KEY_ ## name, &name, DEF_ ## name, list, listSize)) \
return false;
if(pTrack &&pTrack->GetDisplay()!=WaveTrack::Spectrum)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 786 of file Effect.h.

Referenced by EffectNoise::SetAutomationParameters(), EffectToneGen::SetAutomationParameters(), EffectTruncSilence::SetAutomationParameters(), EffectScienFilter::SetAutomationParameters(), EffectDistortion::SetAutomationParameters(), and EffectEqualization::SetAutomationParameters().

#define ReadAndVerifyEnumWithObsoletes (   name,
  list,
  listSize,
  obsoleteList,
  nObsolete 
)
Value:
int name; \
if (!parms.ReadAndVerify(KEY_ ## name, &name, DEF_ ## name, \
list, listSize, obsoleteList, nObsolete)) \
return false;
if(pTrack &&pTrack->GetDisplay()!=WaveTrack::Spectrum)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 791 of file Effect.h.

Referenced by EffectTruncSilence::SetAutomationParameters().

#define ReadAndVerifyFloat (   name)    ReadParam(float, name)
#define ReadAndVerifyInt (   name)    ReadParam(int, name)
#define ReadAndVerifyString (   name)    ReadBasic(wxString, name)
#define ReadBasic (   type,
  name 
)
Value:
type name; \
wxUnusedVar(MIN_ ##name); \
wxUnusedVar(MAX_ ##name); \
wxUnusedVar(SCL_ ##name); \
if (!parms.ReadAndVerify(KEY_ ## name, &name, DEF_ ## name)) \
return false;
if(pTrack &&pTrack->GetDisplay()!=WaveTrack::Spectrum)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 778 of file Effect.h.

#define ReadParam (   type,
  name 
)
Value:
type name = DEF_ ## name; \
if (!parms.ReadAndVerify(KEY_ ## name, &name, DEF_ ## name, MIN_ ## name, MAX_ ## name)) \
return false;
if(pTrack &&pTrack->GetDisplay()!=WaveTrack::Spectrum)
const wxChar * name
Definition: Distortion.cpp:94

Definition at line 773 of file Effect.h.

Function Documentation

double TrapDouble ( double  x,
double  min,
double  max 
)
inline
float TrapFloat ( float  x,
float  min,
float  max 
)
inline

Definition at line 718 of file Effect.h.

References min().

719 {
720  if (x <= min)
721  return min;
722 
723  if (x >= max)
724  return max;
725 
726  return x;
727 }
int min(int a, int b)
long TrapLong ( long  x,
long  min,
long  max 
)
inline

Definition at line 740 of file Effect.h.

References min().

741 {
742  if (x <= min)
743  return min;
744 
745  if (x >= max)
746  return max;
747 
748  return x;
749 }
int min(int a, int b)