Audacity 3.2.0
|
Displays a spectrum plot of the waveform. Has options for selecting parameters of the plot. More...
#include <FreqWindow.h>
Public Member Functions | |
FrequencyPlotDialog (wxWindow *parent, wxWindowID id, AudacityProject &project, const TranslatableString &title, const wxPoint &pos) | |
virtual | ~FrequencyPlotDialog () |
bool | Show (bool show=true) override |
Public Member Functions inherited from PlotSpectrumBase | |
PlotSpectrumBase (AudacityProject &project) | |
Public Member Functions inherited from wxDialogWrapper | |
wxDialogWrapper () | |
wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) | |
bool | Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) |
void | SetTitle (const TranslatableString &title) |
void | SetLabel (const TranslatableString &title) |
void | SetName (const TranslatableString &title) |
void | SetName () |
Public Member Functions inherited from wxTabTraversalWrapper< wxDialog > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Public Member Functions inherited from PrefsListener | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
Private Member Functions | |
void | Populate () |
void | PlotMouseEvent (wxMouseEvent &event) |
void | PlotPaint (wxPaintEvent &event) |
void | OnCloseWindow (wxCloseEvent &event) |
void | OnCloseButton (wxCommandEvent &event) |
void | OnGetURL (wxCommandEvent &event) |
void | OnSize (wxSizeEvent &event) |
void | OnPanScroller (wxScrollEvent &event) |
void | OnZoomSlider (wxCommandEvent &event) |
void | OnAlgChoice (wxCommandEvent &event) |
void | OnSizeChoice (wxCommandEvent &event) |
void | OnFuncChoice (wxCommandEvent &event) |
void | OnAxisChoice (wxCommandEvent &event) |
void | OnExport (wxCommandEvent &event) |
void | OnReplot (wxCommandEvent &event) |
void | OnGridOnOff (wxCommandEvent &event) |
void | OnRecalc (wxCommandEvent &event) |
void | SendRecalcEvent () |
void | Recalc () |
void | DrawPlot () |
void | DrawBackground (wxMemoryDC &dc) |
void | UpdatePrefs () override |
Private Attributes | |
RulerPanel * | vRuler |
RulerPanel * | hRuler |
FreqPlot * | mFreqPlot |
FreqGauge * | mProgress |
wxRect | mPlotRect |
wxFont | mFreqFont |
std::unique_ptr< wxCursor > | mArrowCursor |
std::unique_ptr< wxCursor > | mCrossCursor |
wxButton * | mCloseButton |
wxButton * | mExportButton |
wxButton * | mReplotButton |
wxCheckBox * | mGridOnOff |
wxChoice * | mAlgChoice |
wxChoice * | mSizeChoice |
wxChoice * | mFuncChoice |
wxChoice * | mAxisChoice |
wxScrollBar * | mPanScroller |
wxSlider * | mZoomSlider |
wxTextCtrl * | mCursorText |
wxTextCtrl * | mPeakText |
bool | mLogAxis |
float | mYMin |
float | mYMax |
float | mYStep |
std::unique_ptr< wxBitmap > | mBitmap |
int | mMouseX |
int | mMouseY |
Static Private Attributes | |
static const int | fontSize = 8 |
Friends | |
class | FreqPlot |
Additional Inherited Members | |
Static Public Member Functions inherited from PrefsListener | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
Protected Member Functions inherited from PlotSpectrumBase | |
bool | GetAudio () |
Protected Member Functions inherited from PrefsListener | |
virtual void | UpdateSelectedPrefs (int id) |
Protected Attributes inherited from PlotSpectrumBase | |
AudacityProject * | mProject |
std::unique_ptr< SpectrumAnalyst > | mAnalyst |
bool | mDrawGrid |
int | mSize |
SpectrumAnalyst::Algorithm | mAlg |
int | mFunc |
int | mAxis |
int | dBRange |
double | mRate |
size_t | mDataLen |
ArrayOf< float > | mData |
size_t | mWindowSize |
Displays a spectrum plot of the waveform. Has options for selecting parameters of the plot.
Has a feature that finds peaks and reports their value as you move the mouse around.
Definition at line 54 of file FreqWindow.h.
FrequencyPlotDialog::FrequencyPlotDialog | ( | wxWindow * | parent, |
wxWindowID | id, | ||
AudacityProject & | project, | ||
const TranslatableString & | title, | ||
const wxPoint & | pos | ||
) |
Definition at line 187 of file FreqWindow.cpp.
References project.
|
virtual |
Definition at line 203 of file FreqWindow.cpp.
|
private |
Definition at line 581 of file FreqWindow.cpp.
References mBitmap, mFreqFont, mFreqPlot, and mPlotRect.
Referenced by DrawPlot().
|
private |
Definition at line 603 of file FreqWindow.cpp.
References _, ThemeBase::Colour(), PlotSpectrumBase::dBRange, DrawBackground(), Ruler::DrawGrid(), Ruler::GetMaxSize(), hRuler, LinearDBFormat::Instance(), LinearUpdater::Instance(), LogarithmicUpdater::Instance(), AColor::Line(), RealFormat::LinearInstance(), PlotSpectrumBase::mAlg, PlotSpectrumBase::mAnalyst, PlotSpectrumBase::mData, PlotSpectrumBase::mDataLen, PlotSpectrumBase::mDrawGrid, mFreqPlot, mLogAxis, mPanScroller, mPlotRect, PlotSpectrumBase::mRate, PlotSpectrumBase::mWindowSize, mYMax, mYMin, mZoomSlider, RulerPanel::ruler, Ruler::SetFormat(), Ruler::SetRange(), Ruler::SetUnits(), Ruler::SetUpdater(), SpectrumAnalyst::Spectrum, theTheme, vRuler, and XO().
Referenced by OnAxisChoice(), OnGridOnOff(), OnPanScroller(), OnSize(), OnZoomSlider(), and Recalc().
|
private |
Definition at line 780 of file FreqWindow.cpp.
References PlotSpectrumBase::mAlg, mAlgChoice, mAxisChoice, mLogAxis, SendRecalcEvent(), and SpectrumAnalyst::Spectrum.
|
private |
Definition at line 811 of file FreqWindow.cpp.
References DrawPlot(), mAxisChoice, and mLogAxis.
|
private |
Definition at line 925 of file FreqWindow.cpp.
References audacity::BasicSettings::Flush(), gPrefs, mAlgChoice, mAxisChoice, PlotSpectrumBase::mData, PlotSpectrumBase::mDrawGrid, mFuncChoice, mSizeChoice, Show(), audacity::BasicSettings::Write(), and wxT().
|
private |
Definition at line 920 of file FreqWindow.cpp.
References Show().
|
private |
Definition at line 999 of file FreqWindow.cpp.
References _, FileNames::AllFiles, AudacityMessageBox(), mAlgChoice, PlotSpectrumBase::mAnalyst, PlotSpectrumBase::mRate, PlotSpectrumBase::mWindowSize, SelectFile(), FileNames::TextFiles, wxT(), and XO().
|
private |
Definition at line 806 of file FreqWindow.cpp.
References SendRecalcEvent().
|
private |
Definition at line 538 of file FreqWindow.cpp.
References HelpSystem::ShowHelp().
|
private |
Definition at line 1052 of file FreqWindow.cpp.
References DrawPlot(), PlotSpectrumBase::mDrawGrid, and mGridOnOff.
|
private |
Definition at line 770 of file FreqWindow.cpp.
References DrawPlot().
|
private |
Definition at line 1059 of file FreqWindow.cpp.
References Recalc().
|
private |
Definition at line 1043 of file FreqWindow.cpp.
References PlotSpectrumBase::dBRange, DecibelScaleCutoff, PlotSpectrumBase::GetAudio(), Setting< T >::Read(), and SendRecalcEvent().
|
private |
Definition at line 572 of file FreqWindow.cpp.
References DrawPlot().
|
private |
Definition at line 797 of file FreqWindow.cpp.
References mSizeChoice, PlotSpectrumBase::mWindowSize, and SendRecalcEvent().
|
private |
Definition at line 775 of file FreqWindow.cpp.
References DrawPlot().
|
private |
Definition at line 755 of file FreqWindow.cpp.
References mArrowCursor, mCrossCursor, mFreqPlot, mMouseX, mMouseY, and mPlotRect.
Referenced by FreqPlot::OnMouseEvent().
|
private |
Definition at line 817 of file FreqWindow.cpp.
References FreqToMIDInote(), AColor::Line(), PlotSpectrumBase::mAlg, PlotSpectrumBase::mAnalyst, mBitmap, mCursorText, PlotSpectrumBase::mData, PlotSpectrumBase::mDataLen, mFreqFont, mLogAxis, mMouseX, mMouseY, mPeakText, mPlotRect, PlotSpectrumBase::mRate, PlotSpectrumBase::mWindowSize, PitchName_Absolute(), SpectrumAnalyst::Spectrum, TranslatableString::Translation(), wxT(), and XO().
Referenced by FreqPlot::OnPaint().
|
private |
Definition at line 207 of file FreqWindow.cpp.
References ThemeBase::Colour(), PlotSpectrumBase::dBRange, DecibelScaleCutoff, eCloseButton, eHelpButton, eIsCreating, fontSize, FREQ_WINDOW_HEIGHT, FreqAlgChoiceID, FreqAxisChoiceID, FreqExportButtonID, FreqFuncChoiceID, FreqPanScrollerID, FreqPlot, FreqSizeChoiceID, FrequencyAnalysisTitle, FreqZoomSliderID, GridOnOffID, hRuler, LinearDBFormat::Instance(), RulerPanel::Options::LabelEdges(), RealFormat::LinearInstance(), RulerPanel::Options::Log(), PlotSpectrumBase::mAlg, mAlgChoice, mArrowCursor, PlotSpectrumBase::mAxis, mAxisChoice, mCloseButton, mCrossCursor, mCursorText, PlotSpectrumBase::mDrawGrid, mExportButton, mFreqFont, mFreqPlot, PlotSpectrumBase::mFunc, mFuncChoice, mGridOnOff, mLogAxis, mPanScroller, mPeakText, mProgress, mReplotButton, PlotSpectrumBase::mSize, mSizeChoice, PlotSpectrumBase::mWindowSize, mZoomSlider, NumWindowFuncs(), Setting< T >::Read(), ReplotButtonID, S, safenew, wxDialogWrapper::SetTitle(), size, SpectrumAnalyst::Spectrum, theTheme, Verbatim(), vRuler, WindowFuncName(), wxT(), XO(), XXO(), ZoomIn, and ZoomOut.
Referenced by UpdatePrefs().
|
private |
Definition at line 943 of file FreqWindow.cpp.
References PlotSpectrumBase::dBRange, DrawPlot(), BasicUI::FindFocus(), mAlgChoice, PlotSpectrumBase::mAnalyst, PlotSpectrumBase::mData, PlotSpectrumBase::mDataLen, mFuncChoice, mPanScroller, mProgress, PlotSpectrumBase::mRate, PlotSpectrumBase::mWindowSize, mYMax, mYMin, FreqGauge::Reset(), FreqGauge::SetRange(), FreqGauge::SetValue(), and SpectrumAnalyst::Spectrum.
Referenced by OnRecalc(), and Show().
|
private |
Definition at line 937 of file FreqWindow.cpp.
Referenced by OnAlgChoice(), OnFuncChoice(), OnReplot(), and OnSizeChoice().
|
override |
Definition at line 545 of file FreqWindow.cpp.
References PlotSpectrumBase::dBRange, DecibelScaleCutoff, PlotSpectrumBase::GetAudio(), mArrowCursor, mFreqPlot, Setting< T >::Read(), Recalc(), and ExportProgressUI::Show().
Referenced by OnCloseButton(), OnCloseWindow(), anonymous_namespace{FreqWindow.cpp}::OnPlotSpectrum(), and UpdatePrefs().
|
overrideprivatevirtual |
Implements PrefsListener.
Definition at line 1064 of file FreqWindow.cpp.
References PlotSpectrumBase::mAlg, mAlgChoice, PlotSpectrumBase::mAxis, mAxisChoice, PlotSpectrumBase::mDrawGrid, PlotSpectrumBase::mFunc, mFuncChoice, mGridOnOff, mSizeChoice, PlotSpectrumBase::mWindowSize, mZoomSlider, Populate(), and Show().
|
friend |
Definition at line 140 of file FreqWindow.h.
Referenced by Populate().
|
staticprivate |
Definition at line 98 of file FreqWindow.h.
Referenced by Populate().
|
private |
Definition at line 104 of file FreqWindow.h.
Referenced by DrawPlot(), and Populate().
|
private |
Definition at line 119 of file FreqWindow.h.
Referenced by OnAlgChoice(), OnCloseButton(), OnExport(), Populate(), Recalc(), and UpdatePrefs().
|
private |
Definition at line 112 of file FreqWindow.h.
Referenced by PlotMouseEvent(), Populate(), and Show().
|
private |
Definition at line 122 of file FreqWindow.h.
Referenced by OnAlgChoice(), OnAxisChoice(), OnCloseButton(), Populate(), and UpdatePrefs().
|
private |
Definition at line 133 of file FreqWindow.h.
Referenced by DrawBackground(), and PlotPaint().
|
private |
Definition at line 115 of file FreqWindow.h.
Referenced by Populate().
|
private |
Definition at line 113 of file FreqWindow.h.
Referenced by PlotMouseEvent(), and Populate().
|
private |
Definition at line 125 of file FreqWindow.h.
Referenced by PlotPaint(), and Populate().
|
private |
Definition at line 116 of file FreqWindow.h.
Referenced by Populate().
|
private |
Definition at line 110 of file FreqWindow.h.
Referenced by DrawBackground(), PlotPaint(), and Populate().
|
private |
Definition at line 105 of file FreqWindow.h.
Referenced by DrawBackground(), DrawPlot(), PlotMouseEvent(), Populate(), and Show().
|
private |
Definition at line 121 of file FreqWindow.h.
Referenced by OnCloseButton(), Populate(), Recalc(), and UpdatePrefs().
|
private |
Definition at line 118 of file FreqWindow.h.
Referenced by OnGridOnOff(), Populate(), and UpdatePrefs().
|
private |
Definition at line 128 of file FreqWindow.h.
Referenced by DrawPlot(), OnAlgChoice(), OnAxisChoice(), PlotPaint(), and Populate().
|
private |
Definition at line 135 of file FreqWindow.h.
Referenced by PlotMouseEvent(), and PlotPaint().
|
private |
Definition at line 136 of file FreqWindow.h.
Referenced by PlotMouseEvent(), and PlotPaint().
|
private |
Definition at line 123 of file FreqWindow.h.
Referenced by DrawPlot(), Populate(), and Recalc().
|
private |
Definition at line 126 of file FreqWindow.h.
Referenced by PlotPaint(), and Populate().
|
private |
Definition at line 108 of file FreqWindow.h.
Referenced by DrawBackground(), DrawPlot(), PlotMouseEvent(), and PlotPaint().
|
private |
Definition at line 106 of file FreqWindow.h.
Referenced by Populate(), and Recalc().
|
private |
Definition at line 117 of file FreqWindow.h.
Referenced by Populate().
|
private |
Definition at line 120 of file FreqWindow.h.
Referenced by OnCloseButton(), OnSizeChoice(), Populate(), and UpdatePrefs().
|
private |
Definition at line 130 of file FreqWindow.h.
Referenced by DrawPlot(), and Recalc().
|
private |
Definition at line 129 of file FreqWindow.h.
Referenced by DrawPlot(), and Recalc().
|
private |
Definition at line 131 of file FreqWindow.h.
|
private |
Definition at line 124 of file FreqWindow.h.
Referenced by DrawPlot(), Populate(), and UpdatePrefs().
|
private |
Definition at line 103 of file FreqWindow.h.
Referenced by DrawPlot(), and Populate().