mirror of
https://codeberg.org/tenacityteam/tenacity
synced 2025-09-28 17:26:23 +02:00
remove unused EXPERIMENTAL_FFT_Y_GRID code
Signed-off-by: Hailey Somerville <hailey@hails.org>
This commit is contained in:
committed by
Avery King
parent
b340835d4f
commit
be1fd954c1
@@ -59,11 +59,6 @@ IntSetting SpectrumRange{
|
|||||||
L"/Spectrum/Range", 80 };
|
L"/Spectrum/Range", 80 };
|
||||||
IntSetting SpectrumZeroPaddingFactor{
|
IntSetting SpectrumZeroPaddingFactor{
|
||||||
L"/Spectrum/ZeroPaddingFactor", 2 };
|
L"/Spectrum/ZeroPaddingFactor", 2 };
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
BoolSetting SpectrumYGrid{
|
|
||||||
L"/Spectrum/FFTYGrid", false};
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SpectrogramSettings::Globals::Globals()
|
SpectrogramSettings::Globals::Globals()
|
||||||
@@ -147,9 +142,6 @@ SpectrogramSettings::SpectrogramSettings(const SpectrogramSettings &other)
|
|||||||
, spectralSelection(other.spectralSelection)
|
, spectralSelection(other.spectralSelection)
|
||||||
#endif
|
#endif
|
||||||
, algorithm(other.algorithm)
|
, algorithm(other.algorithm)
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
, fftYGrid(other.fftYGrid)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Do not copy these!
|
// Do not copy these!
|
||||||
, hFFT{}
|
, hFFT{}
|
||||||
@@ -176,9 +168,6 @@ SpectrogramSettings &SpectrogramSettings::operator= (const SpectrogramSettings &
|
|||||||
spectralSelection = other.spectralSelection;
|
spectralSelection = other.spectralSelection;
|
||||||
#endif
|
#endif
|
||||||
algorithm = other.algorithm;
|
algorithm = other.algorithm;
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
fftYGrid = other.fftYGrid;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Invalidate the caches
|
// Invalidate the caches
|
||||||
DestroyWindows();
|
DestroyWindows();
|
||||||
@@ -362,10 +351,6 @@ void SpectrogramSettings::LoadPrefs()
|
|||||||
|
|
||||||
algorithm = static_cast<Algorithm>(SpectrumAlgorithm.Read());
|
algorithm = static_cast<Algorithm>(SpectrumAlgorithm.Read());
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
fftYGrid = SpectrumYGrid.Read();
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
|
|
||||||
// Enforce legal values
|
// Enforce legal values
|
||||||
Validate(true);
|
Validate(true);
|
||||||
|
|
||||||
@@ -400,10 +385,6 @@ void SpectrogramSettings::SavePrefs()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
SpectrumAlgorithm.Write(static_cast<int>(algorithm));
|
SpectrumAlgorithm.Write(static_cast<int>(algorithm));
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
SpectrumYGrid.Write(fftYGrid);
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a temporary hack until SpectrogramSettings gets fully integrated
|
// This is a temporary hack until SpectrogramSettings gets fully integrated
|
||||||
@@ -448,11 +429,6 @@ void SpectrogramSettings::UpdatePrefs()
|
|||||||
if (algorithm == defaults().algorithm)
|
if (algorithm == defaults().algorithm)
|
||||||
algorithm = static_cast<Algorithm>(SpectrumAlgorithm.Read());
|
algorithm = static_cast<Algorithm>(SpectrumAlgorithm.Read());
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
if (fftYGrid == defaults().fftYGrid)
|
|
||||||
fftYGrid = SpectrumYGrid.Read();
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
|
|
||||||
// Enforce legal values
|
// Enforce legal values
|
||||||
Validate(true);
|
Validate(true);
|
||||||
}
|
}
|
||||||
|
@@ -182,10 +182,6 @@ public:
|
|||||||
};
|
};
|
||||||
Algorithm algorithm;
|
Algorithm algorithm;
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
bool fftYGrid;
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
|
|
||||||
// Following fields are derived from preferences.
|
// Following fields are derived from preferences.
|
||||||
|
|
||||||
// Variables used for computing the spectrum
|
// Variables used for computing the spectrum
|
||||||
|
@@ -49,10 +49,6 @@ set( EXPERIMENTAL_OPTIONS_LIST
|
|||||||
#RIGHT_ALIGNED_TEXTBOXES
|
#RIGHT_ALIGNED_TEXTBOXES
|
||||||
#VOICE_DETECTION
|
#VOICE_DETECTION
|
||||||
|
|
||||||
# AM, 22.Nov 2007:
|
|
||||||
# A Frequency Grid for the Spectrum Log(f) & Find Notes modes
|
|
||||||
#FFT_Y_GRID
|
|
||||||
|
|
||||||
# Andy Coder, 03.Mar 2009:
|
# Andy Coder, 03.Mar 2009:
|
||||||
# Allow keyboard seeking before initial playback position
|
# Allow keyboard seeking before initial playback position
|
||||||
#SEEK_BEHIND_CURSOR
|
#SEEK_BEHIND_CURSOR
|
||||||
|
@@ -100,10 +100,6 @@ public:
|
|||||||
wxBrush beatStrongSelBrush[2];
|
wxBrush beatStrongSelBrush[2];
|
||||||
wxBrush beatWeakSelBrush[2];
|
wxBrush beatWeakSelBrush[2];
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
bool fftYGridOld;
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
|
|
||||||
const SelectedRegion *pSelectedRegion{};
|
const SelectedRegion *pSelectedRegion{};
|
||||||
ZoomInfo *pZoomInfo{};
|
ZoomInfo *pZoomInfo{};
|
||||||
const PendingTracks *pPendingTracks{};
|
const PendingTracks *pPendingTracks{};
|
||||||
|
@@ -276,10 +276,6 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
mTempSettings.spectralSelection);
|
mTempSettings.spectralSelection);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
S.TieCheckBox(XO("Show a grid along the &Y-axis"),
|
|
||||||
mTempSettings.fftYGrid);
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
|
|
||||||
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
|
||||||
S.StartStatic(XO("Global settings"));
|
S.StartStatic(XO("Global settings"));
|
||||||
|
@@ -399,10 +399,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context,
|
|||||||
const int &range = settings.range;
|
const int &range = settings.range;
|
||||||
const int &gain = settings.gain;
|
const int &gain = settings.gain;
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
const bool &fftYGrid = settings.fftYGrid;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||||
|
|
||||||
// We draw directly to a bit image in memory,
|
// We draw directly to a bit image in memory,
|
||||||
@@ -451,27 +447,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context,
|
|||||||
bins[yy] = nextBin;
|
bins[yy] = nextBin;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
const float
|
|
||||||
log2 = logf(2.0f),
|
|
||||||
scale2 = (lmax - lmin) / log2,
|
|
||||||
lmin2 = lmin / log2;
|
|
||||||
|
|
||||||
ArrayOf<bool> yGrid{size_t(mid.height)};
|
|
||||||
for (int yy = 0; yy < mid.height; ++yy) {
|
|
||||||
float n = (float(yy) / mid.height*scale2 - lmin2) * 12;
|
|
||||||
float n2 = (float(yy + 1) / mid.height*scale2 - lmin2) * 12;
|
|
||||||
float f = float(minFreq) / (fftSkipPoints + 1)*powf(2.0f, n / 12.0f + lmin2);
|
|
||||||
float f2 = float(minFreq) / (fftSkipPoints + 1)*powf(2.0f, n2 / 12.0f + lmin2);
|
|
||||||
n = logf(f / 440) / log2 * 12;
|
|
||||||
n2 = logf(f2 / 440) / log2 * 12;
|
|
||||||
if (floor(n) < floor(n2))
|
|
||||||
yGrid[yy] = true;
|
|
||||||
else
|
|
||||||
yGrid[yy] = false;
|
|
||||||
}
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
|
|
||||||
auto &clipCache = WaveClipSpectrumCache::Get(clip);
|
auto &clipCache = WaveClipSpectrumCache::Get(clip);
|
||||||
auto &specPxCache = clipCache.mSpecPxCaches[clip.GetChannelIndex()];
|
auto &specPxCache = clipCache.mSpecPxCaches[clip.GetChannelIndex()];
|
||||||
if (!updated && specPxCache &&
|
if (!updated && specPxCache &&
|
||||||
@@ -481,9 +456,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context,
|
|||||||
&& range == specPxCache->range
|
&& range == specPxCache->range
|
||||||
&& minFreq == specPxCache->minFreq
|
&& minFreq == specPxCache->minFreq
|
||||||
&& maxFreq == specPxCache->maxFreq
|
&& maxFreq == specPxCache->maxFreq
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
&& fftYGrid==fftYGridOld
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
) {
|
) {
|
||||||
// Wave clip's spectrum cache is up to date,
|
// Wave clip's spectrum cache is up to date,
|
||||||
// and so is the spectrum pixel cache
|
// and so is the spectrum pixel cache
|
||||||
@@ -636,13 +608,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context,
|
|||||||
unsigned char rv, gv, bv;
|
unsigned char rv, gv, bv;
|
||||||
GetColorGradient(value, selected, colorScheme, &rv, &gv, &bv);
|
GetColorGradient(value, selected, colorScheme, &rv, &gv, &bv);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
if (fftYGrid && yGrid[yy]) {
|
|
||||||
rv /= 1.1f;
|
|
||||||
gv /= 1.1f;
|
|
||||||
bv /= 1.1f;
|
|
||||||
}
|
|
||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
|
||||||
int px = ((mid.height - 1 - yy) * mid.width + xx);
|
int px = ((mid.height - 1 - yy) * mid.width + xx);
|
||||||
#ifdef EXPERIMENTAL_SPECTROGRAM_OVERLAY
|
#ifdef EXPERIMENTAL_SPECTROGRAM_OVERLAY
|
||||||
// More transparent the closer to zero intensity.
|
// More transparent the closer to zero intensity.
|
||||||
|
Reference in New Issue
Block a user