Audacity 3.2.0
|
An Effect that calls up a Nyquist (XLISP) plug-in, i.e. many possible effects from this one class. More...
#include <NyquistBase.h>
Classes | |
struct | ExecFromMainHook |
struct | GetDisplaysHook |
struct | GetEffectHook |
struct | NyxContext |
struct | ShowDebugOutputHook |
struct | Tokenizer |
struct | YieldIfNeededHook |
Public Member Functions | |
NyquistBase (const wxString &fName) | |
virtual | ~NyquistBase () |
PluginPath | GetPath () const override |
ComponentInterfaceSymbol | GetSymbol () const override |
VendorSymbol | GetVendor () const override |
wxString | GetVersion () const override |
TranslatableString | GetDescription () const override |
ManualPageID | ManualPage () const override |
Name of a page in the Audacity alpha manual, default is empty. More... | |
FilePath | HelpPage () const override |
Fully qualified local help file name, default is empty. More... | |
EffectType | GetType () const override |
Type determines how it behaves. More... | |
EffectType | GetClassification () const override |
Determines which menu it appears in; default same as GetType(). More... | |
EffectFamilySymbol | GetFamily () const override |
Report identifier and user-visible name of the effect protocol. More... | |
bool | IsInteractive () const override |
Whether the effect needs a dialog for entry of settings. More... | |
bool | IsDefault () const override |
Whether the effect sorts "above the line" in the menus. More... | |
bool | EnablesDebug () const override |
Whether the effect dialog should have a Debug button; default, always false. More... | |
bool | SaveSettings (const EffectSettings &settings, CommandParameters &parms) const override |
Store settings as keys and values. More... | |
bool | LoadSettings (const CommandParameters &parms, EffectSettings &settings) const override |
Restore settings from keys and values. More... | |
bool | DoLoadSettings (const CommandParameters &parms, EffectSettings &settings) |
bool | VisitSettings (SettingsVisitor &visitor, EffectSettings &settings) override |
bool | VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const override |
int | SetLispVarsFromParameters (const CommandParameters &parms, bool bTestOnly) |
bool | Init () override |
bool | Process (EffectInstance &instance, EffectSettings &settings) override |
void | RedirectOutput () |
void | SetCommand (const wxString &cmd) |
void | Continue () |
void | Break () |
void | Stop () |
bool | IsOk () |
Public Member Functions inherited from EffectWithSettings< NyquistSettings, StatefulEffect > | |
EffectSettings | MakeSettings () const override |
bool | CopySettingsContents (const EffectSettings &src, EffectSettings &dst) const override |
Public Member Functions inherited from StatefulEffect | |
~StatefulEffect () override | |
std::shared_ptr< EffectInstance > | MakeInstance () const override |
Make an object maintaining short-term state of an Effect. More... | |
Public Member Functions inherited from StatefulEffectBase | |
virtual bool | Init () |
virtual bool | Process (EffectInstance &instance, EffectSettings &settings)=0 |
virtual bool | RealtimeInitialize (EffectSettings &settings, double sampleRate) |
virtual bool | RealtimeAddProcessor (EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate) |
virtual bool | RealtimeSuspend () |
virtual bool | RealtimeResume () |
virtual bool | RealtimeProcessStart (MessagePackage &package) |
settings are possibly changed, since last call, by an asynchronous dialog More... | |
virtual size_t | RealtimeProcess (size_t group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples) |
virtual bool | RealtimeProcessEnd (EffectSettings &settings) noexcept |
settings can be updated to let a dialog change appearance at idle More... | |
virtual bool | RealtimeFinalize (EffectSettings &settings) noexcept |
virtual size_t | SetBlockSize (size_t maxBlockSize) |
virtual size_t | GetBlockSize () const |
virtual unsigned | GetAudioInCount () const |
How many input buffers to allocate at once. More... | |
virtual unsigned | GetAudioOutCount () const |
How many output buffers to allocate at once. More... | |
virtual sampleCount | GetLatency () const |
virtual bool | NeedsDither () const |
virtual bool | ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr) |
virtual bool | ProcessFinalize () noexcept |
Public Member Functions inherited from Effect | |
Effect () | |
virtual | ~Effect () |
PluginPath | GetPath () const override |
bool | VisitSettings (SettingsVisitor &visitor, EffectSettings &settings) override |
bool | VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const override |
ComponentInterfaceSymbol | GetSymbol () const override |
VendorSymbol | GetVendor () const override |
wxString | GetVersion () const override |
TranslatableString | GetDescription () const override |
EffectFamilySymbol | GetFamily () const override |
Report identifier and user-visible name of the effect protocol. More... | |
bool | IsInteractive () const override |
Whether the effect needs a dialog for entry of settings. More... | |
bool | IsDefault () const override |
Whether the effect sorts "above the line" in the menus. More... | |
RealtimeSince | RealtimeSupport () const override |
Since which version of Audacity has the effect supported realtime? More... | |
bool | SupportsAutomation () const override |
Whether the effect has any automatable controls. More... | |
bool | SaveSettings (const EffectSettings &settings, CommandParameters &parms) const override |
Store settings as keys and values. More... | |
bool | LoadSettings (const CommandParameters &parms, EffectSettings &settings) const override |
Restore settings from keys and values. More... | |
OptionalMessage | LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const override |
bool | SaveUserPreset (const RegistryPath &name, const EffectSettings &settings) const override |
Save settings in the configuration file as a user-named preset. More... | |
RegistryPaths | GetFactoryPresets () const override |
Report names of factory presets. More... | |
OptionalMessage | LoadFactoryPreset (int id, EffectSettings &settings) const override |
OptionalMessage | LoadFactoryDefaults (EffectSettings &settings) const override |
virtual const EffectParameterMethods & | Parameters () const |
bool | CanExportPresets () const override |
Whether the effect supports export of presets to files, and importing too. More... | |
bool | HasOptions () const override |
const EffectSettingsManager & | GetDefinition () const override |
virtual NumericFormatID | GetSelectionFormat () |
bool | SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const override |
OptionalMessage | LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const override |
bool | IsBatchProcessing () const override |
void | SetBatchProcessing () override |
void | UnsetBatchProcessing () override |
unsigned | TestUIFlags (unsigned mask) |
bool | Delegate (Effect &delegate, EffectSettings &settings, InstanceFinder finder={}) |
Re-invoke DoEffect on another Effect object that implements the work. More... | |
Public Member Functions inherited from EffectBase | |
EffectBase () | |
~EffectBase () override | |
bool | IsLinearEffect () const |
bool | PreviewsFullSelection () const |
void | SetTracks (TrackList *pTracks) |
double | GetDefaultDuration () |
virtual std::any | BeginPreview (const EffectSettings &settings) |
Called when Preview() starts, to allow temporary effect state changes. More... | |
bool | DoEffect (EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess) override |
virtual double | CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const =0 |
void | CountWaveTracks () |
Public Member Functions inherited from EffectPlugin | |
EffectPlugin & | operator= (EffectPlugin &)=delete |
virtual | ~EffectPlugin () |
virtual bool | HasOptions () const =0 |
virtual bool | CanExportPresets () const =0 |
Whether the effect supports export of presets to files, and importing too. More... | |
virtual const EffectSettingsManager & | GetDefinition () const =0 |
virtual bool | SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const =0 |
virtual OptionalMessage | LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const =0 |
virtual bool | IsBatchProcessing () const =0 |
virtual void | SetBatchProcessing ()=0 |
virtual void | UnsetBatchProcessing ()=0 |
virtual bool | DoEffect (EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess=nullptr)=0 |
Public Member Functions inherited from EffectInstanceFactory | |
virtual | ~EffectInstanceFactory () |
virtual std::shared_ptr< EffectInstance > | MakeInstance () const =0 |
Make an object maintaining short-term state of an Effect. More... | |
Public Member Functions inherited from EffectSettingsManager | |
virtual | ~EffectSettingsManager () |
virtual bool | VisitSettings (SettingsVisitor &visitor, EffectSettings &settings) |
virtual bool | VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const |
virtual std::unique_ptr< EffectOutputs > | MakeOutputs () const |
Produce an object to hold values to send to effect output meters. More... | |
Public Member Functions inherited from EffectDefinitionInterface | |
virtual | ~EffectDefinitionInterface () |
virtual EffectType | GetType () const =0 |
Type determines how it behaves. More... | |
virtual EffectType | GetClassification () const |
Determines which menu it appears in; default same as GetType(). More... | |
virtual EffectFamilySymbol | GetFamily () const =0 |
Report identifier and user-visible name of the effect protocol. More... | |
virtual bool | IsInteractive () const =0 |
Whether the effect needs a dialog for entry of settings. More... | |
virtual bool | IsDefault () const =0 |
Whether the effect sorts "above the line" in the menus. More... | |
virtual RealtimeSince | RealtimeSupport () const =0 |
Since which version of Audacity has the effect supported realtime? More... | |
bool | SupportsRealtime () const |
virtual bool | SupportsAutomation () const =0 |
Whether the effect has any automatable controls. More... | |
virtual bool | EnablesDebug () const |
Whether the effect dialog should have a Debug button; default, always false. More... | |
virtual ManualPageID | ManualPage () const |
Name of a page in the Audacity alpha manual, default is empty. More... | |
virtual FilePath | HelpPage () const |
Fully qualified local help file name, default is empty. More... | |
virtual bool | IsHiddenFromMenus () const |
Default is false. More... | |
Public Member Functions inherited from ComponentInterface | |
virtual | ~ComponentInterface () |
virtual PluginPath | GetPath () const =0 |
virtual ComponentInterfaceSymbol | GetSymbol () const =0 |
virtual VendorSymbol | GetVendor () const =0 |
virtual wxString | GetVersion () const =0 |
virtual TranslatableString | GetDescription () const =0 |
TranslatableString | GetName () const |
Public Attributes | |
std::vector< NyqControl > | mControls |
Public Attributes inherited from EffectBase | |
std::shared_ptr< TrackList > | mTracks {} |
int | mNumTracks {} |
BasicUI::ProgressDialog * | mProgress {} |
double | mProjectRate {} |
WaveTrackFactory * | mFactory {} |
double | mT0 {} |
double | mT1 {} |
bool | mIsPreview { false } |
Protected Member Functions | |
bool | ParseCommand (const wxString &cmd) |
bool | validatePath (wxString path) |
wxString | ToTimeFormat (double t) |
Protected Member Functions inherited from Effect | |
bool | CheckWhetherSkipEffect (const EffectSettings &settings) const override |
Default implementation returns false. More... | |
double | CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const override |
Default implementation returns previewLength More... | |
bool | TotalProgress (double frac, const TranslatableString &={}) const |
bool | TrackProgress (int whichTrack, double frac, const TranslatableString &={}) const |
bool | TrackGroupProgress (int whichGroup, double frac, const TranslatableString &={}) const |
int | GetNumWaveTracks () const |
int | GetNumWaveGroups () const |
void | GetBounds (const WaveTrack &track, sampleCount *start, sampleCount *len) |
Protected Member Functions inherited from EffectBase | |
virtual bool | CheckWhetherSkipEffect (const EffectSettings &settings) const =0 |
After Init(), tell whether Process() should be skipped. More... | |
void | SetLinearEffectFlag (bool linearEffectFlag) |
void | SetPreviewFullSelectionFlag (bool previewDurationFlag) |
bool | IsPreviewing () const |
const TrackList * | inputTracks () const |
const AudacityProject * | FindProject () const |
Static Protected Member Functions | |
static double | GetCtrlValue (const wxString &s) |
static void | resolveFilePath (wxString &path, FileExtension extension={}) |
Private Member Functions | |
bool | ProcessOne (NyxContext &nyxContext, EffectOutputTracks *pOutputs) |
const TranslatableString & | InitializationError () const |
wxString | EscapeString (const wxString &inStr) |
FileExtensions | ParseFileExtensions (const wxString &text) |
FileNames::FileType | ParseFileType (const wxString &text) |
FileNames::FileTypes | ParseFileTypes (const wxString &text) |
void | OutputCallback (int c) |
void | OSCallback () |
void | ParseFile () |
bool | ParseProgram (wxInputStream &stream) |
bool | Parse (Tokenizer &tokenizer, const wxString &line, bool eof, bool first) |
std::pair< bool, FilePath > | CheckHelpPage () const |
Static Private Member Functions | |
static FilePaths | GetNyquistSearchPath () |
static wxString | NyquistToWxString (const char *nyqString) |
static std::vector< EnumValueSymbol > | ParseChoice (const wxString &text) |
static void | StaticOutputCallback (int c, void *userdata) |
static void | StaticOSCallback (void *userdata) |
static TranslatableString | UnQuoteMsgid (const wxString &s, bool allowParens=true, wxString *pExtraString=nullptr) |
static wxString | UnQuote (const wxString &s, bool allowParens=true, wxString *pExtraString=nullptr) |
Static Private Attributes | |
static int | mReentryCount = 0 |
Friends | |
class | NyquistEffectsModule |
Additional Inherited Members | |
Public Types inherited from StatefulEffectBase | |
using | MessagePackage = EffectInstance::MessagePackage |
Public Types inherited from EffectPlugin | |
using | EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess > |
using | InstancePointer = std::shared_ptr< EffectInstanceEx > |
using | InstanceFinder = std::function< std::optional< InstancePointer >(EffectSettings &settings) > |
Public Types inherited from EffectDefinitionInterface | |
enum class | RealtimeSince : unsigned { Never , After_3_1 , Always } |
In which versions of Audacity was an effect realtime capable? More... | |
Static Public Member Functions inherited from EffectWithSettings< NyquistSettings, StatefulEffect > | |
static NyquistSettings & | GetSettings (EffectSettings &settings) |
Assume settings originated from MakeSettings() and copies thereof. More... | |
static const NyquistSettings & | GetSettings (const EffectSettings &settings) |
Assume settings originated from MakeSettings() and copies thereof. More... | |
static NyquistSettings * | FetchParameters (StatefulEffect &, EffectSettings &s) |
Static Public Member Functions inherited from Effect | |
static Effect * | FetchParameters (Effect &e, EffectSettings &) |
Static Public Member Functions inherited from EffectBase | |
static std::optional< InstancePointer > | FindInstance (EffectPlugin &plugin) |
static InstanceFinder | DefaultInstanceFinder (EffectPlugin &plugin) |
Static Public Member Functions inherited from EffectDefinitionInterface | |
static Identifier | GetSquashedName (const Identifier &ident) |
A utility that strips spaces and CamelCases a name. More... | |
Static Public Attributes inherited from EffectPlugin | |
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>") |
An Effect that calls up a Nyquist (XLISP) plug-in, i.e. many possible effects from this one class.
Definition at line 75 of file NyquistBase.h.
NyquistBase::NyquistBase | ( | const wxString & | fName | ) |
fName | File name of the Nyquist script defining this effect. If an empty string, then prompt the user for the Nyquist code to interpret. |
Definition at line 56 of file NyquistBase.cpp.
References EffectTypeTool, mAction, mAuthor, mBreak, mCompiler, mCont, mCopyright, mDebug, mExternal, mFileModified, mFileName, mIsPrompt, mIsSal, mIsTool, mMaxLen, mMergeClips, mName, mOK, mPromptName, mPromptType, mRedirectOutput, mReleaseVersion, mRestoreSplits, mStop, mTrace, mType, mVersion, NYQ_MAX_LEN, NYQUIST_PROMPT_NAME, NYQUIST_WORKER_ID, ParseFile(), Verbatim(), and XO().
|
virtual |
Definition at line 116 of file NyquistBase.cpp.
void NyquistBase::Break | ( | ) |
|
private |
Definition at line 165 of file NyquistBase.cpp.
References GetNyquistSearchPath(), mHelpFile, and wxT().
Referenced by ParseProgram().
void NyquistBase::Continue | ( | ) |
bool NyquistBase::DoLoadSettings | ( | const CommandParameters & | parms, |
EffectSettings & | settings | ||
) |
Definition at line 354 of file NyquistBase.cpp.
References EffectTypeTool, Effect::IsBatchProcessing(), KEY_Command, KEY_Parameters, mExternal, mInputCmd, mIsPrompt, mIsTool, mParameters, mPromptType, mType, ParseCommand(), SetLispVarsFromParameters(), and CommandParameters::SetParameters().
Referenced by LoadSettings().
|
overridevirtual |
Whether the effect dialog should have a Debug button; default, always false.
Reimplemented from EffectDefinitionInterface.
Definition at line 220 of file NyquistBase.cpp.
References mDebugButton.
|
private |
Definition at line 1747 of file NyquistBase.cpp.
Referenced by Process(), and ProcessOne().
|
overridevirtual |
Determines which menu it appears in; default same as GetType().
Reimplemented from EffectDefinitionInterface.
Definition at line 193 of file NyquistBase.cpp.
References EffectTypeTool, mIsTool, and mType.
|
staticprotected |
Definition at line 1942 of file NyquistBase.cpp.
References Internat::CompatibleToDouble().
Referenced by Parse(), SaveSettings(), SetLispVarsFromParameters(), NyquistEffect::TransferDataFromEffectWindow(), and VisitSettings().
|
overridevirtual |
|
overridevirtual |
Report identifier and user-visible name of the effect protocol.
Reimplemented from Effect.
Definition at line 200 of file NyquistBase.cpp.
References NYQUISTEFFECTS_FAMILY.
|
staticprivate |
Definition at line 2750 of file NyquistBase.cpp.
References FileNames::AddUniquePathToPathList(), FileNames::AudacityPathList(), FileNames::PlugInDir(), and wxT().
Referenced by NyquistEffectsModule::AutoRegisterPlugins(), CheckHelpPage(), NyquistEffectsModule::FindModulePaths(), and Process().
|
overridevirtual |
Reimplemented from Effect.
Definition at line 122 of file NyquistBase.cpp.
References mFileName, mIsPrompt, and NYQUIST_PROMPT_ID.
|
overridevirtual |
Reimplemented from Effect.
Definition at line 130 of file NyquistBase.cpp.
References mIsPrompt, mName, NYQUIST_PROMPT_ID, and NYQUIST_PROMPT_NAME.
|
overridevirtual |
Type determines how it behaves.
Implements EffectDefinitionInterface.
Definition at line 188 of file NyquistBase.cpp.
References mType.
Referenced by Process(), and ProcessOne().
|
overridevirtual |
|
overridevirtual |
Reimplemented from Effect.
Definition at line 148 of file NyquistBase.cpp.
References mReleaseVersion, and TranslatableString::Translation().
|
overridevirtual |
Fully qualified local help file name, default is empty.
Reimplemented from EffectDefinitionInterface.
Definition at line 181 of file NyquistBase.cpp.
References mHelpPage.
|
overridevirtual |
Default implementation does nothing, returns true
Reimplemented from StatefulEffectBase.
Definition at line 491 of file NyquistBase.cpp.
References GlobalHook< GetDisplaysHook, std::vector< WaveChannelSubViewType >(const WaveTrack *)>::Call(), EffectBase::FindProject(), TrackList::Get(), SpectrogramSettings::Get(), BasicUI::MessageBoxOptions::IconStyle(), mDebugButton, mEnablePreview, EffectBase::mF0, EffectBase::mF1, mIsPrompt, mIsSpectral, mName, mPromptName, mPromptType, mType, mVersion, project, TrackList::Selected(), BasicUI::ShowMessageBox(), SpectrogramSettings::SpectralSelectionEnabled(), and XO().
|
inlineprivate |
Definition at line 172 of file NyquistBase.h.
Referenced by NyquistEffectsModule::DiscoverPluginsAtPath().
|
overridevirtual |
Whether the effect sorts "above the line" in the menus.
Reimplemented from Effect.
Definition at line 215 of file NyquistBase.cpp.
References mIsPrompt.
|
overridevirtual |
Whether the effect needs a dialog for entry of settings.
Reimplemented from Effect.
Definition at line 205 of file NyquistBase.cpp.
bool NyquistBase::IsOk | ( | ) |
Definition at line 2767 of file NyquistBase.cpp.
References mOK.
Referenced by NyquistEffectsModule::DiscoverPluginsAtPath().
|
overridevirtual |
Restore settings from keys and values.
Reimplemented from Effect.
Definition at line 347 of file NyquistBase.cpp.
References DoLoadSettings(), and settings().
Referenced by EVT_COMMAND_RANGE(), and VisitSettings().
|
overridevirtual |
Name of a page in the Audacity alpha manual, default is empty.
Reimplemented from EffectDefinitionInterface.
Definition at line 160 of file NyquistBase.cpp.
|
staticprivate |
Definition at line 1732 of file NyquistBase.cpp.
References _, LAT1CTOWX, and str.
Referenced by ProcessOne().
|
private |
Definition at line 2729 of file NyquistBase.cpp.
References GlobalHook< YieldIfNeededHook, void()>::Call(), mBreak, mCont, and mStop.
|
private |
Definition at line 2712 of file NyquistBase.cpp.
References mDebugOutputStr, and mRedirectOutput.
|
private |
Definition at line 2069 of file NyquistBase.cpp.
References NyqControl::choices, EffectTypeAnalyze, EffectTypeGenerate, EffectTypeProcess, EffectTypeTool, NyqControl::fileTypes, GetCtrlValue(), NyqControl::high, NyqControl::highStr, NyqControl::label, NyqControl::low, NyqControl::lowStr, mAction, make_iterator_range(), mAuthor, mCategories, mCompiler, mControls, mCopyright, mDebugButton, mEnablePreview, mFileName, mFoundType, mHelpFile, mInfo, mInitError, mIsSal, mIsSpectral, mIsTool, mManPage, mMaxLen, mMergeClips, mName, mOK, EffectBase::mPresetNames, mReleaseVersion, mRestoreSplits, mTrace, mType, mVersion, NyqControl::name, name, NYQ_CTRL_CHOICE, NYQ_CTRL_FILE, NYQ_CTRL_FLOAT, NYQ_CTRL_FLOAT_TEXT, NYQ_CTRL_INT, NYQ_CTRL_INT_TEXT, NYQ_CTRL_STRING, NYQ_CTRL_TEXT, NYQ_CTRL_TIME, ParseChoice(), ParseFileTypes(), EffectBase::SetLinearEffectFlag(), EffectBase::SetPreviewFullSelectionFlag(), str, NyqControl::ticks, NyquistBase::Tokenizer::Tokenize(), NyquistBase::Tokenizer::tokens, NyqControl::type, UnQuote(), NyqControl::val, NyqControl::valStr, NyqControl::var, wxT(), and XO().
Referenced by ParseProgram().
|
staticprivate |
Definition at line 1757 of file NyquistBase.cpp.
References label, NyquistBase::Tokenizer::Tokenize(), NyquistBase::Tokenizer::tokens, UnQuote(), and wxT().
Referenced by Parse().
|
protected |
Definition at line 2601 of file NyquistBase.cpp.
References ParseProgram(), and wxT().
Referenced by DoLoadSettings(), SetCommand(), and NyquistEffect::TransferDataFromPromptWindow().
|
private |
Definition at line 2593 of file NyquistBase.cpp.
References mFileName, and ParseProgram().
Referenced by NyquistBase().
|
private |
Definition at line 1789 of file NyquistBase.cpp.
References NyquistBase::Tokenizer::Tokenize(), NyquistBase::Tokenizer::tokens, UnQuote(), and wxT().
Referenced by ParseFileType().
|
private |
Definition at line 1803 of file NyquistBase.cpp.
References ParseFileExtensions(), NyquistBase::Tokenizer::Tokenize(), NyquistBase::Tokenizer::tokens, UnQuoteMsgid(), and wxT().
Referenced by ParseFileTypes().
|
private |
Definition at line 1818 of file NyquistBase.cpp.
References ParseFileType(), size, str, NyquistBase::Tokenizer::Tokenize(), NyquistBase::Tokenizer::tokens, UnQuote(), Verbatim(), and wxT().
Referenced by Parse().
|
private |
Definition at line 2492 of file NyquistBase.cpp.
References CheckHelpPage(), EffectTypeProcess, BasicUI::MessageBoxOptions::IconStyle(), mCategories, mCmd, mControls, mDebug, mDebugButton, mEnablePreview, mFoundType, mHelpFile, mHelpFileExists, mHelpPage, mInitError, mIsPrompt, mIsSal, mIsSpectral, mManPage, mTrace, mType, Parse(), BasicUI::ShowMessageBox(), wxT(), and XO().
Referenced by ParseCommand(), and ParseFile().
|
overridevirtual |
Implements StatefulEffectBase.
Definition at line 644 of file NyquistBase.cpp.
References TrackList::Any(), FileNames::AudacityPathList(), FileNames::BaseDir(), GlobalHook< ShowDebugOutputHook, void(const TranslatableString &title, const TranslatableString &message)>::Call(), FileNames::DataDir(), Effect::Delegate(), EffectTypeProcess, EffectTypeTool, details::end(), EscapeString(), EffectBase::FindProject(), TranslatableString::Format(), EffectManager::Get(), ProjectRate::Get(), ViewInfo::Get(), TrackList::Get(), PlatformCompatibility::GetDocumentsDir(), PlatformCompatibility::GetHomeDir(), Effect::GetNumWaveGroups(), GetNyquistSearchPath(), ProjectRate::GetRate(), EffectWithSettings< NyquistSettings, StatefulEffect >::GetSettings(), Languages::GetSystemLanguageCode(), PlatformCompatibility::GetTempDir(), GetType(), gPrefs, SyncLock::Group(), FileNames::HtmlHelpDir(), BasicUI::MessageBoxOptions::IconStyle(), Effect::IsBatchProcessing(), EffectBase::IsPreviewing(), mBreak, mCont, mControls, mCount, mDebug, mDebugOutput, mDebugOutputStr, EffectBase::mF0, EffectBase::mF1, mFirstInGroup, mHelpFile, mHelpFileExists, min(), mInputCmd, mIsPrompt, mMaxLen, mName, mNumSelectedChannels, mOutputTime, mPerTrackProps, mProjectChanged, mProps, mRedirectOutput, mReentryCount, mStop, EffectBase::mT0, EffectBase::mT1, mTrace, mTrackIndex, EffectBase::mTracks, mVersion, WaveTrack::NChannels(), EffectOutputTracks::nEffectsDone, NYQ_MAX_LEN, NYQUIST_WORKER_ID, FileNames::PlugInDir(), ProcessOne(), project, audacity::BasicSettings::Read(), RegisterFunctions(), ViewInfo::selectedRegion, EffectManager::SetSkipStateFlag(), settings(), BasicUI::ShowMessageBox(), AllProjects::size(), size, staffpad::audio::simd::sqrt(), StaticOSCallback(), StaticOutputCallback(), TempDirectory::TempDir(), Internat::ToString(), Effect::TotalProgress(), TranslatableString::Translation(), valueRestorer(), Verbatim(), wxT(), and XO().
|
private |
Definition at line 1139 of file NyquistBase.cpp.
References EffectOutputTracks::AddToOutputTracks(), TrackList::Any(), sampleCount::as_long_long(), details::begin(), GlobalHook< GetDisplaysHook, std::vector< WaveChannelSubViewType >(const WaveTrack *)>::Call(), EffectTypeGenerate, EffectTypeProcess, EffectTypeTool, TranslatableString::empty(), EscapeString(), floatSample, anonymous_namespace{ExportPCM.cpp}::format, EffectOutputTracks::Get(), SpectrogramSettings::Get(), anonymous_namespace{NyquistBase.cpp}::GetClipBoundaries(), LabelTrack::GetDefaultName(), EffectOutputTracks::GetMatchingInput(), WaveChannelUtilities::GetMinMax(), WaveChannelUtilities::GetRMS(), GetType(), SyncLock::Group(), EffectBase::inputTracks(), int16Sample, int24Sample, SyncLock::IsSyncLockSelected(), mCmd, mCompiler, mControls, mCount, NyquistBase::NyxContext::mCurChannelGroup, NyquistBase::NyxContext::mCurLen, NyquistBase::NyxContext::mCurNumChannels, NyquistBase::NyxContext::mCurTrack, mDebug, mDebugOutput, mExternal, mFirstInGroup, min(), mIsPrompt, mIsSal, mMergeClips, mName, mNumSelectedChannels, mOutputTime, NyquistBase::NyxContext::mOutputTrack, mPerTrackProps, NyquistBase::NyxContext::mpException, mProjectChanged, mProps, mRestoreSplits, EffectBase::mT0, EffectBase::mT1, mTrace, mTrackIndex, mVersion, NYQ_CTRL_CHOICE, NYQ_CTRL_FILE, NYQ_CTRL_FLOAT, NYQ_CTRL_FLOAT_TEXT, NYQ_CTRL_INT, NYQ_CTRL_INT_TEXT, NYQ_CTRL_STRING, NYQ_CTRL_TIME, NyquistToWxString(), BasicUI::ShowMessageBox(), SpectrogramSettings::SpectralSelectionEnabled(), NyquistBase::NyxContext::StaticGetCallback(), NyquistBase::NyxContext::StaticPutCallback(), str, Internat::ToString(), Effect::TrackGroupProgress(), Effect::TrackProgress(), TranslatableString::Translation(), Track::TypeSwitch(), UTF8CTOWX, Verbatim(), wxT(), and XO().
Referenced by Process().
void NyquistBase::RedirectOutput | ( | ) |
Definition at line 1860 of file NyquistBase.cpp.
References mRedirectOutput.
Referenced by NyqBench::OnGo().
|
staticprotected |
A file path given to Nyquist may be a platform-independent canonicalized form using certain abbreviations that are expanded into the platform-dependent equivalent.
If the path names only a directory, also append "/untitled" plus extension
Definition at line 2779 of file NyquistBase.cpp.
References _, FileNames::DataDir(), FileNames::DefaultToDocumentsFolder(), anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, FileNames::FindDefaultPath(), and PlatformCompatibility::GetHomeDir().
Referenced by NyquistEffect::BuildEffectWindow(), NyquistEffect::OnFileButton(), SaveSettings(), and NyquistEffect::TransferDataFromEffectWindow().
|
overridevirtual |
Store settings as keys and values.
The override may assume parms
is initially empty
Reimplemented from Effect.
Definition at line 295 of file NyquistBase.cpp.
References NyqControl::choices, GetCtrlValue(), KEY_Command, KEY_Parameters, mControls, mInputCmd, mIsPrompt, mParameters, NYQ_CTRL_CHOICE, NYQ_CTRL_FILE, NYQ_CTRL_FLOAT, NYQ_CTRL_FLOAT_TEXT, NYQ_CTRL_INT, NYQ_CTRL_INT_TEXT, NYQ_CTRL_STRING, NYQ_CTRL_TIME, resolveFilePath(), NyqControl::type, UNINITIALIZED_CONTROL, NyqControl::val, NyqControl::valStr, NyqControl::var, and CommandParameters::WriteEnum().
Referenced by EVT_COMMAND_RANGE(), and VisitSettings().
void NyquistBase::SetCommand | ( | const wxString & | cmd | ) |
Definition at line 1865 of file NyquistBase.cpp.
References mExternal, and ParseCommand().
Referenced by EVT_COMMAND_RANGE(), and NyqBench::OnGo().
int NyquistBase::SetLispVarsFromParameters | ( | const CommandParameters & | parms, |
bool | bTestOnly | ||
) |
Definition at line 421 of file NyquistBase.cpp.
References NyqControl::choices, GetCtrlValue(), NyqControl::high, NyqControl::low, mControls, NYQ_CTRL_CHOICE, NYQ_CTRL_FILE, NYQ_CTRL_FLOAT, NYQ_CTRL_FLOAT_TEXT, NYQ_CTRL_INT, NYQ_CTRL_INT_TEXT, NYQ_CTRL_STRING, NYQ_CTRL_TEXT, NYQ_CTRL_TIME, CommandParameters::ReadEnum(), NyqControl::type, UNINITIALIZED_CONTROL, NyqControl::val, NyqControl::valStr, and NyqControl::var.
Referenced by DoLoadSettings().
|
staticprivate |
Definition at line 2724 of file NyquistBase.cpp.
Referenced by Process().
|
staticprivate |
Definition at line 2707 of file NyquistBase.cpp.
Referenced by Process().
void NyquistBase::Stop | ( | ) |
Definition at line 1885 of file NyquistBase.cpp.
References mStop.
Referenced by NyqBench::OnStop().
|
protected |
Definition at line 2847 of file NyquistBase.cpp.
Referenced by NyquistEffect::OnTime().
|
staticprivate |
Definition at line 1936 of file NyquistBase.cpp.
References TranslatableString::Translation(), and UnQuoteMsgid().
Referenced by Parse(), ParseChoice(), ParseFileExtensions(), ParseFileTypes(), and UnQuoteMsgid().
|
staticprivate |
Definition at line 1890 of file NyquistBase.cpp.
References NyquistBase::Tokenizer::Tokenize(), NyquistBase::Tokenizer::tokens, UnQuote(), UnQuoteMsgid(), Verbatim(), and wxT().
Referenced by ParseFileType(), UnQuote(), and UnQuoteMsgid().
|
protected |
Definition at line 2837 of file NyquistBase.cpp.
Referenced by NyquistEffect::TransferDataFromEffectWindow().
|
overridevirtual |
Visit settings (read-only), if defined. false means no defined settings. Default implementation returns false
Reimplemented from Effect.
Definition at line 233 of file NyquistBase.cpp.
References SettingsVisitorBase< Const >::Define(), SettingsVisitorBase< Const >::DefineEnum(), GetCtrlValue(), KEY_Command, KEY_Parameters, mControls, mExternal, mInputCmd, mIsPrompt, mParameters, NYQ_CTRL_CHOICE, NYQ_CTRL_FILE, NYQ_CTRL_FLOAT, NYQ_CTRL_FLOAT_TEXT, NYQ_CTRL_INT, NYQ_CTRL_INT_TEXT, NYQ_CTRL_STRING, NYQ_CTRL_TIME, SaveSettings(), settings(), and UNINITIALIZED_CONTROL.
|
overridevirtual |
Visit settings (and maybe change them), if defined. false means no defined settings. Default implementation returns false
Reimplemented from Effect.
Definition at line 225 of file NyquistBase.cpp.
References LoadSettings(), and settings().
|
friend |
Definition at line 305 of file NyquistBase.h.
|
protected |
Definition at line 260 of file NyquistBase.h.
Referenced by NyquistBase(), and Parse().
|
protected |
Definition at line 262 of file NyquistBase.h.
Referenced by GetVendor(), NyquistBase(), and Parse().
|
protected |
Definition at line 237 of file NyquistBase.h.
Referenced by Break(), NyquistBase(), OSCallback(), and Process().
|
protected |
Definition at line 297 of file NyquistBase.h.
Referenced by Parse(), and ParseProgram().
|
protected |
Definition at line 256 of file NyquistBase.h.
Referenced by ParseProgram(), and ProcessOne().
|
protected |
Definition at line 241 of file NyquistBase.h.
Referenced by NyquistBase(), Parse(), and ProcessOne().
|
protected |
Definition at line 238 of file NyquistBase.h.
Referenced by Continue(), NyquistBase(), OSCallback(), and Process().
std::vector<NyqControl> NyquistBase::mControls |
Definition at line 287 of file NyquistBase.h.
Referenced by NyquistEffect::BuildEffectWindow(), EVT_COMMAND_RANGE(), IsInteractive(), NyquistEffect::OnChoice(), NyquistEffect::OnFileButton(), NyquistEffect::OnSlider(), NyquistEffect::OnText(), NyquistEffect::OnTime(), Parse(), ParseProgram(), Process(), ProcessOne(), SaveSettings(), SetLispVarsFromParameters(), NyquistEffect::TransferDataFromEffectWindow(), NyquistEffect::TransferDataToEffectWindow(), and VisitSettings().
|
protected |
Definition at line 267 of file NyquistBase.h.
Referenced by GetDescription(), NyquistBase(), and Parse().
|
protected |
Definition at line 294 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 278 of file NyquistBase.h.
Referenced by NyquistBase(), ParseProgram(), Process(), and ProcessOne().
|
protected |
Definition at line 276 of file NyquistBase.h.
Referenced by EnablesDebug(), Init(), Parse(), and ParseProgram().
|
protected |
Definition at line 282 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 281 of file NyquistBase.h.
Referenced by OutputCallback(), and Process().
|
protected |
Definition at line 275 of file NyquistBase.h.
Referenced by Init(), Parse(), ParseProgram(), and NyquistEffect::TransferDataToWindow().
|
protected |
Definition at line 244 of file NyquistBase.h.
Referenced by DoLoadSettings(), NyquistBase(), ProcessOne(), SetCommand(), and VisitSettings().
|
protected |
When the script was last modified on disk.
Definition at line 234 of file NyquistBase.h.
Referenced by NyquistBase().
|
protected |
Name of the Nyquist script file this effect is loaded from.
Definition at line 233 of file NyquistBase.h.
Referenced by GetPath(), NyquistBase(), NyquistEffect::OnLoad(), NyquistEffect::OnSave(), Parse(), and ParseFile().
|
protected |
Definition at line 292 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 240 of file NyquistBase.h.
Referenced by Parse(), and ParseProgram().
|
protected |
Definition at line 269 of file NyquistBase.h.
Referenced by CheckHelpPage(), Parse(), ParseProgram(), and Process().
|
protected |
Definition at line 270 of file NyquistBase.h.
Referenced by ParseProgram(), and Process().
|
protected |
Definition at line 271 of file NyquistBase.h.
Referenced by HelpPage(), and ParseProgram().
|
protected |
Definition at line 261 of file NyquistBase.h.
Referenced by Parse().
|
protected |
Definition at line 253 of file NyquistBase.h.
Referenced by Parse(), and ParseProgram().
|
protected |
Definition at line 254 of file NyquistBase.h.
Referenced by DoLoadSettings(), Process(), SaveSettings(), NyquistEffect::TransferDataFromPromptWindow(), NyquistEffect::TransferDataToPromptWindow(), and VisitSettings().
|
protected |
True if the code to execute is obtained interactively from the user via the "Nyquist Effect Prompt", or "Nyquist Prompt", false for all other effects (lisp code read from files)
Definition at line 251 of file NyquistBase.h.
Referenced by DoLoadSettings(), GetPath(), GetSymbol(), GetVendor(), Init(), IsDefault(), IsInteractive(), ManualPage(), NyquistBase(), ParseProgram(), NyquistEffect::PopulateOrExchange(), Process(), ProcessOne(), SaveSettings(), NyquistEffect::TransferDataFromWindow(), NyquistEffect::TransferDataToWindow(), and VisitSettings().
|
protected |
Definition at line 243 of file NyquistBase.h.
Referenced by NyquistBase(), Parse(), ParseProgram(), and ProcessOne().
|
protected |
Definition at line 245 of file NyquistBase.h.
Referenced by Init(), Parse(), and ParseProgram().
|
protected |
Definition at line 246 of file NyquistBase.h.
Referenced by DoLoadSettings(), GetClassification(), NyquistBase(), and Parse().
|
protected |
Definition at line 268 of file NyquistBase.h.
Referenced by ManualPage(), Parse(), and ParseProgram().
|
protected |
Definition at line 290 of file NyquistBase.h.
Referenced by NyquistBase(), Parse(), and Process().
|
protected |
Definition at line 303 of file NyquistBase.h.
Referenced by NyquistBase(), Parse(), and ProcessOne().
|
protected |
Name of the Effect (untranslated)
Definition at line 257 of file NyquistBase.h.
Referenced by GetSymbol(), Init(), NyquistBase(), Parse(), Process(), and ProcessOne().
|
protected |
Definition at line 295 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 252 of file NyquistBase.h.
Referenced by IsOk(), NyquistBase(), and Parse().
|
protected |
Definition at line 293 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 255 of file NyquistBase.h.
Referenced by DoLoadSettings(), SaveSettings(), and VisitSettings().
|
protected |
Definition at line 300 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 280 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 259 of file NyquistBase.h.
Referenced by Init(), and NyquistBase().
|
protected |
Definition at line 273 of file NyquistBase.h.
Referenced by DoLoadSettings(), Init(), and NyquistBase().
|
protected |
Definition at line 299 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 279 of file NyquistBase.h.
Referenced by NyquistBase(), OutputCallback(), Process(), and RedirectOutput().
|
staticprivate |
Definition at line 166 of file NyquistBase.h.
Referenced by Process().
|
protected |
Definition at line 266 of file NyquistBase.h.
Referenced by GetVersion(), NyquistBase(), and Parse().
|
protected |
Definition at line 302 of file NyquistBase.h.
Referenced by NyquistBase(), Parse(), and ProcessOne().
|
protected |
Definition at line 236 of file NyquistBase.h.
Referenced by NyquistBase(), OSCallback(), Process(), and Stop().
|
protected |
Definition at line 242 of file NyquistBase.h.
Referenced by NyquistBase(), Parse(), ParseProgram(), Process(), and ProcessOne().
|
protected |
Definition at line 291 of file NyquistBase.h.
Referenced by Process(), and ProcessOne().
|
protected |
Definition at line 272 of file NyquistBase.h.
Referenced by DoLoadSettings(), GetClassification(), GetType(), Init(), NyquistBase(), Parse(), and ParseProgram().
|
protected |
Definition at line 284 of file NyquistBase.h.
Referenced by Init(), NyquistBase(), Parse(), Process(), and ProcessOne().
|
protected |
Definition at line 230 of file NyquistBase.h.