Audacity  3.0.3
Public Member Functions | Private Member Functions | Private Attributes | List of all members
VampEffect Class Referencefinal

#include <VampEffect.h>

Inheritance diagram for VampEffect:
[legend]
Collaboration diagram for VampEffect:
[legend]

Public Member Functions

 VampEffect (std::unique_ptr< Vamp::Plugin > &&plugin, const PluginPath &path, int output, bool hasParameters)
 
virtual ~VampEffect ()
 
PluginPath GetPath () override
 
ComponentInterfaceSymbol GetSymbol () override
 
VendorSymbol GetVendor () override
 
wxString GetVersion () override
 
TranslatableString GetDescription () override
 
EffectType GetType () override
 
EffectFamilySymbol GetFamily () override
 
bool IsInteractive () override
 
bool IsDefault () override
 
unsigned GetAudioInCount () override
 
bool GetAutomationParameters (CommandParameters &parms) override
 
bool SetAutomationParameters (CommandParameters &parms) override
 
bool Init () override
 
bool Process () override
 
void End () override
 
void PopulateOrExchange (ShuttleGui &S) override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
- Public Member Functions inherited from Effect
 Effect ()
 
virtual ~Effect ()
 
bool IsLegacy () override
 
bool SupportsRealtime () override
 
bool SupportsAutomation () override
 
bool SetHost (EffectHostInterface *host) override
 
unsigned GetAudioOutCount () override
 
int GetMidiInCount () override
 
int GetMidiOutCount () override
 
sampleCount GetLatency () override
 
size_t GetTailSize () override
 
void SetSampleRate (double rate) override
 
size_t SetBlockSize (size_t maxBlockSize) override
 
size_t GetBlockSize () const override
 
bool IsReady () override
 
bool ProcessInitialize (sampleCount totalLen, ChannelNames chanMap=NULL) override
 
bool ProcessFinalize () override
 
size_t ProcessBlock (float **inBlock, float **outBlock, size_t blockLen) override
 
bool RealtimeInitialize () override
 
bool RealtimeAddProcessor (unsigned numChannels, float sampleRate) override
 
bool RealtimeFinalize () override
 
bool RealtimeSuspend () override
 
bool RealtimeResume () override
 
bool RealtimeProcessStart () override
 
size_t RealtimeProcess (int group, float **inbuf, float **outbuf, size_t numSamples) override
 
bool RealtimeProcessEnd () override
 
bool ShowInterface (wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
 
bool LoadUserPreset (const RegistryPath &name) override
 
bool SaveUserPreset (const RegistryPath &name) override
 
RegistryPaths GetFactoryPresets () override
 
bool LoadFactoryPreset (int id) override
 
bool LoadFactoryDefaults () override
 
void SetHostUI (EffectUIHostInterface *host) override
 
bool PopulateUI (ShuttleGui &S) final
 
bool IsGraphicalUI () override
 
bool ValidateUI () override
 
bool HideUI () override
 
bool CloseUI () override
 
bool CanExportPresets () override
 
void ExportPresets () override
 
void ImportPresets () override
 
bool HasOptions () override
 
void ShowOptions () override
 
double GetDefaultDuration () override
 
double GetDuration () override
 
NumericFormatSymbol GetDurationFormat () override
 
virtual NumericFormatSymbol GetSelectionFormat ()
 
void SetDuration (double duration) override
 
RegistryPath GetUserPresetsGroup (const RegistryPath &name) override
 
RegistryPath GetCurrentSettingsGroup () override
 
RegistryPath GetFactoryDefaultsGroup () override
 
virtual wxString GetSavedStateGroup ()
 
bool HasSharedConfigGroup (const RegistryPath &group) override
 
bool GetSharedConfigSubgroups (const RegistryPath &group, RegistryPaths &subgroups) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval={}) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, int &value, int defval=0) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, bool &value, bool defval=false) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, float &value, float defval=0.0) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, double &value, double defval=0.0) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const wxString &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const int &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const bool &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const float &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const double &value) override
 
bool RemoveSharedConfigSubgroup (const RegistryPath &group) override
 
bool RemoveSharedConfig (const RegistryPath &group, const RegistryPath &key) override
 
bool HasPrivateConfigGroup (const RegistryPath &group) override
 
bool GetPrivateConfigSubgroups (const RegistryPath &group, RegistryPaths &paths) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval={}) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, int &value, int defval=0) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, bool &value, bool defval=false) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, float &value, float defval=0.0) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, double &value, double defval=0.0) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const wxString &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const int &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const bool &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const float &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const double &value) override
 
bool RemovePrivateConfigSubgroup (const RegistryPath &group) override
 
bool RemovePrivateConfig (const RegistryPath &group, const RegistryPath &key) override
 
virtual PluginID GetID ()
 
virtual bool Startup (EffectClientInterface *client)
 
virtual bool Startup ()
 
virtual bool GetAutomationParameters (wxString &parms)
 
virtual bool SetAutomationParameters (const wxString &parms)
 
virtual RegistryPaths GetUserPresets ()
 
virtual bool HasCurrentSettings ()
 
virtual bool HasFactoryDefaults ()
 
virtual ManualPageID ManualPage ()
 
virtual FilePath HelpPage ()
 
virtual void SetUIFlags (unsigned flags)
 
virtual unsigned TestUIFlags (unsigned mask)
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
void SetPresetParameters (const wxArrayString *Names, const wxArrayString *Values)
 
bool DoEffect (double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={})
 
bool Delegate (Effect &delegate, wxWindow &parent, const EffectDialogFactory &factory)
 
virtual bool IsHidden ()
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
- Public Member Functions inherited from EffectClientInterface
virtual ~EffectClientInterface ()
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
virtual EffectType GetClassification ()
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
TranslatableString GetName ()
 
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
- Public Member Functions inherited from EffectHostInterface
virtual ~EffectHostInterface ()
 
- Public Member Functions inherited from ConfigClientInterface
virtual ~ConfigClientInterface ()
 

Private Member Functions

void AddFeatures (LabelTrack *track, Vamp::Plugin::FeatureSet &features)
 
void UpdateFromPlugin ()
 
void OnCheckBox (wxCommandEvent &evt)
 
void OnChoice (wxCommandEvent &evt)
 
void OnSlider (wxCommandEvent &evt)
 
void OnTextCtrl (wxCommandEvent &evt)
 

Private Attributes

std::unique_ptr< Vamp::Plugin > mPlugin
 
PluginPath mPath
 
int mOutput
 
bool mHasParameters
 
Vamp::HostExt::PluginLoader::PluginKey mKey
 
wxString mName
 
double mRate
 
bool mInSlider
 
bool mInText
 
Vamp::Plugin::ParameterList mParameters
 
Floats mValues
 
ArrayOf< wxSlider * > mSliders
 
ArrayOf< wxTextCtrl * > mFields
 
ArrayOf< wxStaticText * > mLabels
 
ArrayOf< wxCheckBox * > mToggles
 
ArrayOf< wxChoice * > mChoices
 
wxChoice * mProgram
 

Additional Inherited Members

- Public Types inherited from Effect
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
using VetoDialogHook = bool(*)(wxDialog *)
 
- Public Types inherited from EffectClientInterface
using EffectDialogFactory = std::function< wxDialog *(wxWindow &parent, EffectHostInterface *, EffectUIClientInterface *) >
 
- Static Public Member Functions inherited from Effect
static VetoDialogHook SetVetoDialogHook (VetoDialogHook hook)
 
static CommandID GetSquashedName (wxString name)
 
static void IncEffectCounter ()
 
- Static Public Attributes inherited from Effect
static const wxString kUserPresetIdent = wxT("User Preset:")
 
static const wxString kFactoryPresetIdent = wxT("Factory Preset:")
 
static const wxString kCurrentSettingsIdent = wxT("<Current Settings>")
 
static const wxString kFactoryDefaultsIdent = wxT("<Factory Defaults>")
 
- Protected Member Functions inherited from Effect
virtual bool CheckWhetherSkipEffect ()
 
virtual bool ProcessPass ()
 
virtual bool InitPass1 ()
 
virtual bool InitPass2 ()
 
virtual int GetPass ()
 
virtual double CalcPreviewInputLength (double previewLength)
 
virtual void Preview (bool dryOnly)
 
virtual bool EnableApply (bool enable=true)
 
virtual bool EnablePreview (bool enable=true)
 
virtual void EnableDebug (bool enable=true)
 
bool TotalProgress (double frac, const TranslatableString &={})
 
bool TrackProgress (int whichTrack, double frac, const TranslatableString &={})
 
bool TrackGroupProgress (int whichGroup, double frac, const TranslatableString &={})
 
int GetNumWaveTracks ()
 
int GetNumWaveGroups ()
 
void GetBounds (const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing ()
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void CopyInputTracks (bool allSyncLockSelected=false)
 
std::shared_ptr< AddedAnalysisTrackAddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
TrackAddToOutputTracks (const std::shared_ptr< Track > &t)
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 
- Protected Attributes inherited from Effect
ProgressDialogmProgress
 
double mProjectRate
 
double mSampleRate
 
wxWeakRef< NotifyingSelectedRegionmpSelectedRegion {}
 
WaveTrackFactorymFactory
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0
 
double mT1
 
wxArrayString mPresetNames
 
wxArrayString mPresetValues
 
int mPass
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 
int mUIResultID
 
unsigned mUIFlags
 
sampleCount mSampleCnt
 
- Static Protected Attributes inherited from Effect
static int nEffectsDone =0
 

Detailed Description

Definition at line 34 of file VampEffect.h.

Constructor & Destructor Documentation

◆ VampEffect()

VampEffect::VampEffect ( std::unique_ptr< Vamp::Plugin > &&  plugin,
const PluginPath path,
int  output,
bool  hasParameters 
)

Definition at line 68 of file VampEffect.cpp.

72 : mPlugin(std::move(plugin)),
73  mPath(path),
74  mOutput(output),
75  mHasParameters(hasParameters),
76  mRate(0)
77 {
78  mKey = mPath.BeforeLast(wxT('/')).ToUTF8();
79  mName = mPath.AfterLast(wxT('/'));
80 }

◆ ~VampEffect()

VampEffect::~VampEffect ( )
virtual

Definition at line 82 of file VampEffect.cpp.

83 {
84 }

Member Function Documentation

◆ AddFeatures()

void VampEffect::AddFeatures ( LabelTrack track,
Vamp::Plugin::FeatureSet &  features 
)
private

Definition at line 720 of file VampEffect.cpp.

722 {
723  for (Vamp::Plugin::FeatureList::iterator fli = features[mOutput].begin();
724  fli != features[mOutput].end(); ++fli)
725  {
726  Vamp::RealTime ftime0 = fli->timestamp;
727  double ltime0 = ftime0.sec + (double(ftime0.nsec) / 1000000000.0);
728 
729  Vamp::RealTime ftime1 = ftime0;
730  if (fli->hasDuration) ftime1 = ftime0 + fli->duration;
731  double ltime1 = ftime1.sec + (double(ftime1.nsec) / 1000000000.0);
732 
733  wxString label = LAT1CTOWX(fli->label.c_str());
734  if (label == wxString())
735  {
736  if (fli->values.empty())
737  {
738  label = wxString::Format(LAT1CTOWX("%.3f"), ltime0);
739  }
740  else
741  {
742  label = wxString::Format(LAT1CTOWX("%.3f"), *fli->values.begin());
743  }
744  }
745 
746  ltrack->AddLabel(SelectedRegion(ltime0, ltime1), label);
747  }
748 }

References LabelTrack::AddLabel(), label, LAT1CTOWX, and mOutput.

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ End()

void VampEffect::End ( )
overridevirtual

Reimplemented from Effect.

Definition at line 530 of file VampEffect.cpp.

531 {
532  mPlugin.reset();
533 }

References mPlugin.

◆ GetAudioInCount()

unsigned VampEffect::GetAudioInCount ( )
overridevirtual

Reimplemented from Effect.

Definition at line 143 of file VampEffect.cpp.

144 {
145  return mPlugin->getMaxChannelCount();
146 }

References mPlugin.

◆ GetAutomationParameters()

bool VampEffect::GetAutomationParameters ( CommandParameters parms)
overridevirtual

Reimplemented from Effect.

Definition at line 148 of file VampEffect.cpp.

149 {
150  for (size_t p = 0, paramCount = mParameters.size(); p < paramCount; p++)
151  {
152  wxString key = wxString::FromUTF8(mParameters[p].identifier.c_str());
153  float value = mPlugin->getParameter(mParameters[p].identifier);
154  float lower = mParameters[p].minValue;
155  float upper = mParameters[p].maxValue;
156 
157  if (mParameters[p].isQuantized &&
158  mParameters[p].quantizeStep == 1.0 &&
159  lower == 0.0 &&
160  upper == 1.0)
161  {
162  bool val = value > 0.5;
163 
164  parms.Write(key, val);
165  }
166  else if (mParameters[p].isQuantized &&
167  mParameters[p].quantizeStep == 1.0 &&
168  !mParameters[p].valueNames.empty())
169  {
170  std::vector<EnumValueSymbol> choices;
171  int val = 0;
172 
173  for (size_t i = 0, choiceCount = mParameters[p].valueNames.size(); i < choiceCount; i++)
174  {
175  wxString choice = wxString::FromUTF8(mParameters[p].valueNames[i].c_str());
176  if (size_t(value - mParameters[p].minValue + 0.5) == i)
177  {
178  val = i;
179  }
180  choices.push_back(choice);
181  }
182 
183  parms.WriteEnum(key, val, choices.data(), choices.size());
184  }
185  else
186  {
187  parms.Write(key, value);
188  }
189  }
190 
191  return true;
192 }

References key, mParameters, mPlugin, and CommandParameters::WriteEnum().

Here is the call graph for this function:

◆ GetDescription()

TranslatableString VampEffect::GetDescription ( )
overridevirtual

Reimplemented from Effect.

Definition at line 110 of file VampEffect.cpp.

111 {
112  return Verbatim(
113  wxString::FromUTF8(mPlugin->getCopyright().c_str()) );
114 }

References mPlugin, and Verbatim().

Here is the call graph for this function:

◆ GetFamily()

EffectFamilySymbol VampEffect::GetFamily ( )
overridevirtual

Reimplemented from Effect.

Definition at line 125 of file VampEffect.cpp.

126 {
127  return VAMPEFFECTS_FAMILY;
128 }

References VAMPEFFECTS_FAMILY.

◆ GetPath()

PluginPath VampEffect::GetPath ( )
overridevirtual

Reimplemented from Effect.

Definition at line 90 of file VampEffect.cpp.

91 {
92  return mPath;
93 }

References mPath.

◆ GetSymbol()

ComponentInterfaceSymbol VampEffect::GetSymbol ( )
overridevirtual

Reimplemented from Effect.

Definition at line 95 of file VampEffect.cpp.

96 {
97  return mName;
98 }

References mName.

Referenced by Process().

Here is the caller graph for this function:

◆ GetType()

EffectType VampEffect::GetType ( )
overridevirtual

Reimplemented from Effect.

Definition at line 120 of file VampEffect.cpp.

121 {
122  return EffectTypeAnalyze;
123 }

References EffectTypeAnalyze.

◆ GetVendor()

VendorSymbol VampEffect::GetVendor ( )
overridevirtual

Reimplemented from Effect.

Definition at line 100 of file VampEffect.cpp.

101 {
102  return { wxString::FromUTF8(mPlugin->getMaker().c_str()) };
103 }

References mPlugin.

◆ GetVersion()

wxString VampEffect::GetVersion ( )
overridevirtual

Reimplemented from Effect.

Definition at line 105 of file VampEffect.cpp.

106 {
107  return wxString::Format(wxT("%d"), mPlugin->getPluginVersion());
108 }

References mPlugin.

◆ Init()

bool VampEffect::Init ( )
overridevirtual

Reimplemented from Effect.

Definition at line 299 of file VampEffect.cpp.

300 {
301  mRate = 0.0;
302 
303  // PRL: this loop checked that channels of a track have the same rate,
304  // but there was no check that all tracks have one rate, and only the first
305  // is remembered in mRate. Is that correct?
306 
307  for (auto leader : inputTracks()->Leaders<const WaveTrack>()) {
308  auto channelGroup = TrackList::Channels( leader );
309  auto rate = (*channelGroup.first++) -> GetRate();
310  for(auto channel : channelGroup) {
311  if (rate != channel->GetRate())
312  // PRL: Track rate might not match individual clip rates.
313  // So is this check not adequate?
314  {
315  // TODO: more-than-two-channels-message
317  XO(
318 "Sorry, Vamp Plug-ins cannot be run on stereo tracks where the individual channels of the track do not match.") );
319  return false;
320  }
321  }
322  if (mRate == 0.0)
323  mRate = rate;
324  }
325 
326  if (mRate <= 0.0)
327  {
329  }
330 
331  // The plugin must be reloaded to allow changing parameters
332 
333  Vamp::HostExt::PluginLoader *loader = Vamp::HostExt::PluginLoader::getInstance();
334  mPlugin.reset(loader->loadPlugin(mKey, mRate, Vamp::HostExt::PluginLoader::ADAPT_ALL));
335  if (!mPlugin)
336  {
337  Effect::MessageBox( XO("Sorry, failed to load Vamp Plug-in.") );
338  return false;
339  }
340 
341  return true;
342 }

References TrackList::Channels(), anonymous_namespace{TimeTrack.cpp}::GetRate(), Effect::inputTracks(), Effect::MessageBox(), mKey, mPlugin, Effect::mProjectRate, mRate, and XO.

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsDefault()

bool VampEffect::IsDefault ( )
overridevirtual

Reimplemented from Effect.

Definition at line 135 of file VampEffect.cpp.

136 {
137  return false;
138 }

◆ IsInteractive()

bool VampEffect::IsInteractive ( )
overridevirtual

Reimplemented from Effect.

Definition at line 130 of file VampEffect.cpp.

131 {
132  return mHasParameters;
133 }

References mHasParameters.

◆ OnCheckBox()

void VampEffect::OnCheckBox ( wxCommandEvent &  evt)
private

Definition at line 793 of file VampEffect.cpp.

794 {
795  int p = event.GetId() - ID_Toggles;
796 
797  mPlugin->setParameter(mParameters[p].identifier, mToggles[p]->GetValue());
798 }

References ID_Toggles, mParameters, mPlugin, and mToggles.

◆ OnChoice()

void VampEffect::OnChoice ( wxCommandEvent &  evt)
private

Definition at line 800 of file VampEffect.cpp.

801 {
802  int p = evt.GetId();
803 
804  // special value for programs
805  if (p == ID_Program)
806  {
807  Vamp::Plugin::ProgramList programs = mPlugin->getPrograms();
808  mPlugin->selectProgram(programs[evt.GetInt()]);
810  return;
811  }
812 
813  mPlugin->setParameter(mParameters[p - ID_Choices].identifier, evt.GetInt());
814 }

References ID_Choices, ID_Program, mParameters, mPlugin, and UpdateFromPlugin().

Here is the call graph for this function:

◆ OnSlider()

void VampEffect::OnSlider ( wxCommandEvent &  evt)
private

Definition at line 816 of file VampEffect.cpp.

817 {
818  int p = evt.GetId() - ID_Sliders;
819 
820  float lower = mParameters[p].minValue;
821  float upper = mParameters[p].maxValue;
822  float range = upper - lower;
823  float val = (evt.GetInt() / 1000.0) * range;
824 
825  if (mParameters[p].isQuantized)
826  {
827  float qs = mParameters[p].quantizeStep;
828 
829  if (qs != 0.0)
830  {
831  val = (int)(val / qs + 0.5) * qs;
832  }
833  }
834 
835  val += lower;
836 
837  mValues[p] = val;
838  mFields[p]->GetValidator()->TransferToWindow();
839 
840  mPlugin->setParameter(mParameters[p].identifier, val);
841 }

References ID_Sliders, mFields, mParameters, mPlugin, and mValues.

◆ OnTextCtrl()

void VampEffect::OnTextCtrl ( wxCommandEvent &  evt)
private

Definition at line 843 of file VampEffect.cpp.

844 {
845  int p = evt.GetId() - ID_Texts;
846 
847  mFields[p]->GetValidator()->TransferFromWindow();
848 
849  float lower = mParameters[p].minValue;
850  float upper = mParameters[p].maxValue;
851  float range = upper - lower;
852  float val = mValues[p];
853 
854  if (mParameters[p].isQuantized)
855  {
856  float qs = mParameters[p].quantizeStep;
857 
858  if (qs != 0.0)
859  {
860  val = (int)((val - lower) / qs + 0.5) * qs + lower;
861  }
862  }
863 
864  mPlugin->setParameter(mParameters[p].identifier, val);
865 
866  mSliders[p]->SetValue((int)(((val - lower) / range) * 1000.0 + 0.5));
867 }

References ID_Texts, mFields, mParameters, mPlugin, mSliders, and mValues.

◆ PopulateOrExchange()

void VampEffect::PopulateOrExchange ( ShuttleGui S)
overridevirtual

Reimplemented from Effect.

Definition at line 535 of file VampEffect.cpp.

536 {
537  Vamp::Plugin::ProgramList programs = mPlugin->getPrograms();
538 
539  mParameters = mPlugin->getParameterDescriptors();
540 
541  auto count = mParameters.size();
542 
543  mToggles.reinit( count );
544  mSliders.reinit( count );
545  mFields.reinit( count );
546  mLabels.reinit( count );
547  mChoices.reinit( count );
548  mValues.reinit( count );
549 
550  wxScrolledWindow *scroller = S.Style(wxVSCROLL | wxTAB_TRAVERSAL)
551  .StartScroller(2);
552  {
553  S.StartStatic(XO("Plugin Settings"));
554  {
555  S.StartMultiColumn(5, wxEXPAND);
556  {
557  S.SetStretchyCol(3);
558 
559  if (!programs.empty())
560  {
561  S.AddPrompt(XXO("Program"));
562 
563  S.Id(ID_Program);
564  mProgram = S.Name(XO("Program"))
565  .MinSize( { -1, -1 } )
566  .Position(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL)
567  .AddChoice( {},
568  [&]{
569  TranslatableStrings choices;
570  for (const auto &program : programs)
571  choices.push_back(
572  Verbatim(wxString::FromUTF8(program.c_str())));
573  return choices;
574  }(),
575  Verbatim( wxString::FromUTF8(mPlugin->getCurrentProgram().c_str()) )
576  );
577 
578  S.AddSpace(1, 1);
579  S.AddSpace(1, 1);
580  S.AddSpace(1, 1);
581  }
582 
583  for (size_t p = 0; p < count; p++)
584  {
585  wxString tip = wxString::FromUTF8(mParameters[p].description.c_str());
586  wxString unit = wxString::FromUTF8(mParameters[p].unit.c_str());
587 
588  float value = mPlugin->getParameter(mParameters[p].identifier);
589 
590  mToggles[p] = NULL;
591  mChoices[p] = NULL;
592  mSliders[p] = NULL;
593  mFields[p] = NULL;
594  mValues[p] = 0.0;
595 
596  wxString labelText = wxString::FromUTF8(mParameters[p].name.c_str());
597  if (!unit.empty())
598  {
599  labelText += wxT(" (") + unit + wxT(")");
600  }
601  /* i18n-hint: An item name introducing a value, which is not part of the string but
602  appears in a following text box window; translate with appropriate punctuation */
603  S.AddPrompt(XXO("%s:").Format( labelText ));
604 
605  if (mParameters[p].isQuantized &&
606  mParameters[p].quantizeStep == 1.0 &&
607  mParameters[p].minValue == 0.0 &&
608  mParameters[p].maxValue == 1.0)
609  {
610  S.Id(ID_Toggles + p);
611  mToggles[p] = S.ToolTip( Verbatim( tip ) )
612  .Name( Verbatim( labelText ) )
613  .Position(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL)
614  .AddCheckBox( {},
615  value > 0.5 );
616 
617  S.AddSpace(1, 1);
618  S.AddSpace(1, 1);
619  S.AddSpace(1, 1);
620 
621  }
622  else if (mParameters[p].isQuantized &&
623  mParameters[p].quantizeStep == 1.0 &&
624  !mParameters[p].valueNames.empty())
625  {
626  TranslatableStrings choices;
627  int selected = -1;
628 
629  for (size_t i = 0, cnt = mParameters[p].valueNames.size(); i < cnt; i++)
630  {
631  wxString choice = wxString::FromUTF8(mParameters[p].valueNames[i].c_str());
632  if (size_t(value - mParameters[p].minValue + 0.5) == i)
633  {
634  selected = i;
635  }
636  choices.push_back( Verbatim( choice ) );
637  }
638 
639  S.Id(ID_Choices + p);
640  mChoices[p] = S.ToolTip( Verbatim( tip ) )
641  .Name( Verbatim( labelText ) )
642  .Position(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL)
643  .MinSize( { -1, -1 } )
644  .AddChoice( {}, choices, selected );
645 
646  S.AddSpace(1, 1);
647  S.AddSpace(1, 1);
648  S.AddSpace(1, 1);
649  }
650  else
651  {
652  mValues[p] = value;
653 
654  float range = mParameters[p].maxValue - mParameters[p].minValue;
655 
656  S.Id(ID_Texts + p);
657  mFields[p] = S.ToolTip( Verbatim( tip ) )
658  .Name( Verbatim( labelText ) )
659  .Position(wxALIGN_CENTER_VERTICAL | wxALL)
660  .Validator<FloatingPointValidator<float>>(
661  6, &mValues[p],
662  (range < 10
663  ? NumValidatorStyle::THREE_TRAILING_ZEROES
664  : range < 100
665  ? NumValidatorStyle::TWO_TRAILING_ZEROES
666  : NumValidatorStyle::ONE_TRAILING_ZERO),
667  mParameters[p].minValue, mParameters[p].maxValue)
668  .AddTextBox( {}, wxT(""), 12);
669 
670  wxString str = Internat::ToDisplayString(mParameters[p].minValue);
671  S.AddPrompt( Verbatim( str ) );
672 
673  S.Id(ID_Sliders + p);
674  mSliders[p] = S.ToolTip( Verbatim( tip ) )
675  .Name( Verbatim( labelText ) )
676  .Style(wxSL_HORIZONTAL)
677  .MinSize( { 150, -1 } )
678  .AddSlider( {}, 0, 1000, 0);
679 
680  str = Internat::ToDisplayString(mParameters[p].maxValue);
681  S.AddUnits( Verbatim( str ) );
682  }
683  }
684  }
685  S.EndMultiColumn();
686  }
687  S.EndStatic();
688  }
689  S.EndScroller();
690 
691  scroller->SetScrollRate(0, 20);
692 
693  return;
694 }

References ShuttleGuiBase::AddCheckBox(), ShuttleGuiBase::AddChoice(), ShuttleGuiBase::AddPrompt(), ShuttleGui::AddSpace(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::AddUnits(), ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), ShuttleGui::Id(), ID_Choices, ID_Program, ID_Sliders, ID_Texts, ID_Toggles, mChoices, mFields, ShuttleGui::MinSize(), mLabels, mParameters, mPlugin, mProgram, mSliders, mToggles, mValues, name, ShuttleGui::Name(), ShuttleGui::Position(), ArrayOf< X >::reinit(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGui::Style(), Internat::ToDisplayString(), ShuttleGui::ToolTip(), ShuttleGui::Validator(), Verbatim(), XO, and XXO.

Here is the call graph for this function:

◆ Process()

bool VampEffect::Process ( )
overridevirtual

!! todo: retain parameters previously set

Reimplemented from Effect.

Definition at line 344 of file VampEffect.cpp.

345 {
346  if (!mPlugin)
347  {
348  return false;
349  }
350 
351  int count = 0;
352 
353  bool multiple = false;
354  unsigned prevTrackChannels = 0;
355 
356  if (GetNumWaveGroups() > 1)
357  {
358  // if there is another track beyond this one and any linked one,
359  // then we're processing more than one track. That means we
360  // should use the originating track name in each NEW label
361  // track's name, to make clear which is which
362  multiple = true;
363  }
364 
365  std::vector<std::shared_ptr<Effect::AddedAnalysisTrack>> addedTracks;
366 
367  for (auto leader : inputTracks()->Leaders<const WaveTrack>())
368  {
369  auto channelGroup = TrackList::Channels(leader);
370  auto left = *channelGroup.first++;
371 
372  unsigned channels = 1;
373 
374  // channelGroup now contains all but the first channel
375  const WaveTrack *right =
376  channelGroup.size() ? *channelGroup.first++ : nullptr;
377  if (right)
378  channels = 2;
379 
380  sampleCount start = 0;
381  sampleCount len = 0;
382  GetBounds(*left, right, &start, &len);
383 
384  // TODO: more-than-two-channels
385 
386  size_t step = mPlugin->getPreferredStepSize();
387  size_t block = mPlugin->getPreferredBlockSize();
388 
389  bool initialiseRequired = true;
390 
391  if (block == 0)
392  {
393  if (step != 0)
394  {
395  block = step;
396  }
397  else
398  {
399  block = 1024;
400  }
401  }
402 
403  if (step == 0)
404  {
405  step = block;
406  }
407 
408  if (prevTrackChannels > 0)
409  {
410  // Plugin has already been initialised, so if the number of
411  // channels remains the same, we only need to do a reset.
412  // Otherwise we need to re-construct the whole plugin,
413  // because a Vamp plugin can't be re-initialised.
414  if (prevTrackChannels == channels)
415  {
416  mPlugin->reset();
417  initialiseRequired = false;
418  }
419  else
420  {
422  Init();
423  }
424  }
425 
426  if (initialiseRequired)
427  {
428  if (!mPlugin->initialise(channels, step, block))
429  {
431  XO("Sorry, Vamp Plug-in failed to initialize.") );
432  return false;
433  }
434  }
435 
436  const auto effectName = GetSymbol().Translation();
437  addedTracks.push_back(AddAnalysisTrack(
438  multiple
439  ? wxString::Format( _("%s: %s"), left->GetName(), effectName )
440  : effectName
441  ));
442  LabelTrack *ltrack = addedTracks.back()->get();
443 
444  FloatBuffers data{ channels, block };
445 
446  auto originalLen = len;
447 
448  auto pos = start;
449 
450  while (len != 0)
451  {
452  const auto request = limitSampleBufferSize( block, len );
453 
454  if (left)
455  {
456  left->GetFloats(data[0].get(), pos, request);
457  }
458 
459  if (right)
460  {
461  right->GetFloats(data[1].get(), pos, request);
462  }
463 
464  if (request < block)
465  {
466  for (unsigned int c = 0; c < channels; ++c)
467  {
468  for (decltype(block) i = request; i < block; ++i)
469  {
470  data[c][i] = 0.f;
471  }
472  }
473  }
474 
475  // UNSAFE_SAMPLE_COUNT_TRUNCATION
476  // Truncation in case of very long tracks!
477  Vamp::RealTime timestamp = Vamp::RealTime::frame2RealTime(
478  long( pos.as_long_long() ),
479  (int)(mRate + 0.5)
480  );
481 
482  Vamp::Plugin::FeatureSet features = mPlugin->process(
483  reinterpret_cast< float** >( data.get() ), timestamp);
484  AddFeatures(ltrack, features);
485 
486  if (len > (int)step)
487  {
488  len -= step;
489  }
490  else
491  {
492  len = 0;
493  }
494 
495  pos += step;
496 
497  if (channels > 1)
498  {
499  if (TrackGroupProgress(count,
500  (pos - start).as_double() /
501  originalLen.as_double() ))
502  {
503  return false;
504  }
505  }
506  else
507  {
508  if (TrackProgress(count,
509  (pos - start).as_double() /
510  originalLen.as_double() ))
511  {
512  return false;
513  }
514  }
515  }
516 
517  Vamp::Plugin::FeatureSet features = mPlugin->getRemainingFeatures();
518  AddFeatures(ltrack, features);
519 
520  prevTrackChannels = channels;
521  }
522 
523  // All completed without cancellation, so commit the addition of tracks now
524  for (auto &addedTrack : addedTracks)
525  addedTrack->Commit();
526 
527  return true;
528 }

References _, Effect::AddAnalysisTrack(), AddFeatures(), TrackList::Channels(), Effect::GetBounds(), WaveTrack::GetFloats(), Effect::GetNumWaveGroups(), GetSymbol(), Init(), Effect::inputTracks(), limitSampleBufferSize(), Effect::MessageBox(), mPlugin, mRate, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::size(), Effect::TrackGroupProgress(), Effect::TrackProgress(), ComponentInterfaceSymbol::Translation(), and XO.

Here is the call graph for this function:

◆ SetAutomationParameters()

bool VampEffect::SetAutomationParameters ( CommandParameters parms)
overridevirtual

Reimplemented from Effect.

Definition at line 194 of file VampEffect.cpp.

195 {
196  // First pass verifies values
197  for (size_t p = 0, paramCount = mParameters.size(); p < paramCount; p++)
198  {
199  wxString key = wxString::FromUTF8(mParameters[p].identifier.c_str());
200  float lower = mParameters[p].minValue;
201  float upper = mParameters[p].maxValue;
202  bool good = false;
203 
204  if (mParameters[p].isQuantized &&
205  mParameters[p].quantizeStep == 1.0 &&
206  lower == 0.0 &&
207  upper == 1.0)
208  {
209  bool val;
210 
211  good = parms.Read(key, &val);
212  }
213  else if (mParameters[p].isQuantized &&
214  mParameters[p].quantizeStep == 1.0 &&
215  !mParameters[p].valueNames.empty())
216  {
217  std::vector<EnumValueSymbol> choices;
218  int val;
219 
220  for (size_t i = 0, choiceCount = mParameters[p].valueNames.size(); i < choiceCount; i++)
221  {
222  wxString choice = wxString::FromUTF8(mParameters[p].valueNames[i].c_str());
223  choices.push_back(choice);
224  }
225 
226  good = parms.ReadEnum(key, &val, choices.data(), choices.size()) && val != wxNOT_FOUND;
227  }
228  else
229  {
230  double val;
231 
232  good = parms.Read(key, &val) && val >= lower && val <= upper;
233  }
234 
235  if (!good)
236  {
237  return false;
238  }
239  }
240 
241  // Second pass sets the variables
242  for (size_t p = 0, paramCount = mParameters.size(); p < paramCount; p++)
243  {
244  wxString key = wxString::FromUTF8(mParameters[p].identifier.c_str());
245  float lower = mParameters[p].minValue;
246  float upper = mParameters[p].maxValue;
247 
248  if (mParameters[p].isQuantized &&
249  mParameters[p].quantizeStep == 1.0 &&
250  lower == 0.0 &&
251  upper == 1.0)
252  {
253  bool val;
254 
255  parms.Read(key, &val);
256 
257  mPlugin->setParameter(mParameters[p].identifier, val ? upper : lower);
258  }
259  else if (mParameters[p].isQuantized &&
260  mParameters[p].quantizeStep == 1.0 &&
261  !mParameters[p].valueNames.empty())
262  {
263  std::vector<EnumValueSymbol> choices;
264  int val = 0;
265 
266  for (size_t i = 0, choiceCount = mParameters[p].valueNames.size(); i < choiceCount; i++)
267  {
268  wxString choice = wxString::FromUTF8(mParameters[p].valueNames[i].c_str());
269  choices.push_back(choice);
270  }
271 
272  parms.ReadEnum(key, &val, choices.data(), choices.size());
273 
274  mPlugin->setParameter(mParameters[p].identifier, (float) val);
275  }
276  else
277  {
278  double val;
279 
280  parms.Read(key, &val);
281 
282  if (mParameters[p].isQuantized)
283  {
284  float qs = mParameters[p].quantizeStep;
285 
286  if (qs != 0.0)
287  {
288  val = (int)((val - lower) / qs + 0.5) * qs + lower;
289  }
290  }
291 
292  mPlugin->setParameter(mParameters[p].identifier, val);
293  }
294  }
295 
296  return true;
297 }

References key, mParameters, mPlugin, and CommandParameters::ReadEnum().

Here is the call graph for this function:

◆ TransferDataFromWindow()

bool VampEffect::TransferDataFromWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 708 of file VampEffect.cpp.

709 {
710  if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
711  {
712  return false;
713  }
714 
715  return true;
716 }

References Effect::mUIParent.

◆ TransferDataToWindow()

bool VampEffect::TransferDataToWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 696 of file VampEffect.cpp.

697 {
698  if (!mUIParent->TransferDataToWindow())
699  {
700  return false;
701  }
702 
704 
705  return true;
706 }

References Effect::mUIParent, and UpdateFromPlugin().

Here is the call graph for this function:

◆ UpdateFromPlugin()

void VampEffect::UpdateFromPlugin ( )
private

Definition at line 750 of file VampEffect.cpp.

751 {
752  for (size_t p = 0, cnt = mParameters.size(); p < cnt; p++)
753  {
754  float value = mPlugin->getParameter(mParameters[p].identifier);
755 
756  if (mParameters[p].isQuantized &&
757  mParameters[p].quantizeStep == 1.0 &&
758  mParameters[p].minValue == 0.0 &&
759  mParameters[p].maxValue == 1.0)
760  {
761  mToggles[p]->SetValue(value > 0.5);
762  }
763  else if (mParameters[p].isQuantized &&
764  mParameters[p].quantizeStep == 1.0 &&
765  !mParameters[p].valueNames.empty())
766  {
767  mChoices[p]->SetSelection(size_t(value - mParameters[p].minValue + 0.5));
768  }
769  else
770  {
771  mValues[p] = value;
772  mFields[p]->GetValidator()->TransferToWindow();
773 
774  float lower = mParameters[p].minValue;
775  float upper = mParameters[p].maxValue;
776  float range = upper - lower;
777 
778  if (mParameters[p].isQuantized)
779  {
780  float qs = mParameters[p].quantizeStep;
781 
782  if (qs != 0.0)
783  {
784  value = (int)((value - lower) / qs + 0.5) * qs + lower;
785  }
786  }
787 
788  mSliders[p]->SetValue((int)(((value - lower) / range) * 1000.0 + 0.5));
789  }
790  }
791 }

References mChoices, mFields, mParameters, mPlugin, mSliders, mToggles, and mValues.

Referenced by OnChoice(), and TransferDataToWindow().

Here is the caller graph for this function:

Member Data Documentation

◆ mChoices

ArrayOf<wxChoice *> VampEffect::mChoices
private

Definition at line 106 of file VampEffect.h.

Referenced by PopulateOrExchange(), and UpdateFromPlugin().

◆ mFields

ArrayOf<wxTextCtrl *> VampEffect::mFields
private

Definition at line 103 of file VampEffect.h.

Referenced by OnSlider(), OnTextCtrl(), PopulateOrExchange(), and UpdateFromPlugin().

◆ mHasParameters

bool VampEffect::mHasParameters
private

Definition at line 89 of file VampEffect.h.

Referenced by IsInteractive().

◆ mInSlider

bool VampEffect::mInSlider
private

Definition at line 95 of file VampEffect.h.

◆ mInText

bool VampEffect::mInText
private

Definition at line 96 of file VampEffect.h.

◆ mKey

Vamp::HostExt::PluginLoader::PluginKey VampEffect::mKey
private

Definition at line 91 of file VampEffect.h.

Referenced by Init().

◆ mLabels

ArrayOf<wxStaticText *> VampEffect::mLabels
private

Definition at line 104 of file VampEffect.h.

Referenced by PopulateOrExchange().

◆ mName

wxString VampEffect::mName
private

Definition at line 92 of file VampEffect.h.

Referenced by GetSymbol().

◆ mOutput

int VampEffect::mOutput
private

Definition at line 88 of file VampEffect.h.

Referenced by AddFeatures().

◆ mParameters

Vamp::Plugin::ParameterList VampEffect::mParameters
private

◆ mPath

PluginPath VampEffect::mPath
private

Definition at line 87 of file VampEffect.h.

Referenced by GetPath().

◆ mPlugin

std::unique_ptr<Vamp::Plugin> VampEffect::mPlugin
private

◆ mProgram

wxChoice* VampEffect::mProgram
private

Definition at line 107 of file VampEffect.h.

Referenced by PopulateOrExchange().

◆ mRate

double VampEffect::mRate
private

Definition at line 93 of file VampEffect.h.

Referenced by Init(), and Process().

◆ mSliders

ArrayOf<wxSlider *> VampEffect::mSliders
private

Definition at line 102 of file VampEffect.h.

Referenced by OnTextCtrl(), PopulateOrExchange(), and UpdateFromPlugin().

◆ mToggles

ArrayOf<wxCheckBox *> VampEffect::mToggles
private

Definition at line 105 of file VampEffect.h.

Referenced by OnCheckBox(), PopulateOrExchange(), and UpdateFromPlugin().

◆ mValues

Floats VampEffect::mValues
private

Definition at line 100 of file VampEffect.h.

Referenced by OnSlider(), OnTextCtrl(), PopulateOrExchange(), and UpdateFromPlugin().


The documentation for this class was generated from the following files:
ShuttleGuiBase::AddChoice
wxChoice * AddChoice(const TranslatableString &Prompt, const TranslatableStrings &choices, int Selected=-1)
Definition: ShuttleGui.cpp:398
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
CommandParameters::WriteEnum
bool WriteEnum(const wxString &key, int value, const EnumValueSymbol choices[], size_t nChoices)
Definition: EffectAutomationParameters.h:202
ShuttleGuiBase::AddCheckBox
wxCheckBox * AddCheckBox(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:309
VampEffect::mPath
PluginPath mPath
Definition: VampEffect.h:87
VampEffect::mKey
Vamp::HostExt::PluginLoader::PluginKey mKey
Definition: VampEffect.h:91
ComponentInterfaceSymbol::Translation
const wxString Translation() const
Definition: ComponentInterfaceSymbol.h:58
VampEffect::Init
bool Init() override
Definition: VampEffect.cpp:299
TranslatableStrings
std::vector< TranslatableString > TranslatableStrings
Definition: TranslatableString.h:295
Effect::MessageBox
int MessageBox(const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
Definition: Effect.cpp:2482
ShuttleGui::ToolTip
ShuttleGui & ToolTip(const TranslatableString &tip)
Definition: ShuttleGui.h:656
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1484
Format
Abstract base class used in importing a file.
ArrayOf::reinit
void reinit(Integral count, bool initialize=false)
Definition: MemoryX.h:57
VampEffect::mOutput
int mOutput
Definition: VampEffect.h:88
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2459
ID_Program
@ ID_Program
Definition: VampEffect.cpp:48
ShuttleGui::MinSize
ShuttleGui & MinSize()
Definition: ShuttleGui.h:733
XO
#define XO(s)
Definition: Internat.h:31
ClientData::Site::size
size_t size() const
How many attachment pointers are in the Site.
Definition: ClientData.h:251
LabelTrack
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:88
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
VampEffect::mName
wxString mName
Definition: VampEffect.h:92
VampEffect::mToggles
ArrayOf< wxCheckBox * > mToggles
Definition: VampEffect.h:105
VampEffect::mValues
Floats mValues
Definition: VampEffect.h:100
VampEffect::mParameters
Vamp::Plugin::ParameterList mParameters
Definition: VampEffect.h:98
VampEffect::mChoices
ArrayOf< wxChoice * > mChoices
Definition: VampEffect.h:106
Effect::AddAnalysisTrack
std::shared_ptr< AddedAnalysisTrack > AddAnalysisTrack(const wxString &name=wxString())
Definition: Effect.cpp:2135
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2274
VampEffect::mPlugin
std::unique_ptr< Vamp::Plugin > mPlugin
Definition: VampEffect.h:86
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:971
CommandParameters::ReadEnum
bool ReadEnum(const wxString &key, int *pi, const EnumValueSymbol choices[], size_t nChoices, const ObsoleteMap obsoletes[]=nullptr, size_t nObsoletes=0) const
Definition: EffectAutomationParameters.h:165
ShuttleGui::Style
ShuttleGui & Style(long iStyle)
Definition: ShuttleGui.h:727
Effect::mProjectRate
double mProjectRate
Definition: Effect.h:458
VampEffect::AddFeatures
void AddFeatures(LabelTrack *track, Vamp::Plugin::FeatureSet &features)
Definition: VampEffect.cpp:720
VampEffect::UpdateFromPlugin
void UpdateFromPlugin()
Definition: VampEffect.cpp:750
ID_Toggles
@ ID_Toggles
Definition: VampEffect.cpp:52
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:938
Effect::inputTracks
const TrackList * inputTracks() const
Definition: Effect.h:463
ArraysOf< float >
label
TranslatableString label
Definition: Tags.cpp:756
ShuttleGuiBase::AddTextBox
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:638
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ShuttleGuiBase::AddUnits
void AddUnits(const TranslatableString &Prompt, int wrapWidth=0)
Left aligned text string.
Definition: ShuttleGui.cpp:263
anonymous_namespace{TimeTrack.cpp}::GetRate
double GetRate()
Definition: TimeTrack.cpp:175
name
const TranslatableString name
Definition: Distortion.cpp:98
ShuttleGui::Validator
ShuttleGui & Validator(const Factory &f)
Definition: ShuttleGui.h:678
VampEffect::mLabels
ArrayOf< wxStaticText * > mLabels
Definition: VampEffect.h:104
VAMPEFFECTS_FAMILY
#define VAMPEFFECTS_FAMILY
Definition: VampEffect.h:32
VampEffect::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: VampEffect.cpp:95
VampEffect::mSliders
ArrayOf< wxSlider * > mSliders
Definition: VampEffect.h:102
VampEffect::mRate
double mRate
Definition: VampEffect.h:93
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
LAT1CTOWX
#define LAT1CTOWX(X)
Definition: Internat.h:160
ShuttleGui::Name
ShuttleGui & Name(const TranslatableString &name)
Definition: ShuttleGui.h:663
Effect::GetNumWaveGroups
int GetNumWaveGroups()
Definition: Effect.h:346
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:201
ShuttleGui::Position
ShuttleGui & Position(int flags)
Definition: ShuttleGui.h:712
VampEffect::mFields
ArrayOf< wxTextCtrl * > mFields
Definition: VampEffect.h:103
Effect::mUIParent
wxWindow * mUIParent
Definition: Effect.h:478
_
#define _(s)
Definition: Internat.h:75
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
ID_Sliders
@ ID_Sliders
Definition: VampEffect.cpp:49
EffectTypeAnalyze
@ EffectTypeAnalyze
Definition: EffectInterface.h:60
Effect::GetBounds
void GetBounds(const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
Definition: Effect.cpp:2041
ID_Choices
@ ID_Choices
Definition: VampEffect.cpp:50
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
VampEffect::mHasParameters
bool mHasParameters
Definition: VampEffect.h:89
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:238
Internat::ToDisplayString
static wxString ToDisplayString(double numberToConvert, int digitsAfterDecimalPoint=-1)
Convert a number to a string, uses the user's locale's decimal separator.
Definition: Internat.cpp:162
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
VampEffect::mProgram
wxChoice * mProgram
Definition: VampEffect.h:107
ShuttleGuiBase::SetStretchyCol
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:202
limitSampleBufferSize
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: SampleCount.cpp:23
Effect::TrackGroupProgress
bool TrackGroupProgress(int whichGroup, double frac, const TranslatableString &={})
Definition: Effect.cpp:2033
WaveTrack::GetFloats
bool GetFloats(float *buffer, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const
Retrieve samples from a track in floating-point format, regardless of the storage format.
Definition: WaveTrack.h:265
Effect::TrackProgress
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={})
Definition: Effect.cpp:2025
SelectedRegion
Defines a selected portion of a project.
Definition: SelectedRegion.h:35
ID_Texts
@ ID_Texts
Definition: VampEffect.cpp:51