mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 16:39:30 +02:00
Just one view type for Spectrum...
... Instead preferences or View Settings controls scale type and spectral selection enablement
This commit is contained in:
commit
6b9cbbe50a
@ -93,6 +93,7 @@ It handles initialization and termination by subclassing wxApp.
|
|||||||
#include "commands/Keyboard.h"
|
#include "commands/Keyboard.h"
|
||||||
#include "widgets/ErrorDialog.h"
|
#include "widgets/ErrorDialog.h"
|
||||||
#include "prefs/DirectoriesPrefs.h"
|
#include "prefs/DirectoriesPrefs.h"
|
||||||
|
#include "prefs/SpectrogramSettings.h"
|
||||||
|
|
||||||
//temporarilly commented out till it is added to all projects
|
//temporarilly commented out till it is added to all projects
|
||||||
//#include "Profiler.h"
|
//#include "Profiler.h"
|
||||||
@ -1011,7 +1012,11 @@ void AudacityApp::InitLang( const wxString & lang )
|
|||||||
//
|
//
|
||||||
// This must go _after_ creating the wxLocale instance because
|
// This must go _after_ creating the wxLocale instance because
|
||||||
// creating the wxLocale instance sets the application-wide locale.
|
// creating the wxLocale instance sets the application-wide locale.
|
||||||
|
|
||||||
Internat::Init();
|
Internat::Init();
|
||||||
|
|
||||||
|
// Some static arrays unconnected with any project want to be informed of language changes.
|
||||||
|
SpectrogramSettings::InvalidateNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityApp::OnFatalException()
|
void AudacityApp::OnFatalException()
|
||||||
|
@ -4765,12 +4765,7 @@ void AudacityProject::DoNextPeakFrequency(bool up)
|
|||||||
for (Track *t = iter.First(); t; t = iter.Next()) {
|
for (Track *t = iter.First(); t; t = iter.Next()) {
|
||||||
WaveTrack *const wt = static_cast<WaveTrack*>(t);
|
WaveTrack *const wt = static_cast<WaveTrack*>(t);
|
||||||
const int display = wt->GetDisplay();
|
const int display = wt->GetDisplay();
|
||||||
if (display == WaveTrack::SpectrumDisplay ||
|
if (display == WaveTrack::Spectrum) {
|
||||||
display == WaveTrack::SpectrumLogDisplay ||
|
|
||||||
display == WaveTrack::SpectralSelectionDisplay ||
|
|
||||||
display == WaveTrack::SpectralSelectionLogDisplay
|
|
||||||
|
|
||||||
) {
|
|
||||||
pTrack = wt;
|
pTrack = wt;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -464,10 +464,7 @@ void TrackArtist::DrawTrack(const Track * t,
|
|||||||
DrawWaveform(wt, dc, rect, selectedRegion, zoomInfo,
|
DrawWaveform(wt, dc, rect, selectedRegion, zoomInfo,
|
||||||
drawEnvelope, bigPoints, drawSliders, true, muted);
|
drawEnvelope, bigPoints, drawSliders, true, muted);
|
||||||
break;
|
break;
|
||||||
case WaveTrack::SpectrumDisplay:
|
case WaveTrack::Spectrum:
|
||||||
case WaveTrack::SpectrumLogDisplay:
|
|
||||||
case WaveTrack::SpectralSelectionDisplay:
|
|
||||||
case WaveTrack::SpectralSelectionLogDisplay:
|
|
||||||
case WaveTrack::PitchDisplay:
|
case WaveTrack::PitchDisplay:
|
||||||
DrawSpectrum(wt, dc, rect, selectedRegion, zoomInfo);
|
DrawSpectrum(wt, dc, rect, selectedRegion, zoomInfo);
|
||||||
break;
|
break;
|
||||||
@ -793,66 +790,71 @@ void TrackArtist::UpdateVRuler(Track *t, wxRect & rect)
|
|||||||
vruler->SetLabelEdges(true);
|
vruler->SetLabelEdges(true);
|
||||||
vruler->SetLog(false);
|
vruler->SetLog(false);
|
||||||
}
|
}
|
||||||
else if (
|
else if (display == WaveTrack::Spectrum) {
|
||||||
(display == WaveTrack::SpectrumDisplay) ||
|
switch (wt->GetSpectrogramSettings().scaleType) {
|
||||||
(display == WaveTrack::SpectralSelectionDisplay) )
|
default:
|
||||||
{
|
wxASSERT(false);
|
||||||
// Spectrum
|
case SpectrogramSettings::stLinear:
|
||||||
|
{
|
||||||
|
// Spectrum
|
||||||
|
|
||||||
if (rect.height < 60)
|
if (rect.height < 60)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const SpectrogramSettings &settings = wt->GetSpectrogramSettings();
|
const SpectrogramSettings &settings = wt->GetSpectrogramSettings();
|
||||||
const double rate = wt->GetRate();
|
const double rate = wt->GetRate();
|
||||||
const int maxFreq = settings.GetMaxFreq(rate);
|
const int maxFreq = settings.GetMaxFreq(rate);
|
||||||
const int minFreq = settings.GetMinFreq(rate);
|
const int minFreq = settings.GetMinFreq(rate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
draw the ruler
|
draw the ruler
|
||||||
we will use Hz if maxFreq is < 2000, otherwise we represent kHz,
|
we will use Hz if maxFreq is < 2000, otherwise we represent kHz,
|
||||||
and append to the numbers a "k"
|
and append to the numbers a "k"
|
||||||
*/
|
*/
|
||||||
vruler->SetBounds(rect.x, rect.y+1, rect.x + rect.width, rect.y + rect.height-1);
|
vruler->SetBounds(rect.x, rect.y + 1, rect.x + rect.width, rect.y + rect.height - 1);
|
||||||
vruler->SetOrientation(wxVERTICAL);
|
vruler->SetOrientation(wxVERTICAL);
|
||||||
vruler->SetFormat(Ruler::RealFormat);
|
vruler->SetFormat(Ruler::RealFormat);
|
||||||
vruler->SetLabelEdges(true);
|
vruler->SetLabelEdges(true);
|
||||||
// use kHz in scale, if appropriate
|
// use kHz in scale, if appropriate
|
||||||
if (maxFreq>=2000) {
|
if (maxFreq >= 2000) {
|
||||||
vruler->SetRange((maxFreq/1000.), (minFreq/1000.));
|
vruler->SetRange((maxFreq / 1000.), (minFreq / 1000.));
|
||||||
vruler->SetUnits(wxT("k"));
|
vruler->SetUnits(wxT("k"));
|
||||||
} else {
|
}
|
||||||
// use Hz
|
else {
|
||||||
vruler->SetRange(int(maxFreq), int(minFreq));
|
// use Hz
|
||||||
vruler->SetUnits(wxT(""));
|
vruler->SetRange(int(maxFreq), int(minFreq));
|
||||||
|
vruler->SetUnits(wxT(""));
|
||||||
|
}
|
||||||
|
vruler->SetLog(false);
|
||||||
}
|
}
|
||||||
vruler->SetLog(false);
|
break;
|
||||||
}
|
case SpectrogramSettings::stLogarithmic:
|
||||||
else if (
|
{
|
||||||
(display == WaveTrack::SpectrumLogDisplay) ||
|
// SpectrumLog
|
||||||
(display == WaveTrack::SpectralSelectionLogDisplay) )
|
|
||||||
{
|
|
||||||
// SpectrumLog
|
|
||||||
|
|
||||||
if (rect.height < 10)
|
if (rect.height < 10)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const SpectrogramSettings &settings = wt->GetSpectrogramSettings();
|
const SpectrogramSettings &settings = wt->GetSpectrogramSettings();
|
||||||
const double rate = wt->GetRate();
|
const double rate = wt->GetRate();
|
||||||
const int maxFreq = settings.GetLogMaxFreq(rate);
|
const int maxFreq = settings.GetLogMaxFreq(rate);
|
||||||
const int minFreq = settings.GetLogMinFreq(rate);
|
const int minFreq = settings.GetLogMinFreq(rate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
draw the ruler
|
draw the ruler
|
||||||
we will use Hz if maxFreq is < 2000, otherwise we represent kHz,
|
we will use Hz if maxFreq is < 2000, otherwise we represent kHz,
|
||||||
and append to the numbers a "k"
|
and append to the numbers a "k"
|
||||||
*/
|
*/
|
||||||
vruler->SetBounds(rect.x, rect.y+1, rect.x + rect.width, rect.y + rect.height-1);
|
vruler->SetBounds(rect.x, rect.y + 1, rect.x + rect.width, rect.y + rect.height - 1);
|
||||||
vruler->SetOrientation(wxVERTICAL);
|
vruler->SetOrientation(wxVERTICAL);
|
||||||
vruler->SetFormat(Ruler::IntFormat);
|
vruler->SetFormat(Ruler::IntFormat);
|
||||||
vruler->SetLabelEdges(true);
|
vruler->SetLabelEdges(true);
|
||||||
vruler->SetRange(maxFreq, minFreq);
|
vruler->SetRange(maxFreq, minFreq);
|
||||||
vruler->SetUnits(wxT(""));
|
vruler->SetUnits(wxT(""));
|
||||||
vruler->SetLog(true);
|
vruler->SetLog(true);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (display == WaveTrack::PitchDisplay) {
|
else if (display == WaveTrack::PitchDisplay) {
|
||||||
// Pitch
|
// Pitch
|
||||||
@ -2034,8 +2036,8 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
|
|
||||||
const int display = track->GetDisplay();
|
const int display = track->GetDisplay();
|
||||||
const bool autocorrelation = (WaveTrack::PitchDisplay == display);
|
const bool autocorrelation = (WaveTrack::PitchDisplay == display);
|
||||||
const bool logF = (WaveTrack::SpectrumLogDisplay == display
|
const bool logF = settings.scaleType == SpectrogramSettings::stLogarithmic;
|
||||||
|| WaveTrack::SpectralSelectionLogDisplay == display);
|
|
||||||
enum { DASH_LENGTH = 10 /* pixels */ };
|
enum { DASH_LENGTH = 10 /* pixels */ };
|
||||||
|
|
||||||
const ClipParameters params(true, track, clip, rect, selectedRegion, zoomInfo);
|
const ClipParameters params(true, track, clip, rect, selectedRegion, zoomInfo);
|
||||||
@ -2104,8 +2106,14 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
t0, pps, autocorrelation);
|
t0, pps, autocorrelation);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int minFreq = logF ? settings.GetLogMinFreq(rate) : settings.GetMinFreq(rate);
|
// Legacy special-case treatment of log scale
|
||||||
const int maxFreq = logF ? settings.GetLogMaxFreq(rate) : settings.GetMaxFreq(rate);
|
const SpectrogramSettings::ScaleType scaleType = settings.scaleType;
|
||||||
|
const int minFreq =
|
||||||
|
scaleType == SpectrogramSettings::stLinear
|
||||||
|
? settings.GetMinFreq(rate) : settings.GetLogMinFreq(rate);
|
||||||
|
const int maxFreq =
|
||||||
|
scaleType == SpectrogramSettings::stLinear
|
||||||
|
? settings.GetMaxFreq(rate) : settings.GetLogMaxFreq(rate);
|
||||||
|
|
||||||
float minBin = ((double)minFreq / binUnit);
|
float minBin = ((double)minFreq / binUnit);
|
||||||
float maxBin = ((double)maxFreq / binUnit);
|
float maxBin = ((double)maxFreq / binUnit);
|
||||||
@ -2140,7 +2148,8 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
#endif //EXPERIMENTAL_FFT_Y_GRID
|
||||||
|
|
||||||
if (!updated && clip->mSpecPxCache->valid &&
|
if (!updated && clip->mSpecPxCache->valid &&
|
||||||
(clip->mSpecPxCache->len == hiddenMid.height * hiddenMid.width)
|
(clip->mSpecPxCache->len == hiddenMid.height * hiddenMid.width)
|
||||||
|
&& scaleType == clip->mSpecPxCache->scaleType
|
||||||
&& gain == clip->mSpecPxCache->gain
|
&& gain == clip->mSpecPxCache->gain
|
||||||
&& range == clip->mSpecPxCache->range
|
&& range == clip->mSpecPxCache->range
|
||||||
&& minFreq == clip->mSpecPxCache->minFreq
|
&& minFreq == clip->mSpecPxCache->minFreq
|
||||||
@ -2163,6 +2172,7 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
delete clip->mSpecPxCache;
|
delete clip->mSpecPxCache;
|
||||||
clip->mSpecPxCache = new SpecPxCache(hiddenMid.width * hiddenMid.height);
|
clip->mSpecPxCache = new SpecPxCache(hiddenMid.width * hiddenMid.height);
|
||||||
clip->mSpecPxCache->valid = true;
|
clip->mSpecPxCache->valid = true;
|
||||||
|
clip->mSpecPxCache->scaleType = scaleType;
|
||||||
clip->mSpecPxCache->gain = gain;
|
clip->mSpecPxCache->gain = gain;
|
||||||
clip->mSpecPxCache->range = range;
|
clip->mSpecPxCache->range = range;
|
||||||
clip->mSpecPxCache->minFreq = minFreq;
|
clip->mSpecPxCache->minFreq = minFreq;
|
||||||
@ -2334,6 +2344,7 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
(zoomInfo.PositionToTime(0, -leftOffset) - tOffset)
|
(zoomInfo.PositionToTime(0, -leftOffset) - tOffset)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const bool isSpectral = settings.SpectralSelectionEnabled();
|
||||||
const bool hidden = (ZoomInfo::HIDDEN == zoomInfo.GetFisheyeState());
|
const bool hidden = (ZoomInfo::HIDDEN == zoomInfo.GetFisheyeState());
|
||||||
const int begin = hidden
|
const int begin = hidden
|
||||||
? 0
|
? 0
|
||||||
@ -2389,12 +2400,8 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
AColor::ColorGradientUnselected;
|
AColor::ColorGradientUnselected;
|
||||||
// If we are in the time selected range, then we may use a different color set.
|
// If we are in the time selected range, then we may use a different color set.
|
||||||
if (ssel0 <= w0 && w1 < ssel1)
|
if (ssel0 <= w0 && w1 < ssel1)
|
||||||
{
|
|
||||||
bool isSpectral = ((track->GetDisplay() == WaveTrack::SpectralSelectionDisplay) ||
|
|
||||||
(track->GetDisplay() == WaveTrack::SpectralSelectionLogDisplay));
|
|
||||||
selected = ChooseColorSet(bin0, bin1, selBinLo, selBinCenter, selBinHi,
|
selected = ChooseColorSet(bin0, bin1, selBinLo, selBinCenter, selBinHi,
|
||||||
(xx + leftOffset - hiddenLeftOffset) / DASH_LENGTH, isSpectral);
|
(xx + leftOffset - hiddenLeftOffset) / DASH_LENGTH, isSpectral);
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char rv, gv, bv;
|
unsigned char rv, gv, bv;
|
||||||
const float value = uncached
|
const float value = uncached
|
||||||
@ -2429,13 +2436,9 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
AColor::ColorGradientChoice selected = AColor::ColorGradientUnselected;
|
AColor::ColorGradientChoice selected = AColor::ColorGradientUnselected;
|
||||||
// If we are in the time selected range, then we may use a different color set.
|
// If we are in the time selected range, then we may use a different color set.
|
||||||
if (ssel0 <= w0 && w1 < ssel1)
|
if (ssel0 <= w0 && w1 < ssel1)
|
||||||
{
|
|
||||||
bool isSpectral = ((track->GetDisplay() == WaveTrack::SpectralSelectionDisplay) ||
|
|
||||||
(track->GetDisplay() == WaveTrack::SpectralSelectionLogDisplay));
|
|
||||||
selected = ChooseColorSet(
|
selected = ChooseColorSet(
|
||||||
bin0, bin1, selBinLo, selBinCenter, selBinHi,
|
bin0, bin1, selBinLo, selBinCenter, selBinHi,
|
||||||
(xx + leftOffset - hiddenLeftOffset) / DASH_LENGTH, isSpectral);
|
(xx + leftOffset - hiddenLeftOffset) / DASH_LENGTH, isSpectral);
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char rv, gv, bv;
|
unsigned char rv, gv, bv;
|
||||||
const float value = uncached
|
const float value = uncached
|
||||||
@ -2475,23 +2478,6 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
#endif //EXPERIMENTAL_FFT_Y_GRID
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackArtist::InvalidateSpectrumCache(TrackList *tracks)
|
|
||||||
{
|
|
||||||
TrackListOfKindIterator iter(Track::Wave, tracks);
|
|
||||||
for (Track *t = iter.First(); t; t = iter.Next()) {
|
|
||||||
InvalidateSpectrumCache((WaveTrack *)t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TrackArtist::InvalidateSpectrumCache(WaveTrack *track)
|
|
||||||
{
|
|
||||||
WaveClipList::compatibility_iterator it;
|
|
||||||
for (it = track->GetClipIterator(); it; it = it->GetNext()) {
|
|
||||||
it->GetData()->mSpecPxCache->valid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
/*
|
/*
|
||||||
Note: recall that Allegro attributes end in a type identifying letter.
|
Note: recall that Allegro attributes end in a type identifying letter.
|
||||||
|
@ -71,9 +71,6 @@ class AUDACITY_DLL_API TrackArtist {
|
|||||||
|
|
||||||
void UpdatePrefs();
|
void UpdatePrefs();
|
||||||
|
|
||||||
void InvalidateSpectrumCache(TrackList *tracks);
|
|
||||||
void InvalidateSpectrumCache(WaveTrack *track);
|
|
||||||
|
|
||||||
void SetBackgroundBrushes(wxBrush unselectedBrush, wxBrush selectedBrush,
|
void SetBackgroundBrushes(wxBrush unselectedBrush, wxBrush selectedBrush,
|
||||||
wxPen unselectedPen, wxPen selectedPen) {
|
wxPen unselectedPen, wxPen selectedPen) {
|
||||||
this->unselectedBrush = unselectedBrush;
|
this->unselectedBrush = unselectedBrush;
|
||||||
|
@ -327,9 +327,6 @@ enum {
|
|||||||
OnWaveformID,
|
OnWaveformID,
|
||||||
OnWaveformDBID,
|
OnWaveformDBID,
|
||||||
OnSpectrumID,
|
OnSpectrumID,
|
||||||
OnSpectrumLogID,
|
|
||||||
OnSpectralSelID,
|
|
||||||
OnSpectralSelLogID,
|
|
||||||
OnPitchID,
|
OnPitchID,
|
||||||
OnViewSettingsID,
|
OnViewSettingsID,
|
||||||
|
|
||||||
@ -727,13 +724,7 @@ void TrackPanel::BuildMenus(void)
|
|||||||
BuildCommonDropMenuItems(mWaveTrackMenu); // does name, up/down etc
|
BuildCommonDropMenuItems(mWaveTrackMenu); // does name, up/down etc
|
||||||
mWaveTrackMenu->Append(OnWaveformID, _("Wa&veform"));
|
mWaveTrackMenu->Append(OnWaveformID, _("Wa&veform"));
|
||||||
mWaveTrackMenu->Append(OnWaveformDBID, _("&Waveform (dB)"));
|
mWaveTrackMenu->Append(OnWaveformDBID, _("&Waveform (dB)"));
|
||||||
mWaveTrackMenu->Append(OnSpectrumID, _("&Spectrogram"));
|
mWaveTrackMenu->Append(OnSpectrumID, _("&Spectrum"));
|
||||||
/* i18n-hint: short form of 'logarithm'*/
|
|
||||||
mWaveTrackMenu->Append(OnSpectrumLogID, _("Spectrogram l&og(f)"));
|
|
||||||
/* i18n-hint: Spectral Selection is spectrogram with ability to select frequencies too'*/
|
|
||||||
mWaveTrackMenu->Append(OnSpectralSelID, _("S&pectral Selection"));
|
|
||||||
/* i18n-hint: short form of 'logarithm'*/
|
|
||||||
mWaveTrackMenu->Append(OnSpectralSelLogID, _("Spectral Selection lo&g(f)"));
|
|
||||||
mWaveTrackMenu->Append(OnPitchID, _("Pitc&h (EAC)"));
|
mWaveTrackMenu->Append(OnPitchID, _("Pitc&h (EAC)"));
|
||||||
mWaveTrackMenu->Append(OnViewSettingsID, _("View& Settings...")); // PRL: all the other letters already taken for accelerators!
|
mWaveTrackMenu->Append(OnViewSettingsID, _("View& Settings...")); // PRL: all the other letters already taken for accelerators!
|
||||||
mWaveTrackMenu->AppendSeparator();
|
mWaveTrackMenu->AppendSeparator();
|
||||||
@ -1811,16 +1802,18 @@ void TrackPanel::SetCursorAndTipWhenInLabelTrack( LabelTrack * pLT,
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// This returns true if we're a spectral editing track.
|
// This returns true if we're a spectral editing track.
|
||||||
inline bool isSpectrogramTrack(const Track *pTrack, bool *pLogf = NULL) {
|
inline bool isSpectralSelectionTrack(const Track *pTrack, bool *pLogf = NULL) {
|
||||||
if (pTrack &&
|
if (pTrack &&
|
||||||
pTrack->GetKind() == Track::Wave) {
|
pTrack->GetKind() == Track::Wave) {
|
||||||
const int display =
|
const WaveTrack *const wt = static_cast<const WaveTrack*>(pTrack);
|
||||||
static_cast<const WaveTrack*>(pTrack)->GetDisplay();
|
const SpectrogramSettings &settings = wt->GetSpectrogramSettings();
|
||||||
const bool logF = (display == WaveTrack::SpectrumLogDisplay) ||
|
const int display = wt->GetDisplay();
|
||||||
(display == WaveTrack::SpectralSelectionLogDisplay);
|
if (pLogf) {
|
||||||
if (pLogf)
|
const bool logF =
|
||||||
|
settings.scaleType == SpectrogramSettings::stLogarithmic;
|
||||||
*pLogf = logF;
|
*pLogf = logF;
|
||||||
return (display == WaveTrack::SpectralSelectionLogDisplay) || (display == WaveTrack::SpectralSelectionDisplay);
|
}
|
||||||
|
return (display == WaveTrack::Spectrum) && settings.SpectralSelectionEnabled();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (pLogf)
|
if (pLogf)
|
||||||
@ -1950,7 +1943,7 @@ void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t,
|
|||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
bool logF;
|
bool logF;
|
||||||
if ( (mFreqSelMode == FREQ_SEL_SNAPPING_CENTER) &&
|
if ( (mFreqSelMode == FREQ_SEL_SNAPPING_CENTER) &&
|
||||||
isSpectrogramTrack(t, &logF) ) {
|
isSpectralSelectionTrack(t, &logF)) {
|
||||||
// Not shift-down, but center frequency snapping toggle is on
|
// Not shift-down, but center frequency snapping toggle is on
|
||||||
*ppTip = _("Click and drag to set frequency bandwidth.");
|
*ppTip = _("Click and drag to set frequency bandwidth.");
|
||||||
*ppCursor = mEnvelopeCursor;
|
*ppCursor = mEnvelopeCursor;
|
||||||
@ -2688,7 +2681,7 @@ void TrackPanel::SelectionHandleClick(wxMouseEvent & event,
|
|||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
bool logF;
|
bool logF;
|
||||||
if (mFreqSelMode == FREQ_SEL_SNAPPING_CENTER &&
|
if (mFreqSelMode == FREQ_SEL_SNAPPING_CENTER &&
|
||||||
isSpectrogramTrack(pTrack, &logF)) {
|
isSpectralSelectionTrack(pTrack, &logF)) {
|
||||||
// Ignore whether we are inside the time selection.
|
// Ignore whether we are inside the time selection.
|
||||||
// Exit center-snapping, start dragging the width.
|
// Exit center-snapping, start dragging the width.
|
||||||
mFreqSelMode = FREQ_SEL_PINNED_CENTER;
|
mFreqSelMode = FREQ_SEL_PINNED_CENTER;
|
||||||
@ -3082,7 +3075,7 @@ void TrackPanel::MoveSnappingFreqSelection (int mouseYCoordinate,
|
|||||||
bool logF;
|
bool logF;
|
||||||
if (pTrack &&
|
if (pTrack &&
|
||||||
pTrack->GetSelected() &&
|
pTrack->GetSelected() &&
|
||||||
isSpectrogramTrack(pTrack, &logF)) {
|
isSpectralSelectionTrack(pTrack, &logF)) {
|
||||||
WaveTrack *const wt = static_cast<WaveTrack*>(pTrack);
|
WaveTrack *const wt = static_cast<WaveTrack*>(pTrack);
|
||||||
// PRL:
|
// PRL:
|
||||||
// What happens if center snapping selection began in one spectrogram track,
|
// What happens if center snapping selection began in one spectrogram track,
|
||||||
@ -3126,7 +3119,7 @@ void TrackPanel::StartFreqSelection (int mouseYCoordinate, int trackTopEdge,
|
|||||||
mFreqSelPin = SelectedRegion::UndefinedFrequency;
|
mFreqSelPin = SelectedRegion::UndefinedFrequency;
|
||||||
|
|
||||||
bool logF;
|
bool logF;
|
||||||
if (isSpectrogramTrack(pTrack, &logF)) {
|
if (isSpectralSelectionTrack(pTrack, &logF)) {
|
||||||
mFreqSelTrack = static_cast<WaveTrack*>(pTrack);
|
mFreqSelTrack = static_cast<WaveTrack*>(pTrack);
|
||||||
mFreqSelMode = FREQ_SEL_FREE;
|
mFreqSelMode = FREQ_SEL_FREE;
|
||||||
mFreqSelPin =
|
mFreqSelPin =
|
||||||
@ -3150,10 +3143,8 @@ void TrackPanel::ExtendFreqSelection(int mouseYCoordinate, int trackTopEdge,
|
|||||||
// started, and that is of a spectrogram display type.
|
// started, and that is of a spectrogram display type.
|
||||||
|
|
||||||
const WaveTrack* wt = mFreqSelTrack;
|
const WaveTrack* wt = mFreqSelTrack;
|
||||||
const int display = wt->GetDisplay();
|
const bool logF =
|
||||||
const bool logF = (display == WaveTrack::SpectrumLogDisplay) ||
|
wt->GetSpectrogramSettings().scaleType == SpectrogramSettings::stLogarithmic;
|
||||||
(display == WaveTrack::SpectralSelectionLogDisplay)
|
|
||||||
;
|
|
||||||
const double rate = wt->GetRate();
|
const double rate = wt->GetRate();
|
||||||
const double frequency =
|
const double frequency =
|
||||||
PositionToFrequency(wt, true, mouseYCoordinate,
|
PositionToFrequency(wt, true, mouseYCoordinate,
|
||||||
@ -3685,7 +3676,7 @@ bool mayDragWidth, bool onlyWithinSnapDistance,
|
|||||||
// within the time boundaries
|
// within the time boundaries
|
||||||
if (!mViewInfo->selectedRegion.isPoint() &&
|
if (!mViewInfo->selectedRegion.isPoint() &&
|
||||||
t0 <= selend && selend < t1 &&
|
t0 <= selend && selend < t1 &&
|
||||||
isSpectrogramTrack(pTrack, &logF)) {
|
isSpectralSelectionTrack(pTrack, &logF)) {
|
||||||
const WaveTrack *const wt = static_cast<const WaveTrack*>(pTrack);
|
const WaveTrack *const wt = static_cast<const WaveTrack*>(pTrack);
|
||||||
const wxInt64 bottomSel = (f0 >= 0)
|
const wxInt64 bottomSel = (f0 >= 0)
|
||||||
? FrequencyToPosition(wt, f0, rect.y, rect.height, logF)
|
? FrequencyToPosition(wt, f0, rect.y, rect.height, logF)
|
||||||
@ -4694,11 +4685,12 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
|
|
||||||
float min, max, c, l, binSize = 0.0;
|
float min, max, c, l, binSize = 0.0;
|
||||||
const double rate = track->GetRate();
|
const double rate = track->GetRate();
|
||||||
const bool spectrum = (track->GetDisplay() == WaveTrack::SpectrumDisplay) ||
|
const bool spectral = (track->GetDisplay() == WaveTrack::Spectrum);
|
||||||
(track->GetDisplay() == WaveTrack::SpectralSelectionDisplay);
|
const bool spectrumLinear = spectral &&
|
||||||
const bool spectrumLog = (track->GetDisplay() == WaveTrack::SpectrumLogDisplay) ||
|
(track->GetSpectrogramSettings().scaleType == SpectrogramSettings::stLinear);
|
||||||
(track->GetDisplay() == WaveTrack::SpectralSelectionLogDisplay);
|
const bool spectrumLog = spectral &&
|
||||||
if(spectrum) {
|
(track->GetSpectrogramSettings().scaleType == SpectrogramSettings::stLogarithmic);
|
||||||
|
if (spectrumLinear) {
|
||||||
const SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
const SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
||||||
min = settings.GetMinFreq(rate);
|
min = settings.GetMinFreq(rate);
|
||||||
max = settings.GetMaxFreq(rate);
|
max = settings.GetMaxFreq(rate);
|
||||||
@ -4706,17 +4698,16 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
binSize = rate / fftLength;
|
binSize = rate / fftLength;
|
||||||
minBins = std::min(10, fftLength / 2); //minimum 10 freq bins, unless there are less
|
minBins = std::min(10, fftLength / 2); //minimum 10 freq bins, unless there are less
|
||||||
}
|
}
|
||||||
|
else if (spectrumLog) {
|
||||||
|
const SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
||||||
|
min = settings.GetLogMinFreq(rate);
|
||||||
|
max = settings.GetLogMaxFreq(rate);
|
||||||
|
const int fftLength = settings.GetFFTLength(false);
|
||||||
|
binSize = rate / fftLength;
|
||||||
|
minBins = std::min(10, fftLength / 2); //minimum 10 freq bins, unless there are less
|
||||||
|
}
|
||||||
else
|
else
|
||||||
if(spectrumLog) {
|
track->GetDisplayBounds(&min, &max);
|
||||||
const SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
|
||||||
min = settings.GetLogMinFreq(rate);
|
|
||||||
max = settings.GetLogMaxFreq(rate);
|
|
||||||
const int fftLength = settings.GetFFTLength(false);
|
|
||||||
binSize = rate / fftLength;
|
|
||||||
minBins = std::min(10, fftLength / 2); //minimum 10 freq bins, unless there are less
|
|
||||||
}
|
|
||||||
else
|
|
||||||
track->GetDisplayBounds(&min, &max);
|
|
||||||
if (IsDragZooming()) {
|
if (IsDragZooming()) {
|
||||||
// Drag Zoom
|
// Drag Zoom
|
||||||
float p1, p2, tmin, tmax;
|
float p1, p2, tmin, tmax;
|
||||||
@ -4746,7 +4737,7 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
min = (tmax * (1.0-p2) + tmin * p2);
|
min = (tmax * (1.0-p2) + tmin * p2);
|
||||||
|
|
||||||
// Enforce vertical zoom limits
|
// Enforce vertical zoom limits
|
||||||
if(spectrum) {
|
if(spectrumLinear) {
|
||||||
if(min < 0.)
|
if(min < 0.)
|
||||||
min = 0.;
|
min = 0.;
|
||||||
if(max < min + minBins * binSize)
|
if(max < min + minBins * binSize)
|
||||||
@ -4771,7 +4762,7 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
// Zoom out to -1.0...1.0 first, then, and only
|
// Zoom out to -1.0...1.0 first, then, and only
|
||||||
// then, if they click again, allow one more
|
// then, if they click again, allow one more
|
||||||
// zoom out.
|
// zoom out.
|
||||||
if(spectrum) {
|
if (spectrumLinear) {
|
||||||
if (event.ShiftDown() && event.RightUp()) {
|
if (event.ShiftDown() && event.RightUp()) {
|
||||||
// Zoom out full
|
// Zoom out full
|
||||||
min = 0.0;
|
min = 0.0;
|
||||||
@ -4840,7 +4831,7 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
else {
|
else {
|
||||||
// Zoom IN
|
// Zoom IN
|
||||||
float p1;
|
float p1;
|
||||||
if(spectrum) {
|
if (spectrumLinear) {
|
||||||
c = 0.5*(min+max);
|
c = 0.5*(min+max);
|
||||||
// Enforce maximum vertical zoom
|
// Enforce maximum vertical zoom
|
||||||
l = std::max( minBins * binSize, (c - min));
|
l = std::max( minBins * binSize, (c - min));
|
||||||
@ -4889,7 +4880,7 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(spectrum) {
|
if (spectrumLinear) {
|
||||||
SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
||||||
settings.SetMinFreq(min);
|
settings.SetMinFreq(min);
|
||||||
settings.SetMaxFreq(max);
|
settings.SetMaxFreq(max);
|
||||||
@ -4899,7 +4890,6 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
settings.SetMinFreq(min);
|
settings.SetMinFreq(min);
|
||||||
settings.SetMaxFreq(max);
|
settings.SetMaxFreq(max);
|
||||||
}
|
}
|
||||||
mTrackArtist->InvalidateSpectrumCache(mTracks);
|
|
||||||
}
|
}
|
||||||
else if(spectrumLog) {
|
else if(spectrumLog) {
|
||||||
SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
SpectrogramSettings &settings = track->GetSpectrogramSettings();
|
||||||
@ -4911,7 +4901,6 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
|||||||
settings.SetLogMinFreq(min);
|
settings.SetLogMinFreq(min);
|
||||||
settings.SetLogMaxFreq(max);
|
settings.SetLogMaxFreq(max);
|
||||||
}
|
}
|
||||||
mTrackArtist->InvalidateSpectrumCache(mTracks);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
track->SetDisplayBounds(min, max);
|
track->SetDisplayBounds(min, max);
|
||||||
@ -8568,10 +8557,7 @@ void TrackPanel::OnTrackMenu(Track *t)
|
|||||||
theMenu->Enable(OnWaveformID, display != WaveTrack::WaveformDisplay);
|
theMenu->Enable(OnWaveformID, display != WaveTrack::WaveformDisplay);
|
||||||
theMenu->Enable(OnWaveformDBID,
|
theMenu->Enable(OnWaveformDBID,
|
||||||
display != WaveTrack::WaveformDBDisplay);
|
display != WaveTrack::WaveformDBDisplay);
|
||||||
theMenu->Enable(OnSpectrumID, display != WaveTrack::SpectrumDisplay);
|
theMenu->Enable(OnSpectrumID, display != WaveTrack::Spectrum);
|
||||||
theMenu->Enable(OnSpectrumLogID, display != WaveTrack::SpectrumLogDisplay);
|
|
||||||
theMenu->Enable(OnSpectralSelID, display != WaveTrack::SpectralSelectionDisplay);
|
|
||||||
theMenu->Enable(OnSpectralSelLogID, display != WaveTrack::SpectralSelectionLogDisplay);
|
|
||||||
theMenu->Enable(OnPitchID, display != WaveTrack::PitchDisplay);
|
theMenu->Enable(OnPitchID, display != WaveTrack::PitchDisplay);
|
||||||
theMenu->Enable(OnViewSettingsID, true);
|
theMenu->Enable(OnViewSettingsID, true);
|
||||||
|
|
||||||
@ -9087,26 +9073,17 @@ void TrackPanel::OnSetDisplay(wxCommandEvent & event)
|
|||||||
case OnWaveformDBID:
|
case OnWaveformDBID:
|
||||||
id = WaveTrack::WaveformDBDisplay; break;
|
id = WaveTrack::WaveformDBDisplay; break;
|
||||||
case OnSpectrumID:
|
case OnSpectrumID:
|
||||||
id = WaveTrack::SpectrumDisplay; break;
|
id = WaveTrack::Spectrum; break;
|
||||||
case OnSpectrumLogID:
|
|
||||||
id = WaveTrack::SpectrumLogDisplay; break;
|
|
||||||
case OnSpectralSelID:
|
|
||||||
id = WaveTrack::SpectralSelectionDisplay; break;
|
|
||||||
case OnSpectralSelLogID:
|
|
||||||
id = WaveTrack::SpectralSelectionLogDisplay; break;
|
|
||||||
case OnPitchID:
|
case OnPitchID:
|
||||||
id = WaveTrack::PitchDisplay; break;
|
id = WaveTrack::PitchDisplay; break;
|
||||||
}
|
}
|
||||||
WaveTrack *wt = (WaveTrack *) mPopupMenuTarget;
|
WaveTrack *wt = (WaveTrack *) mPopupMenuTarget;
|
||||||
if (wt->GetDisplay() != id) {
|
if (wt->GetDisplay() != id) {
|
||||||
wt->SetDisplay(WaveTrack::WaveTrackDisplay(id));
|
wt->SetDisplay(WaveTrack::WaveTrackDisplay(id));
|
||||||
mTrackArtist->InvalidateSpectrumCache(wt);
|
|
||||||
|
|
||||||
WaveTrack *l = (WaveTrack *) wt->GetLink();
|
WaveTrack *l = static_cast<WaveTrack *>(wt->GetLink());
|
||||||
if (l) {
|
if (l)
|
||||||
l->SetDisplay(WaveTrack::WaveTrackDisplay(id));
|
l->SetDisplay(WaveTrack::WaveTrackDisplay(id));
|
||||||
mTrackArtist->InvalidateSpectrumCache(l);
|
|
||||||
}
|
|
||||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||||
if (wt->GetDisplay() == WaveTrack::WaveformDisplay) {
|
if (wt->GetDisplay() == WaveTrack::WaveformDisplay) {
|
||||||
wt->SetVirtualState(false);
|
wt->SetVirtualState(false);
|
||||||
|
@ -127,6 +127,7 @@ public:
|
|||||||
len = cacheLen;
|
len = cacheLen;
|
||||||
values = new float[len];
|
values = new float[len];
|
||||||
valid = false;
|
valid = false;
|
||||||
|
scaleType = 0;
|
||||||
range = gain = -1;
|
range = gain = -1;
|
||||||
minFreq = maxFreq = -1;
|
minFreq = maxFreq = -1;
|
||||||
}
|
}
|
||||||
@ -140,6 +141,7 @@ public:
|
|||||||
float *values;
|
float *values;
|
||||||
bool valid;
|
bool valid;
|
||||||
|
|
||||||
|
int scaleType;
|
||||||
int range;
|
int range;
|
||||||
int gain;
|
int gain;
|
||||||
int minFreq;
|
int minFreq;
|
||||||
|
@ -235,9 +235,12 @@ WaveTrack::ConvertLegacyDisplayValue(int oldValue)
|
|||||||
case WaveformDB:
|
case WaveformDB:
|
||||||
newValue = WaveTrack::WaveformDBDisplay; break;
|
newValue = WaveTrack::WaveformDBDisplay; break;
|
||||||
case Spectrogram:
|
case Spectrogram:
|
||||||
newValue = WaveTrack::SpectrumDisplay; break;
|
case SpectrogramLogF:
|
||||||
|
newValue = WaveTrack::Spectrum; break;
|
||||||
|
/*
|
||||||
case SpectrogramLogF:
|
case SpectrogramLogF:
|
||||||
newValue = WaveTrack::SpectrumLogDisplay; break;
|
newValue = WaveTrack::SpectrumLogDisplay; break;
|
||||||
|
*/
|
||||||
case Pitch:
|
case Pitch:
|
||||||
newValue = WaveTrack::PitchDisplay; break;
|
newValue = WaveTrack::PitchDisplay; break;
|
||||||
}
|
}
|
||||||
@ -248,11 +251,24 @@ WaveTrack::ConvertLegacyDisplayValue(int oldValue)
|
|||||||
WaveTrack::WaveTrackDisplay
|
WaveTrack::WaveTrackDisplay
|
||||||
WaveTrack::ValidateWaveTrackDisplay(WaveTrackDisplay display)
|
WaveTrack::ValidateWaveTrackDisplay(WaveTrackDisplay display)
|
||||||
{
|
{
|
||||||
// To do, in future: detect obsolete values between min and max
|
switch (display) {
|
||||||
if (display >= int(MinDisplay) && display <= int(MaxDisplay))
|
// non-obsolete codes
|
||||||
|
case WaveformDisplay:
|
||||||
|
case WaveformDBDisplay:
|
||||||
|
case Spectrum:
|
||||||
|
case PitchDisplay:
|
||||||
return display;
|
return display;
|
||||||
else
|
|
||||||
|
// obsolete codes
|
||||||
|
case obsolete1: // was SpectrumLogDisplay
|
||||||
|
case obsolete2: // was SpectralSelectionDisplay
|
||||||
|
case obsolete3: // was SpectralSelectionLogDisplay
|
||||||
|
return Spectrum;
|
||||||
|
|
||||||
|
// codes out of bounds (from future prefs files?)
|
||||||
|
default:
|
||||||
return MinDisplay;
|
return MinDisplay;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaveTrack::GetDisplayBounds(float *min, float *max)
|
void WaveTrack::GetDisplayBounds(float *min, float *max)
|
||||||
|
@ -418,10 +418,12 @@ class AUDACITY_DLL_API WaveTrack: public Track {
|
|||||||
MinDisplay = WaveformDisplay,
|
MinDisplay = WaveformDisplay,
|
||||||
|
|
||||||
WaveformDBDisplay,
|
WaveformDBDisplay,
|
||||||
SpectrumDisplay,
|
Spectrum,
|
||||||
SpectrumLogDisplay,
|
|
||||||
SpectralSelectionDisplay,
|
obsolete1, // was SpectrumLogDisplay
|
||||||
SpectralSelectionLogDisplay,
|
obsolete2, // was SpectralSelectionDisplay
|
||||||
|
obsolete3, // was SpectralSelectionLogDisplay
|
||||||
|
|
||||||
PitchDisplay,
|
PitchDisplay,
|
||||||
|
|
||||||
// Add values here, and update MaxDisplay.
|
// Add values here, and update MaxDisplay.
|
||||||
@ -441,14 +443,10 @@ class AUDACITY_DLL_API WaveTrack: public Track {
|
|||||||
static WaveTrackDisplay ValidateWaveTrackDisplay(WaveTrackDisplay display);
|
static WaveTrackDisplay ValidateWaveTrackDisplay(WaveTrackDisplay display);
|
||||||
|
|
||||||
void SetDisplay(WaveTrackDisplay display) {
|
void SetDisplay(WaveTrackDisplay display) {
|
||||||
if(mDisplay < 2)
|
if (mDisplay < Spectrum)
|
||||||
// remember last display mode for wave and wavedb so they can remap the vertical ruler
|
// remember last display mode for wave and wavedb so they can remap the vertical ruler
|
||||||
mLastDisplay = mDisplay;
|
mLastDisplay = mDisplay;
|
||||||
mDisplay = display;
|
mDisplay = display;
|
||||||
if( mDisplay == SpectralSelectionDisplay ){
|
|
||||||
}
|
|
||||||
if( mDisplay == SpectralSelectionLogDisplay ){
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
WaveTrackDisplay GetDisplay() const { return mDisplay; }
|
WaveTrackDisplay GetDisplay() const { return mDisplay; }
|
||||||
int GetLastDisplay() {return mLastDisplay;}
|
int GetLastDisplay() {return mLastDisplay;}
|
||||||
|
@ -45,6 +45,7 @@ effects from this one class.
|
|||||||
#include "../../FileNames.h"
|
#include "../../FileNames.h"
|
||||||
#include "../../Internat.h"
|
#include "../../Internat.h"
|
||||||
#include "../../LabelTrack.h"
|
#include "../../LabelTrack.h"
|
||||||
|
#include "../../prefs/SpectrogramSettings.h"
|
||||||
#include "../../Project.h"
|
#include "../../Project.h"
|
||||||
#include "../../ShuttleGui.h"
|
#include "../../ShuttleGui.h"
|
||||||
#include "../../WaveClip.h"
|
#include "../../WaveClip.h"
|
||||||
@ -603,8 +604,8 @@ bool NyquistEffect::Process()
|
|||||||
|
|
||||||
const WaveTrack::WaveTrackDisplay display = mCurTrack[0]->GetDisplay();
|
const WaveTrack::WaveTrackDisplay display = mCurTrack[0]->GetDisplay();
|
||||||
const bool bAllowSpectralEditing =
|
const bool bAllowSpectralEditing =
|
||||||
(display == WaveTrack::SpectralSelectionDisplay) ||
|
(display == WaveTrack::Spectrum) &&
|
||||||
(display == WaveTrack::SpectralSelectionLogDisplay);
|
mCurTrack[0]->GetSpectrogramSettings().SpectralSelectionEnabled();
|
||||||
|
|
||||||
if (bAllowSpectralEditing) {
|
if (bAllowSpectralEditing) {
|
||||||
#if defined(EXPERIMENTAL_SPECTRAL_EDITING)
|
#if defined(EXPERIMENTAL_SPECTRAL_EDITING)
|
||||||
@ -790,10 +791,7 @@ bool NyquistEffect::ProcessOne()
|
|||||||
{
|
{
|
||||||
case WaveTrack::WaveformDisplay: view = wxT("\"Waveform\""); break;
|
case WaveTrack::WaveformDisplay: view = wxT("\"Waveform\""); break;
|
||||||
case WaveTrack::WaveformDBDisplay: view = wxT("\"Waveform (dB)\""); break;
|
case WaveTrack::WaveformDBDisplay: view = wxT("\"Waveform (dB)\""); break;
|
||||||
case WaveTrack::SpectrumDisplay: view = wxT("\"Spectrogram\""); break;
|
case WaveTrack::Spectrum: view = wxT("\"Spectrum\""); break;
|
||||||
case WaveTrack::SpectrumLogDisplay: view = wxT("\"Spectrogram log(f)\""); break;
|
|
||||||
case WaveTrack::SpectralSelectionDisplay: view = wxT("\"Spectral Selection\""); break;
|
|
||||||
case WaveTrack::SpectralSelectionLogDisplay: view = wxT("\"Spectral Selection log(f)\""); break;
|
|
||||||
case WaveTrack::PitchDisplay: view = wxT("\"Pitch (EAC)\""); break;
|
case WaveTrack::PitchDisplay: view = wxT("\"Pitch (EAC)\""); break;
|
||||||
default: view = wxT("NIL"); break;
|
default: view = wxT("NIL"); break;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,33 @@ Paul Licameli
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
SpectrogramSettings::Globals::Globals()
|
||||||
|
{
|
||||||
|
LoadPrefs();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpectrogramSettings::Globals::SavePrefs()
|
||||||
|
{
|
||||||
|
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
gPrefs->Write(wxT("/Spectrum/EnableSpectralSelection"), spectralSelection);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpectrogramSettings::Globals::LoadPrefs()
|
||||||
|
{
|
||||||
|
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
spectralSelection
|
||||||
|
= (gPrefs->Read(wxT("/Spectrum/EnableSpectralSelection"), 0L) != 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
SpectrogramSettings::Globals
|
||||||
|
&SpectrogramSettings::Globals::Get()
|
||||||
|
{
|
||||||
|
static Globals instance;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
SpectrogramSettings::SpectrogramSettings()
|
SpectrogramSettings::SpectrogramSettings()
|
||||||
: hFFT(0)
|
: hFFT(0)
|
||||||
, window(0)
|
, window(0)
|
||||||
@ -47,6 +74,10 @@ SpectrogramSettings::SpectrogramSettings(const SpectrogramSettings &other)
|
|||||||
, zeroPaddingFactor(other.zeroPaddingFactor)
|
, zeroPaddingFactor(other.zeroPaddingFactor)
|
||||||
#endif
|
#endif
|
||||||
, isGrayscale(other.isGrayscale)
|
, isGrayscale(other.isGrayscale)
|
||||||
|
, scaleType(other.scaleType)
|
||||||
|
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
, spectralSelection(other.spectralSelection)
|
||||||
|
#endif
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||||
, fftYGrid(other.fftYGrid)
|
, fftYGrid(other.fftYGrid)
|
||||||
#endif
|
#endif
|
||||||
@ -79,6 +110,10 @@ SpectrogramSettings &SpectrogramSettings::operator= (const SpectrogramSettings &
|
|||||||
zeroPaddingFactor = other.zeroPaddingFactor;
|
zeroPaddingFactor = other.zeroPaddingFactor;
|
||||||
#endif
|
#endif
|
||||||
isGrayscale = other.isGrayscale;
|
isGrayscale = other.isGrayscale;
|
||||||
|
scaleType = other.scaleType;
|
||||||
|
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
spectralSelection = other.spectralSelection;
|
||||||
|
#endif
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||||
fftYGrid = other.fftYGrid;
|
fftYGrid = other.fftYGrid;
|
||||||
#endif
|
#endif
|
||||||
@ -102,6 +137,35 @@ SpectrogramSettings& SpectrogramSettings::defaults()
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
wxArrayString &scaleNamesArray()
|
||||||
|
{
|
||||||
|
static wxArrayString theArray;
|
||||||
|
return theArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//static
|
||||||
|
void SpectrogramSettings::InvalidateNames()
|
||||||
|
{
|
||||||
|
scaleNamesArray().Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
//static
|
||||||
|
const wxArrayString &SpectrogramSettings::GetScaleNames()
|
||||||
|
{
|
||||||
|
wxArrayString &theArray = scaleNamesArray();
|
||||||
|
|
||||||
|
if (theArray.IsEmpty()) {
|
||||||
|
// Keep in correspondence with enum SpectrogramSettings::ScaleType:
|
||||||
|
theArray.Add(_("Linear"));
|
||||||
|
theArray.Add(_("Logarithmic"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return theArray;
|
||||||
|
}
|
||||||
|
|
||||||
bool SpectrogramSettings::Validate(bool quiet)
|
bool SpectrogramSettings::Validate(bool quiet)
|
||||||
{
|
{
|
||||||
if (!quiet &&
|
if (!quiet &&
|
||||||
@ -155,6 +219,10 @@ bool SpectrogramSettings::Validate(bool quiet)
|
|||||||
// preference files, which could be or from future versions. Validate quietly.
|
// preference files, which could be or from future versions. Validate quietly.
|
||||||
windowType =
|
windowType =
|
||||||
std::max(0, std::min(NumWindowFuncs() - 1, windowType));
|
std::max(0, std::min(NumWindowFuncs() - 1, windowType));
|
||||||
|
scaleType =
|
||||||
|
ScaleType(std::max(0,
|
||||||
|
std::min(int(SpectrogramSettings::stNumScaleTypes) - 1,
|
||||||
|
int(scaleType))));
|
||||||
ConvertToEnumeratedWindowSizes();
|
ConvertToEnumeratedWindowSizes();
|
||||||
ConvertToActualWindowSizes();
|
ConvertToActualWindowSizes();
|
||||||
|
|
||||||
@ -181,6 +249,12 @@ void SpectrogramSettings::LoadPrefs()
|
|||||||
|
|
||||||
isGrayscale = (gPrefs->Read(wxT("/Spectrum/Grayscale"), 0L) != 0);
|
isGrayscale = (gPrefs->Read(wxT("/Spectrum/Grayscale"), 0L) != 0);
|
||||||
|
|
||||||
|
scaleType = ScaleType(gPrefs->Read(wxT("/Spectrum/ScaleType"), 0L));
|
||||||
|
|
||||||
|
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
spectralSelection = (gPrefs->Read(wxT("/Spectrum/EnableSpectralSelection"), 0L) != 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||||
fftYGrid = (gPrefs->Read(wxT("/Spectrum/FFTYGrid"), 0L) != 0);
|
fftYGrid = (gPrefs->Read(wxT("/Spectrum/FFTYGrid"), 0L) != 0);
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
#endif //EXPERIMENTAL_FFT_Y_GRID
|
||||||
@ -235,6 +309,12 @@ void SpectrogramSettings::SavePrefs()
|
|||||||
|
|
||||||
gPrefs->Write(wxT("/Spectrum/Grayscale"), isGrayscale);
|
gPrefs->Write(wxT("/Spectrum/Grayscale"), isGrayscale);
|
||||||
|
|
||||||
|
gPrefs->Write(wxT("/Spectrum/ScaleType"), scaleType);
|
||||||
|
|
||||||
|
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
gPrefs->Write(wxT("/Spectrum/EnableSpectralSelection"), spectralSelection);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||||
gPrefs->Write(wxT("/Spectrum/FFTYGrid"), fftYGrid);
|
gPrefs->Write(wxT("/Spectrum/FFTYGrid"), fftYGrid);
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
#endif //EXPERIMENTAL_FFT_Y_GRID
|
||||||
@ -443,3 +523,12 @@ int SpectrogramSettings::GetFFTLength(bool autocorrelation) const
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SpectrogramSettings::SpectralSelectionEnabled() const
|
||||||
|
{
|
||||||
|
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
return Globals::Get().spectralSelection;
|
||||||
|
#else
|
||||||
|
return spectralSelection;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@ -13,14 +13,33 @@ Paul Licameli
|
|||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
|
#undef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
|
||||||
struct FFTParam;
|
struct FFTParam;
|
||||||
class SpectrumPrefs;
|
class SpectrumPrefs;
|
||||||
|
class wxArrayString;
|
||||||
|
|
||||||
class SpectrogramSettings
|
class SpectrogramSettings
|
||||||
{
|
{
|
||||||
friend class SpectrumPrefs;
|
friend class SpectrumPrefs;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Singleton for settings that are not per-track
|
||||||
|
class Globals
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static Globals &Get();
|
||||||
|
void SavePrefs();
|
||||||
|
|
||||||
|
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
bool spectralSelection;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
|
Globals();
|
||||||
|
void LoadPrefs();
|
||||||
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
LogMinWindowSize = 3,
|
LogMinWindowSize = 3,
|
||||||
LogMaxWindowSize = 15,
|
LogMaxWindowSize = 15,
|
||||||
@ -28,6 +47,19 @@ public:
|
|||||||
NumWindowSizes = LogMaxWindowSize - LogMinWindowSize + 1,
|
NumWindowSizes = LogMaxWindowSize - LogMinWindowSize + 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Do not assume that this enumeration will remain the
|
||||||
|
// same as NumberScaleType in future. That enum may become
|
||||||
|
// more general purpose.
|
||||||
|
enum ScaleType {
|
||||||
|
stLinear,
|
||||||
|
stLogarithmic,
|
||||||
|
|
||||||
|
stNumScaleTypes,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void InvalidateNames(); // in case of language change
|
||||||
|
static const wxArrayString &GetScaleNames();
|
||||||
|
|
||||||
static SpectrogramSettings &defaults();
|
static SpectrogramSettings &defaults();
|
||||||
SpectrogramSettings();
|
SpectrogramSettings();
|
||||||
SpectrogramSettings(const SpectrogramSettings &other);
|
SpectrogramSettings(const SpectrogramSettings &other);
|
||||||
@ -58,6 +90,7 @@ public:
|
|||||||
int GetMaxFreq(double rate) const;
|
int GetMaxFreq(double rate) const;
|
||||||
int GetLogMinFreq(double rate) const;
|
int GetLogMinFreq(double rate) const;
|
||||||
int GetLogMaxFreq(double rate) const;
|
int GetLogMaxFreq(double rate) const;
|
||||||
|
bool SpectralSelectionEnabled() const;
|
||||||
|
|
||||||
void SetMinFreq(int freq);
|
void SetMinFreq(int freq);
|
||||||
void SetMaxFreq(int freq);
|
void SetMaxFreq(int freq);
|
||||||
@ -79,6 +112,12 @@ public:
|
|||||||
|
|
||||||
bool isGrayscale;
|
bool isGrayscale;
|
||||||
|
|
||||||
|
ScaleType scaleType;
|
||||||
|
|
||||||
|
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
bool spectralSelection; // But should this vary per track? -- PRL
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||||
bool fftYGrid;
|
bool fftYGrid;
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
#endif //EXPERIMENTAL_FFT_Y_GRID
|
||||||
@ -98,5 +137,4 @@ public:
|
|||||||
mutable float *window;
|
mutable float *window;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,12 +59,14 @@ enum {
|
|||||||
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
||||||
ID_WINDOW_TYPE,
|
ID_WINDOW_TYPE,
|
||||||
ID_PADDING_SIZE,
|
ID_PADDING_SIZE,
|
||||||
|
ID_SCALE,
|
||||||
ID_MINIMUM,
|
ID_MINIMUM,
|
||||||
ID_MAXIMUM,
|
ID_MAXIMUM,
|
||||||
ID_GAIN,
|
ID_GAIN,
|
||||||
ID_RANGE,
|
ID_RANGE,
|
||||||
ID_FREQUENCY_GAIN,
|
ID_FREQUENCY_GAIN,
|
||||||
ID_GRAYSCALE,
|
ID_GRAYSCALE,
|
||||||
|
ID_SPECTRAL_SELECTION,
|
||||||
#endif
|
#endif
|
||||||
ID_DEFAULTS,
|
ID_DEFAULTS,
|
||||||
ID_APPLY,
|
ID_APPLY,
|
||||||
@ -93,6 +95,7 @@ void SpectrumPrefs::Populate(int windowSize)
|
|||||||
mTypeChoices.Add(WindowFuncName(i));
|
mTypeChoices.Add(WindowFuncName(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mScaleChoices = SpectrogramSettings::GetScaleNames();
|
||||||
|
|
||||||
//------------------------- Main section --------------------
|
//------------------------- Main section --------------------
|
||||||
// Now construct the GUI itself.
|
// Now construct the GUI itself.
|
||||||
@ -182,6 +185,10 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
{
|
{
|
||||||
S.StartTwoColumn();
|
S.StartTwoColumn();
|
||||||
{
|
{
|
||||||
|
S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")),
|
||||||
|
*(int*)&mTempSettings.scaleType,
|
||||||
|
&mScaleChoices);
|
||||||
|
|
||||||
mMinFreq =
|
mMinFreq =
|
||||||
S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&nimum Frequency (Hz):"),
|
S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&nimum Frequency (Hz):"),
|
||||||
mTempSettings.minFreq,
|
mTempSettings.minFreq,
|
||||||
@ -212,6 +219,11 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.Id(ID_GRAYSCALE).TieCheckBox(_("S&how the spectrum using grayscale colors"),
|
S.Id(ID_GRAYSCALE).TieCheckBox(_("S&how the spectrum using grayscale colors"),
|
||||||
mTempSettings.isGrayscale);
|
mTempSettings.isGrayscale);
|
||||||
|
|
||||||
|
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(_("Ena&ble spectral selection"),
|
||||||
|
mTempSettings.spectralSelection);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||||
S.TieCheckBox(_("Show a grid along the &Y-axis"),
|
S.TieCheckBox(_("Show a grid along the &Y-axis"),
|
||||||
mTempSettings.fftYGrid);
|
mTempSettings.fftYGrid);
|
||||||
@ -248,6 +260,15 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
}
|
}
|
||||||
// S.EndStatic();
|
// S.EndStatic();
|
||||||
|
|
||||||
|
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
|
S.StartStatic(_("Global settings"));
|
||||||
|
{
|
||||||
|
S.TieCheckBox(_("Ena&ble spectral selection"),
|
||||||
|
SpectrogramSettings::Globals::Get().spectralSelection);
|
||||||
|
}
|
||||||
|
S.EndStatic();
|
||||||
|
#endif
|
||||||
|
|
||||||
S.StartMultiColumn(2, wxALIGN_RIGHT);
|
S.StartMultiColumn(2, wxALIGN_RIGHT);
|
||||||
{
|
{
|
||||||
S.Id(ID_APPLY).AddButton(_("Appl&y"));
|
S.Id(ID_APPLY).AddButton(_("Appl&y"));
|
||||||
@ -331,7 +352,10 @@ bool SpectrumPrefs::Apply()
|
|||||||
ShuttleGui S(this, eIsGettingFromDialog);
|
ShuttleGui S(this, eIsGettingFromDialog);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
|
||||||
mTempSettings.ConvertToActualWindowSizes();
|
mTempSettings.ConvertToActualWindowSizes();
|
||||||
|
SpectrogramSettings::Globals::Get().SavePrefs(); // always
|
||||||
|
|
||||||
if (mWt) {
|
if (mWt) {
|
||||||
if (mDefaulted) {
|
if (mDefaulted) {
|
||||||
mWt->SetSpectrogramSettings(NULL);
|
mWt->SetSpectrogramSettings(NULL);
|
||||||
@ -358,11 +382,9 @@ bool SpectrumPrefs::Apply()
|
|||||||
|
|
||||||
if (mWt && isOpenPage) {
|
if (mWt && isOpenPage) {
|
||||||
// Future: open page will determine the track view type
|
// Future: open page will determine the track view type
|
||||||
/*
|
|
||||||
mWt->SetDisplay(WaveTrack::Spectrum);
|
mWt->SetDisplay(WaveTrack::Spectrum);
|
||||||
if (partner)
|
if (partner)
|
||||||
partner->SetDisplay(WaveTrack::Spectrum);
|
partner->SetDisplay(WaveTrack::Spectrum);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -421,14 +443,17 @@ BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel)
|
|||||||
// Several controls with common routine that unchecks the default box
|
// Several controls with common routine that unchecks the default box
|
||||||
EVT_CHOICE(ID_WINDOW_TYPE, SpectrumPrefs::OnControl)
|
EVT_CHOICE(ID_WINDOW_TYPE, SpectrumPrefs::OnControl)
|
||||||
EVT_CHOICE(ID_PADDING_SIZE, SpectrumPrefs::OnControl)
|
EVT_CHOICE(ID_PADDING_SIZE, SpectrumPrefs::OnControl)
|
||||||
|
EVT_CHOICE(ID_SCALE, SpectrumPrefs::OnControl)
|
||||||
EVT_TEXT(ID_MINIMUM, SpectrumPrefs::OnControl)
|
EVT_TEXT(ID_MINIMUM, SpectrumPrefs::OnControl)
|
||||||
EVT_TEXT(ID_MAXIMUM, SpectrumPrefs::OnControl)
|
EVT_TEXT(ID_MAXIMUM, SpectrumPrefs::OnControl)
|
||||||
EVT_TEXT(ID_GAIN, SpectrumPrefs::OnControl)
|
EVT_TEXT(ID_GAIN, SpectrumPrefs::OnControl)
|
||||||
EVT_TEXT(ID_RANGE, SpectrumPrefs::OnControl)
|
EVT_TEXT(ID_RANGE, SpectrumPrefs::OnControl)
|
||||||
EVT_TEXT(ID_FREQUENCY_GAIN, SpectrumPrefs::OnControl)
|
EVT_TEXT(ID_FREQUENCY_GAIN, SpectrumPrefs::OnControl)
|
||||||
EVT_CHECKBOX(ID_GRAYSCALE, SpectrumPrefs::OnControl)
|
EVT_CHECKBOX(ID_GRAYSCALE, SpectrumPrefs::OnControl)
|
||||||
|
EVT_CHECKBOX(ID_SPECTRAL_SELECTION, SpectrumPrefs::OnControl)
|
||||||
|
|
||||||
EVT_BUTTON(ID_APPLY, SpectrumPrefs::OnApply)
|
EVT_BUTTON(ID_APPLY, SpectrumPrefs::OnApply)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
SpectrumPrefsFactory::SpectrumPrefsFactory(WaveTrack *wt)
|
SpectrumPrefsFactory::SpectrumPrefsFactory(WaveTrack *wt)
|
||||||
|
@ -74,6 +74,7 @@ class SpectrumPrefs:public PrefsPanel
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxArrayString mTypeChoices;
|
wxArrayString mTypeChoices;
|
||||||
|
wxArrayString mScaleChoices;
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FIND_NOTES
|
#ifdef EXPERIMENTAL_FIND_NOTES
|
||||||
|
@ -65,17 +65,8 @@ void TracksPrefs::Populate()
|
|||||||
mViewChoices.Add(_("Waveform (dB)"));
|
mViewChoices.Add(_("Waveform (dB)"));
|
||||||
mViewCodes.Add(int(WaveTrack::WaveformDBDisplay));
|
mViewCodes.Add(int(WaveTrack::WaveformDBDisplay));
|
||||||
|
|
||||||
mViewChoices.Add(_("Spectrogram"));
|
mViewChoices.Add(_("Spectrum"));
|
||||||
mViewCodes.Add(int(WaveTrack::SpectrumDisplay));
|
mViewCodes.Add(WaveTrack::Spectrum);
|
||||||
|
|
||||||
mViewChoices.Add(_("Spectrogram log(f)"));
|
|
||||||
mViewCodes.Add(int(WaveTrack::SpectrumLogDisplay));
|
|
||||||
|
|
||||||
mViewChoices.Add(_("Spectral Selection"));
|
|
||||||
mViewCodes.Add(int(WaveTrack::SpectralSelectionDisplay));
|
|
||||||
|
|
||||||
mViewChoices.Add(_("Spectral Selection log(f)"));
|
|
||||||
mViewCodes.Add(int(WaveTrack::SpectralSelectionLogDisplay));
|
|
||||||
|
|
||||||
mViewChoices.Add(_("Pitch (EAC)"));
|
mViewChoices.Add(_("Pitch (EAC)"));
|
||||||
mViewCodes.Add(int(WaveTrack::PitchDisplay));
|
mViewCodes.Add(int(WaveTrack::PitchDisplay));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user