diff --git a/libraries/lib-wave-track-settings/SpectrogramSettings.cpp b/libraries/lib-wave-track-settings/SpectrogramSettings.cpp index 837f2bb81..0154f8c70 100644 --- a/libraries/lib-wave-track-settings/SpectrogramSettings.cpp +++ b/libraries/lib-wave-track-settings/SpectrogramSettings.cpp @@ -59,11 +59,6 @@ IntSetting SpectrumRange{ L"/Spectrum/Range", 80 }; IntSetting SpectrumZeroPaddingFactor{ L"/Spectrum/ZeroPaddingFactor", 2 }; - -#ifdef EXPERIMENTAL_FFT_Y_GRID -BoolSetting SpectrumYGrid{ - L"/Spectrum/FFTYGrid", false}; -#endif } SpectrogramSettings::Globals::Globals() @@ -147,9 +142,6 @@ SpectrogramSettings::SpectrogramSettings(const SpectrogramSettings &other) , spectralSelection(other.spectralSelection) #endif , algorithm(other.algorithm) -#ifdef EXPERIMENTAL_FFT_Y_GRID - , fftYGrid(other.fftYGrid) -#endif // Do not copy these! , hFFT{} @@ -176,9 +168,6 @@ SpectrogramSettings &SpectrogramSettings::operator= (const SpectrogramSettings & spectralSelection = other.spectralSelection; #endif algorithm = other.algorithm; -#ifdef EXPERIMENTAL_FFT_Y_GRID - fftYGrid = other.fftYGrid; -#endif // Invalidate the caches DestroyWindows(); @@ -362,10 +351,6 @@ void SpectrogramSettings::LoadPrefs() algorithm = static_cast(SpectrumAlgorithm.Read()); -#ifdef EXPERIMENTAL_FFT_Y_GRID - fftYGrid = SpectrumYGrid.Read(); -#endif //EXPERIMENTAL_FFT_Y_GRID - // Enforce legal values Validate(true); @@ -400,10 +385,6 @@ void SpectrogramSettings::SavePrefs() #endif SpectrumAlgorithm.Write(static_cast(algorithm)); - -#ifdef EXPERIMENTAL_FFT_Y_GRID - SpectrumYGrid.Write(fftYGrid); -#endif //EXPERIMENTAL_FFT_Y_GRID } // This is a temporary hack until SpectrogramSettings gets fully integrated @@ -448,11 +429,6 @@ void SpectrogramSettings::UpdatePrefs() if (algorithm == defaults().algorithm) algorithm = static_cast(SpectrumAlgorithm.Read()); -#ifdef EXPERIMENTAL_FFT_Y_GRID - if (fftYGrid == defaults().fftYGrid) - fftYGrid = SpectrumYGrid.Read(); -#endif //EXPERIMENTAL_FFT_Y_GRID - // Enforce legal values Validate(true); } diff --git a/libraries/lib-wave-track-settings/SpectrogramSettings.h b/libraries/lib-wave-track-settings/SpectrogramSettings.h index d1727f698..06785c0e5 100644 --- a/libraries/lib-wave-track-settings/SpectrogramSettings.h +++ b/libraries/lib-wave-track-settings/SpectrogramSettings.h @@ -182,10 +182,6 @@ public: }; Algorithm algorithm; -#ifdef EXPERIMENTAL_FFT_Y_GRID - bool fftYGrid; -#endif //EXPERIMENTAL_FFT_Y_GRID - // Following fields are derived from preferences. // Variables used for computing the spectrum diff --git a/src/Experimental.cmake b/src/Experimental.cmake index 08769bd42..fcd748a58 100644 --- a/src/Experimental.cmake +++ b/src/Experimental.cmake @@ -49,10 +49,6 @@ set( EXPERIMENTAL_OPTIONS_LIST #RIGHT_ALIGNED_TEXTBOXES #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: # Allow keyboard seeking before initial playback position #SEEK_BEHIND_CURSOR diff --git a/src/TrackArtist.h b/src/TrackArtist.h index 7db5d3a66..d905b0211 100644 --- a/src/TrackArtist.h +++ b/src/TrackArtist.h @@ -100,10 +100,6 @@ public: wxBrush beatStrongSelBrush[2]; wxBrush beatWeakSelBrush[2]; -#ifdef EXPERIMENTAL_FFT_Y_GRID - bool fftYGridOld; -#endif //EXPERIMENTAL_FFT_Y_GRID - const SelectedRegion *pSelectedRegion{}; ZoomInfo *pZoomInfo{}; const PendingTracks *pPendingTracks{}; diff --git a/src/prefs/SpectrumPrefs.cpp b/src/prefs/SpectrumPrefs.cpp index 1cab1de63..3e04c4050 100644 --- a/src/prefs/SpectrumPrefs.cpp +++ b/src/prefs/SpectrumPrefs.cpp @@ -276,10 +276,6 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S) mTempSettings.spectralSelection); #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 S.StartStatic(XO("Global settings")); diff --git a/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp b/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp index f42a0a95f..911f826bc 100644 --- a/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp @@ -399,10 +399,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context, const int &range = settings.range; const int &gain = settings.gain; -#ifdef EXPERIMENTAL_FFT_Y_GRID - const bool &fftYGrid = settings.fftYGrid; -#endif - dc.SetPen(*wxTRANSPARENT_PEN); // We draw directly to a bit image in memory, @@ -451,27 +447,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context, bins[yy] = nextBin; } -#ifdef EXPERIMENTAL_FFT_Y_GRID - const float - log2 = logf(2.0f), - scale2 = (lmax - lmin) / log2, - lmin2 = lmin / log2; - - ArrayOf 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 &specPxCache = clipCache.mSpecPxCaches[clip.GetChannelIndex()]; if (!updated && specPxCache && @@ -481,9 +456,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context, && range == specPxCache->range && minFreq == specPxCache->minFreq && maxFreq == specPxCache->maxFreq -#ifdef EXPERIMENTAL_FFT_Y_GRID - && fftYGrid==fftYGridOld -#endif //EXPERIMENTAL_FFT_Y_GRID ) { // Wave clip's spectrum cache is up to date, // and so is the spectrum pixel cache @@ -636,13 +608,6 @@ void DrawClipSpectrum(TrackPanelDrawingContext &context, unsigned char 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); #ifdef EXPERIMENTAL_SPECTROGRAM_OVERLAY // More transparent the closer to zero intensity.