Audacity  3.0.3
Macros | Enumerations | Functions | Variables
Nyquist.cpp File Reference
#include "Nyquist.h"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <locale.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/datetime.h>
#include <wx/intl.h>
#include <wx/log.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/slider.h>
#include <wx/sstream.h>
#include <wx/stattext.h>
#include <wx/textdlg.h>
#include <wx/tokenzr.h>
#include <wx/txtstrm.h>
#include <wx/valgen.h>
#include <wx/wfstream.h>
#include <wx/numformatter.h>
#include <wx/stdpaths.h>
#include "../EffectManager.h"
#include "FileNames.h"
#include "../../LabelTrack.h"
#include "Languages.h"
#include "../../NoteTrack.h"
#include "../../TimeTrack.h"
#include "../../prefs/SpectrogramSettings.h"
#include "../../PluginManager.h"
#include "Project.h"
#include "ProjectRate.h"
#include "../../ShuttleGetDefinition.h"
#include "../../ShuttleGui.h"
#include "TempDirectory.h"
#include "ViewInfo.h"
#include "../../WaveClip.h"
#include "../../WaveTrack.h"
#include "../../widgets/valnum.h"
#include "../../widgets/AudacityMessageBox.h"
#include "Prefs.h"
#include "wxFileNameWrapper.h"
#include "../../prefs/GUIPrefs.h"
#include "../../tracks/playabletrack/wavetrack/ui/WaveTrackView.h"
#include "../../tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h"
#include "../../widgets/NumericTextCtrl.h"
#include "../../widgets/ProgressDialog.h"
#include "../../widgets/FileDialog/FileDialog.h"
#include <iostream>
#include <ostream>
#include <sstream>
#include <float.h>
#include "../../../lib-src/libnyquist/nyquist/xlisp/xlisp.h"
#include "../../commands/ScriptCommandRelay.h"

Go to the source code of this file.

Macros

#define NYQ_MAX_LEN   (std::numeric_limits<long>::max())
 
#define UNINITIALIZED_CONTROL   ((double)99999999.99)
 

Enumerations

enum  {
  IndicatorSmallWidth = 9, IndicatorMediumWidth = 13, IndicatorOffset = 1, TopMargin = 1,
  BottomMargin = 2, LeftMargin = 1, RightMargin = 1, ID_QUIT_AUDACITY = 10000,
  ID_DISCARD_SELECTED, ID_RECOVER_SELECTED, ID_SKIP, ID_FILE_LIST,
  AddButtonID = 10000, RemoveButtonID, RenameButtonID, RestoreButtonID,
  ImportButtonID, ExportButtonID, SaveButtonID, DefaultsButtonID,
  InsertButtonID, EditButtonID, DeleteButtonID, UpButtonID,
  DownButtonID, ApplyToProjectButtonID = ApplyToProjectID, ApplyToFilesButtonID = ApplyToFilesID, RunID = 1000,
  BSaveID, ClearID, StaticTextID, BlockSizeID,
  DataSizeID, NumEditsID, RandSeedID, kCommands,
  kMenus, kPreferences, kTracks, kClips,
  kEnvelopes, kLabels, kBoxes, nTypes,
  kJson, kLisp, kBrief, nFormats,
  FileListID = 6000, CopySelectedFilesButtonID, CopyNamesToClipboardID, FutureActionChoiceID,
  ID_Amp = 10000, ID_Peak, ID_Clip, ID_Bass = 10000,
  ID_Treble, ID_Gain, ID_Link, ID_PercentChange = 10000,
  ID_Multiplier, ID_FromVinyl, ID_ToVinyl, ID_ToLength,
  ID_Thresh = 10000, ID_Width, ID_Threshold = 10000, ID_NoiseFloor,
  ID_Ratio, ID_Attack, ID_Decay, ID_BUTTON_USECURRENTF = 10001,
  ID_BUTTON_USECURRENTB, ID_BUTTON_EXPORT, ID_BUTTON_RESET, ID_FOREGROUNDSTART_T,
  ID_FOREGROUNDEND_T, ID_BACKGROUNDSTART_T, ID_BACKGROUNDEND_T, ID_FOREGROUNDDB_TEXT,
  ID_BACKGROUNDDB_TEXT, ID_RESULTS_TEXT, ID_RESULTSDB_TEXT, ID_Sequence,
  ID_Amplitude, ID_Duration, ID_DutyCycle, ID_Length = 10000,
  ID_dBMax, ID_dBMin, ID_Clear, ID_Invert,
  ID_Mode, ID_Draw, ID_Graphic, ID_Interp,
  ID_Linear, ID_Grid, ID_Curve, ID_Manage,
  ID_Delete, ID_Slider, ID_Duration = 20000, ID_Toggles = 21000,
  ID_Sliders = 22000, ID_Texts = 23000, ID_Duration = 10000, ID_Triggers = 11000,
  ID_Toggles = 12000, ID_Sliders = 13000, ID_Choices = 14000, ID_Texts = 15000,
  ID_TIMER = 20000, ID_BUTTON_GETPROFILE = 10001, ID_RADIOBUTTON_KEEPSIGNAL, ID_RADIOBUTTON_RESIDUE,
  ID_GAIN_SLIDER, ID_GAIN_TEXT, ID_NEW_SENSITIVITY_SLIDER, ID_NEW_SENSITIVITY_TEXT,
  ID_FREQ_SLIDER, ID_FREQ_TEXT, END_OF_BASIC_SLIDERS, END_OF_SLIDERS = END_OF_BASIC_SLIDERS,
  FIRST_SLIDER = ID_GAIN_SLIDER, ID_BUTTON_GETPROFILE = 10001, ID_BUTTON_LEAVENOISE, ID_RADIOBUTTON_KEEPSIGNAL,
  ID_RADIOBUTTON_KEEPNOISE, ID_SENSITIVITY_SLIDER, ID_GAIN_SLIDER, ID_FREQ_SLIDER,
  ID_TIME_SLIDER, ID_SENSITIVITY_TEXT, ID_GAIN_TEXT, ID_FREQ_TEXT,
  ID_TIME_TEXT, ID_Editor = 10000, ID_Load, ID_Save,
  ID_Slider = 11000, ID_Choice = 13000, ID_FILE = 15000, ID_Stages = 10000,
  ID_DryWet, ID_Freq, ID_Phase, ID_Depth,
  ID_Feedback, ID_OutGain, ID_RoomSize = 10000, ID_PreDelay,
  ID_Reverberance, ID_HfDamping, ID_ToneLow, ID_ToneHigh,
  ID_WetGain, ID_DryGain, ID_StereoWidth, ID_WetOnly,
  SBSMSOutBlockSize = 512, ID_FilterPanel = 10000, ID_dBMax, ID_dBMin,
  ID_Type, ID_SubType, ID_Order, ID_Ripple,
  ID_Cutoff, ID_StopbandRipple, ID_RatePercentChangeStart = 10000, ID_RatePercentChangeEnd,
  ID_PitchHalfStepsStart, ID_PitchHalfStepsEnd, ID_PitchPercentChangeStart, ID_PitchPercentChangeEnd,
  ID_Program = 10000, ID_Sliders = 11000, ID_Choices = 12000, ID_Texts = 13000,
  ID_Toggles = 14000, ID_Duration = 20000, ID_Sliders = 21000, ID_Freq = 10000,
  ID_Phase, ID_Depth, ID_Res, ID_FreqOfs,
  ID_OutGain, ID_MIXERPANEL = 10001, ID_SLIDER_CHANNEL, QUALITY_2 = 2,
  PRESET_INSANE = 0, PRESET_EXTREME = 1, PRESET_STANDARD = 2, PRESET_MEDIUM = 3,
  FormatID = 10001, OptionsID, DirID, CreateID,
  ChooseID, LabelID, FirstID, FirstFileNameID,
  TrackID, ByNameAndNumberID, ByNameID, ByNumberID,
  PrefixID, OverwriteID, FirstID = 7000, FreqZoomSliderID,
  FreqPanScrollerID, FreqExportButtonID, FreqAlgChoiceID, FreqSizeChoiceID,
  FreqFuncChoiceID, FreqAxisChoiceID, ReplotButtonID, GridOnOffID,
  ID_AVAIL = 1000, ID_FILESIZE, ID_TOTAL, ID_LEVELS,
  ID_DISCARD, ID_DISCARD_CLIPBOARD, ID_COMPACT, ChoiceID = 9000,
  PlayID, DetectID, ID_INSERTA = 11000, ID_INSERTB,
  ID_REMOVE, ID_IMPORT, ID_EXPORT, LoggerID_Save = wxID_HIGHEST + 1,
  LoggerID_Clear, LoggerID_Close, kID_RadioButton_BouncingBall = 10101, kID_RadioButton_Highlight,
  ID_BITMAPBUTTON_MUSICAL_INSTRUMENT = 13000, ID_SLIDER_PAN, ID_SLIDER_GAIN, ID_TOGGLEBUTTON_MUTE,
  ID_TOGGLEBUTTON_SOLO, kModuleDisabled = 0, kModuleEnabled = 1, kModuleAsk = 2,
  kModuleFailed = 3, kModuleNew = 4, STATE_Enabled, STATE_Disabled,
  STATE_New, STATE_COUNT, HostID = 10000, PlayID,
  RecordID, ChannelsID, ToolColumn, ActionColumn,
  ButtonsColumn, CommentColumn, UseCustomTrackNameID = 1000, ID_WINDOW_SIZE = 10001,
  ID_WINDOW_TYPE, ID_PADDING_SIZE, ID_SCALE, ID_ALGORITHM,
  ID_MINIMUM, ID_MAXIMUM, ID_GAIN, ID_RANGE,
  ID_FREQUENCY_GAIN, ID_COLOR_SCHEME, ID_SPECTRAL_SELECTION, ID_DEFAULTS,
  ID_DEFAULTS = 10001, ID_SCALE, ID_RANGE, FSCKstatus_CLOSE_REQ = 0x1,
  FSCKstatus_CHANGED = 0x2, FSCKstatus_SAVE_AUP = 0x4, SNAP_OFF, SNAP_NEAREST,
  SNAP_PRIOR, FirstID = 1000, HSBarID, VSBarID,
  NextID, FFT_SinCosBRTable, FFT_SinCosTableVBR16, FFT_SinCosTableBR16,
  FFT_FastMathBR16, FFT_FastMathBR24, IdMainWindowSmall = 19200, IdMainWindowLarge,
  IdDirectory, IdDirChoose, IdOneSec, IdTenSec,
  IdOneMin, IdFiveMin, IdOneHour, IdShortTracks,
  IdMedTracks, IdTallTracks, IdDelayCheckBox, IdCaptureFirst,
  IdCaptureEffects = IdCaptureFirst, IdCaptureScriptables, IdCapturePreferences, IdCaptureToolbars,
  IdAllDelayedEvents, IdCaptureWindowContents =IdAllDelayedEvents, IdCaptureFullWindow, IdCaptureWindowPlus,
  IdCaptureFullScreen, IdCaptureSelectionBar, IdCaptureSpectralSelection, IdCaptureTimer,
  IdCaptureTools, IdCaptureTransport, IdCaptureMixer, IdCaptureMeter,
  IdCapturePlayMeter, IdCaptureRecordMeter, IdCaptureEdit, IdCaptureDevice,
  IdCaptureTranscription, IdCaptureScrub, IdCaptureTrackPanel, IdCaptureRuler,
  IdCaptureTracks, IdCaptureFirstTrack, IdCaptureSecondTrack, IdCaptureLast = IdCaptureSecondTrack,
  IdLastDelayedEvent, IdToggleBackgroundBlue, IdToggleBackgroundWhite, eOkButton = 0x0001,
  eCancelButton = 0x0002, eYesButton = 0x0004, eNoButton = 0x0008, eHelpButton = 0x0010,
  ePreviewButton = 0x0020, eDebugButton = 0x0040, eSettingsButton = 0x0080, ePreviewDryButton = 0x0100,
  eApplyButton = 0x0200, eCloseButton = 0x0400, DontShowID =1000, ID_DATEPICKER_START = 10000,
  ID_TIMETEXT_START, ID_DATEPICKER_END, ID_TIMETEXT_END, ID_TIMETEXT_DURATION,
  ID_AUTOSAVEPATH_BUTTON, ID_AUTOSAVEPATH_TEXT, ID_AUTOEXPORTPATH_BUTTON, ID_AUTOEXPORTPATH_TEXT,
  ID_AUTOSAVE_CHECKBOX, ID_AUTOEXPORT_CHECKBOX, POST_TIMER_RECORD_STOPPED = -3, POST_TIMER_RECORD_CANCEL_WAIT,
  POST_TIMER_RECORD_CANCEL, POST_TIMER_RECORD_NOTHING = 0, POST_TIMER_RECORD_CLOSE, ETBCutID,
  ETBCopyID, ETBPasteID, ETBTrimID, ETBSilenceID,
  ETBUndoID, ETBRedoID, ETBZoomInID, ETBZoomOutID,
  ETBZoomSelID, ETBZoomFitID, ETBNumButtons, STBScrubID,
  STBSeekID, STBRulerID, STBNumButtons, STBFirstButton = STBScrubID,
  SelectionBarFirstID = 2700, RateID, SnapToID, OnMenuID,
  ChoiceID, StartTimeID, LengthTimeID, CenterTimeID,
  EndTimeID, AudioTimeID, TimeBarFirstID = 2800, AudioPositionID,
  ToolBarFloatMargin = 1, NoDockID = 0, TopDockID, BotDockID,
  DockCount = 2, TTB_PlaySpeed, TTB_PlaySpeedSlider, TTBNumButtons,
  @0::kTimerInterval = 50, kAffordancesAreaHeight = 18, kTopInset = 4, kTopMargin = kTopInset + kBorderThickness,
  kBottomMargin = kShadowThickness + kBorderThickness, kTrackSeparatorThickness = kBottomMargin + kTopMargin, kChannelSeparatorThickness = 1, OnSetFontID = 30000,
  OnCutSelectedTextID = 1, OnCopySelectedTextID, OnPasteSelectedTextID, OnDeleteSelectedLabelID,
  OnEditSelectedLabelID, OnUpOctaveID = 30000, OnDownOctaveID, OnZoomFitVerticalID = 20000,
  OnZoomResetID, OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID,
  OnZoomInVerticalID, OnZoomOutVerticalID, OnZoomMaxID, OnUpOctaveID,
  OnDownOctaveID, reserveDisplays = 100, OnRate8ID = 30000, OnRate11ID,
  OnRate16ID, OnRate22ID, OnRate44ID, OnRate48ID,
  OnRate88ID, OnRate96ID, OnRate176ID, OnRate192ID,
  OnRate352ID, OnRate384ID, OnRateOtherID, On16BitID,
  On24BitID, OnFloatID, OnMultiViewID, OnSetDisplayId,
  lastDisplayId = (OnSetDisplayId + reserveDisplays - 1), OnChannelLeftID, OnChannelRightID, OnChannelMonoID,
  OnMergeStereoID, OnSwapChannelsID, OnSplitStereoID, OnSplitStereoMonoID,
  ChannelMenuID, FirstAttachedItemId, OnZoomFitVerticalID = 20000, OnZoomResetID,
  OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID, OnZoomInVerticalID,
  OnZoomOutVerticalID, OnFirstWaveformScaleID, OnLastWaveformScaleID = OnFirstWaveformScaleID + 9, OnFirstSpectrumScaleID,
  OnLastSpectrumScaleID = OnFirstSpectrumScaleID + 19, OnTimeTrackLinID = 30000, OnTimeTrackLogID, OnTimeTrackLogIntID,
  OnSetTimeTrackRangeID, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10, OnSetNameID = 2000,
  OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID,
  SCRUBBING_PIXEL_TOLERANCE = 10, kOneSecondCountdown = 1000 / ScrubPollInterval_ms, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10,
  ID_TIMER = wxID_HIGHEST + 1, DontShowID = wxID_HIGHEST + 1, kToggleButtonID = 5000, kTimerID,
  OnMeterUpdateID = 6000, OnMonitorID, OnPreferencesID, AV_FRAME_CROP_UNALIGNED = 1 << 0,
  AV_FRAME_CROP_UNALIGNED = 1 << 0, MAX_HFFT = 10, kVerticalPadding = 7, kBorderThickness = 1,
  kShadowThickness = 1, kLeftInset = 4, kRightInset = kLeftInset, kLeftMargin = kLeftInset + kBorderThickness,
  kRightMargin = kRightInset + kShadowThickness + kBorderThickness, kTrackInfoWidth = 100 - kLeftMargin, ID_AUTOLOAD = 20000, ID_AUTOWRAP,
  ID_FONT, ID_SPLITV, ID_SPLITH, ID_TOGGLECODE,
  ID_TOGGLEOUTPUT, ID_SMALLICONS, ID_LARGEICONS, ID_MATCH,
  ID_TOP, ID_UP, ID_PREVIOUS, ID_NEXT,
  ID_GO, ID_STOP, ID_SCRIPT, ID_OUTPUT
}
 

Functions

 EVT_COMMAND_RANGE (ID_Slider, ID_Slider+99, wxEVT_COMMAND_SLIDER_UPDATED, NyquistEffect::OnSlider) EVT_COMMAND_RANGE(ID_Text
 
NyquistEffect::OnText EVT_COMMAND_RANGE (ID_Choice, ID_Choice+99, wxEVT_COMMAND_CHOICE_SELECTED, NyquistEffect::OnChoice) EVT_COMMAND_RANGE(ID_Time
 
NyquistEffect::OnText NyquistEffect::OnTime EVT_COMMAND_RANGE (ID_FILE, ID_FILE+99, wxEVT_COMMAND_BUTTON_CLICKED, NyquistEffect::OnFileButton) NyquistEffect
 
static void RegisterFunctions ()
 
static LVAL gettext ()
 
static LVAL gettextc ()
 
static LVAL ngettext ()
 
static LVAL ngettextc ()
 
void * nyq_make_opaque_string (int size, unsigned char *src)
 
void * nyq_reformat_aud_do_response (const wxString &Str)
 
LVAL xlc_aud_do (void)
 

Variables

static const wxChar * KEY_Command = wxT("Command")
 
static const wxChar * KEY_Parameters = wxT("Parameters")
 
 ID_Text = 12000
 
 wxEVT_COMMAND_TEXT_UPDATED
 
NyquistEffect::OnText ID_Time = 14000
 
static const FileNames::FileType NyquistScripts = { XO("Nyquist scripts"), { wxT("ny") }, true }
 
static const FileNames::FileType LispScripts = { XO("Lisp scripts"), { wxT("lsp") }, true }
 

Macro Definition Documentation

◆ NYQ_MAX_LEN

#define NYQ_MAX_LEN   (std::numeric_limits<long>::max())

Definition at line 109 of file Nyquist.cpp.

◆ UNINITIALIZED_CONTROL

#define UNINITIALIZED_CONTROL   ((double)99999999.99)

Definition at line 111 of file Nyquist.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IndicatorSmallWidth 
IndicatorMediumWidth 
IndicatorOffset 
TopMargin 
BottomMargin 
LeftMargin 
RightMargin 
ID_QUIT_AUDACITY 
ID_DISCARD_SELECTED 
ID_RECOVER_SELECTED 
ID_SKIP 
ID_FILE_LIST 
AddButtonID 
RemoveButtonID 
RenameButtonID 
RestoreButtonID 
ImportButtonID 
ExportButtonID 
SaveButtonID 
DefaultsButtonID 
InsertButtonID 
EditButtonID 
DeleteButtonID 
UpButtonID 
DownButtonID 
ApplyToProjectButtonID 
ApplyToFilesButtonID 
RunID 
BSaveID 
ClearID 
StaticTextID 
BlockSizeID 
DataSizeID 
NumEditsID 
RandSeedID 
kCommands 
kMenus 
kPreferences 
kTracks 
kClips 
kEnvelopes 
kLabels 
kBoxes 
nTypes 
kJson 
kLisp 
kBrief 
nFormats 
FileListID 
CopySelectedFilesButtonID 
CopyNamesToClipboardID 
FutureActionChoiceID 
ID_Amp 
ID_Peak 
ID_Clip 
ID_Bass 
ID_Treble 
ID_Gain 
ID_Link 
ID_PercentChange 
ID_Multiplier 
ID_FromVinyl 
ID_ToVinyl 
ID_ToLength 
ID_Thresh 
ID_Width 
ID_Threshold 
ID_NoiseFloor 
ID_Ratio 
ID_Attack 
ID_Decay 
ID_BUTTON_USECURRENTF 
ID_BUTTON_USECURRENTB 
ID_BUTTON_EXPORT 
ID_BUTTON_RESET 
ID_FOREGROUNDSTART_T 
ID_FOREGROUNDEND_T 
ID_BACKGROUNDSTART_T 
ID_BACKGROUNDEND_T 
ID_FOREGROUNDDB_TEXT 
ID_BACKGROUNDDB_TEXT 
ID_RESULTS_TEXT 
ID_RESULTSDB_TEXT 
ID_Sequence 
ID_Amplitude 
ID_Duration 
ID_DutyCycle 
ID_Length 
ID_dBMax 
ID_dBMin 
ID_Clear 
ID_Invert 
ID_Mode 
ID_Draw 
ID_Graphic 
ID_Interp 
ID_Linear 
ID_Grid 
ID_Curve 
ID_Manage 
ID_Delete 
ID_Slider 
ID_Duration 
ID_Toggles 
ID_Sliders 
ID_Texts 
ID_Duration 
ID_Triggers 
ID_Toggles 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_TIMER 
ID_BUTTON_GETPROFILE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_RESIDUE 
ID_GAIN_SLIDER 
ID_GAIN_TEXT 
ID_NEW_SENSITIVITY_SLIDER 
ID_NEW_SENSITIVITY_TEXT 
ID_FREQ_SLIDER 
ID_FREQ_TEXT 
END_OF_BASIC_SLIDERS 
END_OF_SLIDERS 
FIRST_SLIDER 
ID_BUTTON_GETPROFILE 
ID_BUTTON_LEAVENOISE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_KEEPNOISE 
ID_SENSITIVITY_SLIDER 
ID_GAIN_SLIDER 
ID_FREQ_SLIDER 
ID_TIME_SLIDER 
ID_SENSITIVITY_TEXT 
ID_GAIN_TEXT 
ID_FREQ_TEXT 
ID_TIME_TEXT 
ID_Editor 
ID_Load 
ID_Save 
ID_Slider 
ID_Choice 
ID_FILE 
ID_Stages 
ID_DryWet 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Feedback 
ID_OutGain 
ID_RoomSize 
ID_PreDelay 
ID_Reverberance 
ID_HfDamping 
ID_ToneLow 
ID_ToneHigh 
ID_WetGain 
ID_DryGain 
ID_StereoWidth 
ID_WetOnly 
SBSMSOutBlockSize 
ID_FilterPanel 
ID_dBMax 
ID_dBMin 
ID_Type 
ID_SubType 
ID_Order 
ID_Ripple 
ID_Cutoff 
ID_StopbandRipple 
ID_RatePercentChangeStart 
ID_RatePercentChangeEnd 
ID_PitchHalfStepsStart 
ID_PitchHalfStepsEnd 
ID_PitchPercentChangeStart 
ID_PitchPercentChangeEnd 
ID_Program 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_Toggles 
ID_Duration 
ID_Sliders 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Res 
ID_FreqOfs 
ID_OutGain 
ID_MIXERPANEL 
ID_SLIDER_CHANNEL 
QUALITY_2 
PRESET_INSANE 
PRESET_EXTREME 
PRESET_STANDARD 
PRESET_MEDIUM 
FormatID 
OptionsID 
DirID 
CreateID 
ChooseID 
LabelID 
FirstID 
FirstFileNameID 
TrackID 
ByNameAndNumberID 
ByNameID 
ByNumberID 
PrefixID 
OverwriteID 
FirstID 
FreqZoomSliderID 
FreqPanScrollerID 
FreqExportButtonID 
FreqAlgChoiceID 
FreqSizeChoiceID 
FreqFuncChoiceID 
FreqAxisChoiceID 
ReplotButtonID 
GridOnOffID 
ID_AVAIL 
ID_FILESIZE 
ID_TOTAL 
ID_LEVELS 
ID_DISCARD 
ID_DISCARD_CLIPBOARD 
ID_COMPACT 
ChoiceID 
PlayID 
DetectID 
ID_INSERTA 
ID_INSERTB 
ID_REMOVE 
ID_IMPORT 
ID_EXPORT 
LoggerID_Save 
LoggerID_Clear 
LoggerID_Close 
kID_RadioButton_BouncingBall 
kID_RadioButton_Highlight 
ID_BITMAPBUTTON_MUSICAL_INSTRUMENT 
ID_SLIDER_PAN 
ID_SLIDER_GAIN 
ID_TOGGLEBUTTON_MUTE 
ID_TOGGLEBUTTON_SOLO 
kModuleDisabled 
kModuleEnabled 
kModuleAsk 
kModuleFailed 
kModuleNew 
STATE_Enabled 
STATE_Disabled 
STATE_New 
STATE_COUNT 
HostID 
PlayID 
RecordID 
ChannelsID 
ToolColumn 
ActionColumn 
ButtonsColumn 
CommentColumn 
UseCustomTrackNameID 
ID_WINDOW_SIZE 
ID_WINDOW_TYPE 
ID_PADDING_SIZE 
ID_SCALE 
ID_ALGORITHM 
ID_MINIMUM 
ID_MAXIMUM 
ID_GAIN 
ID_RANGE 
ID_FREQUENCY_GAIN 
ID_COLOR_SCHEME 
ID_SPECTRAL_SELECTION 
ID_DEFAULTS 
ID_DEFAULTS 
ID_SCALE 
ID_RANGE 
FSCKstatus_CLOSE_REQ 
FSCKstatus_CHANGED 
FSCKstatus_SAVE_AUP 
SNAP_OFF 
SNAP_NEAREST 
SNAP_PRIOR 
FirstID 
HSBarID 
VSBarID 
NextID 
FFT_SinCosBRTable 
FFT_SinCosTableVBR16 
FFT_SinCosTableBR16 
FFT_FastMathBR16 
FFT_FastMathBR24 
IdMainWindowSmall 
IdMainWindowLarge 
IdDirectory 
IdDirChoose 
IdOneSec 
IdTenSec 
IdOneMin 
IdFiveMin 
IdOneHour 
IdShortTracks 
IdMedTracks 
IdTallTracks 
IdDelayCheckBox 
IdCaptureFirst 
IdCaptureEffects 
IdCaptureScriptables 
IdCapturePreferences 
IdCaptureToolbars 
IdAllDelayedEvents 
IdCaptureWindowContents 
IdCaptureFullWindow 
IdCaptureWindowPlus 
IdCaptureFullScreen 
IdCaptureSelectionBar 
IdCaptureSpectralSelection 
IdCaptureTimer 
IdCaptureTools 
IdCaptureTransport 
IdCaptureMixer 
IdCaptureMeter 
IdCapturePlayMeter 
IdCaptureRecordMeter 
IdCaptureEdit 
IdCaptureDevice 
IdCaptureTranscription 
IdCaptureScrub 
IdCaptureTrackPanel 
IdCaptureRuler 
IdCaptureTracks 
IdCaptureFirstTrack 
IdCaptureSecondTrack 
IdCaptureLast 
IdLastDelayedEvent 
IdToggleBackgroundBlue 
IdToggleBackgroundWhite 
eOkButton 
eCancelButton 
eYesButton 
eNoButton 
eHelpButton 
ePreviewButton 
eDebugButton 
eSettingsButton 
ePreviewDryButton 
eApplyButton 
eCloseButton 
DontShowID 
ID_DATEPICKER_START 
ID_TIMETEXT_START 
ID_DATEPICKER_END 
ID_TIMETEXT_END 
ID_TIMETEXT_DURATION 
ID_AUTOSAVEPATH_BUTTON 
ID_AUTOSAVEPATH_TEXT 
ID_AUTOEXPORTPATH_BUTTON 
ID_AUTOEXPORTPATH_TEXT 
ID_AUTOSAVE_CHECKBOX 
ID_AUTOEXPORT_CHECKBOX 
POST_TIMER_RECORD_STOPPED 
POST_TIMER_RECORD_CANCEL_WAIT 
POST_TIMER_RECORD_CANCEL 
POST_TIMER_RECORD_NOTHING 
POST_TIMER_RECORD_CLOSE 
ETBCutID 
ETBCopyID 
ETBPasteID 
ETBTrimID 
ETBSilenceID 
ETBUndoID 
ETBRedoID 
ETBZoomInID 
ETBZoomOutID 
ETBZoomSelID 
ETBZoomFitID 
ETBNumButtons 
STBScrubID 
STBSeekID 
STBRulerID 
STBNumButtons 
STBFirstButton 
SelectionBarFirstID 
RateID 
SnapToID 
OnMenuID 
ChoiceID 
StartTimeID 
LengthTimeID 
CenterTimeID 
EndTimeID 
AudioTimeID 
TimeBarFirstID 
AudioPositionID 
ToolBarFloatMargin 
NoDockID 
TopDockID 
BotDockID 
DockCount 
TTB_PlaySpeed 
TTB_PlaySpeedSlider 
TTBNumButtons 
kTimerInterval 
kAffordancesAreaHeight 
kTopInset 
kTopMargin 
kBottomMargin 
kTrackSeparatorThickness 
kChannelSeparatorThickness 
OnSetFontID 
OnCutSelectedTextID 
OnCopySelectedTextID 
OnPasteSelectedTextID 
OnDeleteSelectedLabelID 
OnEditSelectedLabelID 
OnUpOctaveID 
OnDownOctaveID 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnZoomMaxID 
OnUpOctaveID 
OnDownOctaveID 
reserveDisplays 
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnMultiViewID 
OnSetDisplayId 
lastDisplayId 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 
FirstAttachedItemId 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnFirstWaveformScaleID 
OnLastWaveformScaleID 
OnFirstSpectrumScaleID 
OnLastSpectrumScaleID 
OnTimeTrackLinID 
OnTimeTrackLogID 
OnTimeTrackLogIntID 
OnSetTimeTrackRangeID 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
OnSetNameID 
OnMoveUpID 
OnMoveDownID 
OnMoveTopID 
OnMoveBottomID 
SCRUBBING_PIXEL_TOLERANCE 
kOneSecondCountdown 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
ID_TIMER 
DontShowID 
kToggleButtonID 
kTimerID 
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 
AV_FRAME_CROP_UNALIGNED 
AV_FRAME_CROP_UNALIGNED 
MAX_HFFT 
kVerticalPadding 

Width of padding below each channel group

kBorderThickness 
kShadowThickness 
kLeftInset 
kRightInset 
kLeftMargin 
kRightMargin 
kTrackInfoWidth 
ID_AUTOLOAD 
ID_AUTOWRAP 
ID_FONT 
ID_SPLITV 
ID_SPLITH 
ID_TOGGLECODE 
ID_TOGGLEOUTPUT 
ID_SMALLICONS 
ID_LARGEICONS 
ID_MATCH 
ID_TOP 
ID_UP 
ID_PREVIOUS 
ID_NEXT 
ID_GO 
ID_STOP 
ID_SCRIPT 
ID_OUTPUT 

Definition at line 95 of file Nyquist.cpp.

96 {
97  ID_Editor = 10000,
98  ID_Load,
99  ID_Save,
100 
101  ID_Slider = 11000,
102  ID_Text = 12000,
103  ID_Choice = 13000,
104  ID_Time = 14000,
105  ID_FILE = 15000
106 };

Function Documentation

◆ EVT_COMMAND_RANGE() [1/3]

NyquistEffect::OnText EVT_COMMAND_RANGE ( ID_Choice  ,
ID_Choice 99,
wxEVT_COMMAND_CHOICE_SELECTED  ,
NyquistEffect::OnChoice   
)

◆ EVT_COMMAND_RANGE() [2/3]

Definition at line 134 of file Nyquist.cpp.

139 {
140  mOutputTrack[0] = mOutputTrack[1] = nullptr;
141 
142  mAction = XO("Applying Nyquist Effect...");
143  mIsPrompt = false;
144  mExternal = false;
145  mCompiler = false;
146  mTrace = false;
147  mRedirectOutput = false;
148  mDebug = false;
149  mIsSal = false;
150  mOK = false;
151  mAuthor = XO("n/a");
152  mReleaseVersion = XO("n/a");
153  mCopyright = XO("n/a");
154 
155  // set clip/split handling when applying over clip boundary.
156  mRestoreSplits = true; // Default: Restore split lines.
157  mMergeClips = -1; // Default (auto): Merge if length remains unchanged.
158 
159  mVersion = 4;
160 
161  mStop = false;
162  mBreak = false;
163  mCont = false;
164  mIsTool = false;
165 
166  mMaxLen = NYQ_MAX_LEN;
167 
168  // Interactive Nyquist
169  if (fName == NYQUIST_PROMPT_ID) {
170  mName = NYQUIST_PROMPT_NAME;
171  mType = EffectTypeTool;
172  mIsTool = true;
173  mPromptName = mName;
174  mPromptType = mType;
175  mOK = true;
176  mIsPrompt = true;
177  return;
178  }
179 
180  if (fName == NYQUIST_WORKER_ID) {
181  // Effect spawned from Nyquist Prompt
182 /* i18n-hint: It is acceptable to translate this the same as for "Nyquist Prompt" */
183  mName = XO("Nyquist Worker");
184  return;
185  }
186 
187  mFileName = fName;
188  // Use the file name verbatim as effect name.
189  // This is only a default name, overridden if we find a $name line:
190  mName = Verbatim( mFileName.GetName() );
191  mFileModified = mFileName.GetModificationTime();
192  ParseFile();
193 
194  if (!mOK && mInitError.empty())
195  mInitError = XO("Ill-formed Nyquist plug-in header");
196 }

References EffectTypeTool, NYQ_MAX_LEN, NYQUIST_PROMPT_ID, NYQUIST_PROMPT_NAME, NYQUIST_WORKER_ID, Verbatim(), and XO.

Here is the call graph for this function:

◆ EVT_COMMAND_RANGE() [3/3]

EVT_COMMAND_RANGE ( ID_Slider  ,
ID_Slider 99,
wxEVT_COMMAND_SLIDER_UPDATED  ,
NyquistEffect::OnSlider   
)

◆ gettext()

static LVAL gettext ( )
static

Definition at line 3371 of file Nyquist.cpp.

3372 {
3373  auto string = UTF8CTOWX(getstring(xlgastring()));
3374 #if !HAS_I18N_CONTEXTS
3375  // allow ignored context argument
3376  if ( moreargs() )
3377  nextarg();
3378 #endif
3379  xllastarg();
3380  return cvstring(GetCustomTranslation(string).mb_str(wxConvUTF8));
3381 }

References GetCustomTranslation(), and UTF8CTOWX.

Referenced by gettextc(), and RegisterFunctions().

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

◆ gettextc()

static LVAL gettextc ( )
static

Definition at line 3383 of file Nyquist.cpp.

3384 {
3385 #if HAS_I18N_CONTEXTS
3386  auto string = UTF8CTOWX(getstring(xlgastring()));
3387  auto context = UTF8CTOWX(getstring(xlgastring()));
3388  xllastarg();
3389  return cvstring(wxGetTranslation( string, "", 0, "", context )
3390  .mb_str(wxConvUTF8));
3391 #else
3392  return gettext();
3393 #endif
3394 }

References gettext(), and UTF8CTOWX.

Referenced by RegisterFunctions().

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

◆ ngettext()

static LVAL ngettext ( )
static

Definition at line 3396 of file Nyquist.cpp.

3397 {
3398  auto string1 = UTF8CTOWX(getstring(xlgastring()));
3399  auto string2 = UTF8CTOWX(getstring(xlgastring()));
3400  auto number = getfixnum(xlgafixnum());
3401 #if !HAS_I18N_CONTEXTS
3402  // allow ignored context argument
3403  if ( moreargs() )
3404  nextarg();
3405 #endif
3406  xllastarg();
3407  return cvstring(
3408  wxGetTranslation(string1, string2, number).mb_str(wxConvUTF8));
3409 }

References UTF8CTOWX.

Referenced by ngettextc(), and RegisterFunctions().

Here is the caller graph for this function:

◆ ngettextc()

static LVAL ngettextc ( )
static

Definition at line 3411 of file Nyquist.cpp.

3412 {
3413 #if HAS_I18N_CONTEXTS
3414  auto string1 = UTF8CTOWX(getstring(xlgastring()));
3415  auto string2 = UTF8CTOWX(getstring(xlgastring()));
3416  auto number = getfixnum(xlgafixnum());
3417  auto context = UTF8CTOWX(getstring(xlgastring()));
3418  xllastarg();
3419  return cvstring(wxGetTranslation( string1, string2, number, "", context )
3420  .mb_str(wxConvUTF8));
3421 #else
3422  return ngettext();
3423 #endif
3424 }

References ngettext(), and UTF8CTOWX.

Referenced by RegisterFunctions().

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

◆ nyq_make_opaque_string()

void* nyq_make_opaque_string ( int  size,
unsigned char *  src 
)

Definition at line 3426 of file Nyquist.cpp.

3426  {
3427  LVAL dst;
3428  unsigned char * dstp;
3429  dst = new_string((int)(size+2));
3430  dstp = getstring(dst);
3431 
3432  /* copy the source to the destination */
3433  while (size-- > 0)
3434  *dstp++ = *src++;
3435  *dstp = '\0';
3436 
3437  return (void*)dst;
3438 }

References size.

◆ nyq_reformat_aud_do_response()

void* nyq_reformat_aud_do_response ( const wxString &  Str)

Definition at line 3440 of file Nyquist.cpp.

3440  {
3441  LVAL dst;
3442  LVAL message;
3443  LVAL success;
3444  wxString Left = Str.BeforeLast('\n').BeforeLast('\n').ToAscii();
3445  wxString Right = Str.BeforeLast('\n').AfterLast('\n').ToAscii();
3446  message = cvstring(Left);
3447  success = Right.EndsWith("OK") ? s_true : nullptr;
3448  dst = cons(message, success);
3449  return (void *)dst;
3450 }

Referenced by ExecForLisp().

Here is the caller graph for this function:

◆ RegisterFunctions()

static void RegisterFunctions ( )
static

Definition at line 3478 of file Nyquist.cpp.

3479 {
3480  // Add functions to XLisp. Do this only once,
3481  // before the first call to nyx_init.
3482  static bool firstTime = true;
3483  if (firstTime) {
3484  firstTime = false;
3485 
3486  // All function names must be UP-CASED
3487  static const FUNDEF functions[] = {
3488  { "_", SUBR, gettext },
3489  { "_C", SUBR, gettextc },
3490  { "NGETTEXT", SUBR, ngettext },
3491  { "NGETTEXTC", SUBR, ngettextc },
3492  { "AUD-DO", SUBR, xlc_aud_do },
3493  };
3494 
3495  xlbindfunctions( functions, WXSIZEOF( functions ) );
3496  }
3497 }

References gettext(), gettextc(), ngettext(), ngettextc(), and xlc_aud_do().

Referenced by NyquistEffect::Process().

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

◆ xlc_aud_do()

LVAL xlc_aud_do ( void  )

Definition at line 3457 of file Nyquist.cpp.

3458 {
3459 // Based on string-trim...
3460  unsigned char *leftp;
3461  LVAL src,dst;
3462 
3463  /* get the string */
3464  src = xlgastring();
3465  xllastarg();
3466 
3467  /* setup the string pointer */
3468  leftp = getstring(src);
3469 
3470  // Go call my real function here...
3471  dst = (LVAL)ExecForLisp( (char *)leftp );
3472 
3473  //dst = cons(dst, (LVAL)1);
3474  /* return the new string */
3475  return (dst);
3476 }

References ExecForLisp().

Referenced by RegisterFunctions().

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

Variable Documentation

◆ ID_Text

ID_Text = 12000

◆ ID_Time

ID_Time = 14000

◆ KEY_Command

const wxChar* KEY_Command = wxT("Command")
static

◆ KEY_Parameters

const wxChar* KEY_Parameters = wxT("Parameters")
static

◆ LispScripts

const FileNames::FileType LispScripts = { XO("Lisp scripts"), { wxT("lsp") }, true }
static

Definition at line 2988 of file Nyquist.cpp.

◆ NyquistScripts

const FileNames::FileType NyquistScripts = { XO("Nyquist scripts"), { wxT("ny") }, true }
static

Definition at line 2986 of file Nyquist.cpp.

◆ wxEVT_COMMAND_TEXT_UPDATED

NyquistEffect::OnText wxEVT_COMMAND_TEXT_UPDATED

Definition at line 129 of file Nyquist.cpp.

Referenced by NumericTextCtrl::Updated().

size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
gettextc
static LVAL gettextc()
Definition: Nyquist.cpp:3383
NYQUIST_PROMPT_ID
#define NYQUIST_PROMPT_ID
Definition: PluginManager.h:360
gettext
static LVAL gettext()
Definition: Nyquist.cpp:3371
XO
#define XO(s)
Definition: Internat.h:31
ExecForLisp
void * ExecForLisp(char *pIn)
Definition: ScriptCommandRelay.cpp:95
GetCustomTranslation
STRINGS_API const wxString & GetCustomTranslation(const wxString &str1)
Definition: Internat.cpp:71
xlc_aud_do
LVAL xlc_aud_do(void)
Definition: Nyquist.cpp:3457
NYQ_MAX_LEN
#define NYQ_MAX_LEN
Definition: Nyquist.cpp:109
ID_Editor
@ ID_Editor
Definition: Nyquist.cpp:97
ID_Time
NyquistEffect::OnText ID_Time
Definition: Nyquist.cpp:132
ID_Text
ID_Text
Definition: Nyquist.cpp:128
ID_FILE
@ ID_FILE
Definition: Nyquist.cpp:105
NYQUIST_PROMPT_NAME
#define NYQUIST_PROMPT_NAME
Definition: PluginManager.h:362
UTF8CTOWX
#define UTF8CTOWX(X)
Definition: Internat.h:159
EffectTypeTool
@ EffectTypeTool
Definition: EffectInterface.h:61
ID_Load
@ ID_Load
Definition: Nyquist.cpp:98
NYQUIST_WORKER_ID
#define NYQUIST_WORKER_ID
Definition: Effect.h:62
ngettextc
static LVAL ngettextc()
Definition: Nyquist.cpp:3411
ID_Choice
@ ID_Choice
Definition: Nyquist.cpp:103
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
ID_Save
@ ID_Save
Definition: Nyquist.cpp:99
ID_Slider
@ ID_Slider
Definition: Nyquist.cpp:101
ngettext
static LVAL ngettext()
Definition: Nyquist.cpp:3396