mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-23 15:50:05 +02:00
Bug 1671 - Spectrogram Overlay made experimental.
In case we decide too much detail is lost in low intensity spectrogram - we can turn this off easily.
This commit is contained in:
parent
78f273f30c
commit
3d5a4e8a45
@ -57,6 +57,9 @@
|
|||||||
// DA: Enables dark audacity theme and customisations.
|
// DA: Enables dark audacity theme and customisations.
|
||||||
//#define EXPERIMENTAL_DA
|
//#define EXPERIMENTAL_DA
|
||||||
|
|
||||||
|
// Define this so that sync-lock tiles shine through spectrogram.
|
||||||
|
#define EXPERIMENTAL_SPECTROGRAM_OVERLAY
|
||||||
|
|
||||||
// EXPERIMENTAL_THEMING is mostly mainstream now.
|
// EXPERIMENTAL_THEMING is mostly mainstream now.
|
||||||
// the define is still present to mark out old code before theming, that we might
|
// the define is still present to mark out old code before theming, that we might
|
||||||
// conceivably need.
|
// conceivably need.
|
||||||
|
@ -2259,10 +2259,11 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
wxImage image((int)mid.width, (int)mid.height);
|
wxImage image((int)mid.width, (int)mid.height);
|
||||||
if (!image.IsOk())
|
if (!image.IsOk())
|
||||||
return;
|
return;
|
||||||
|
#ifdef EXPERIMENTAL_SPECTROGRAM_OVERLAY
|
||||||
image.SetAlpha();
|
image.SetAlpha();
|
||||||
|
|
||||||
unsigned char *data = image.GetData();
|
|
||||||
unsigned char *alpha = image.GetAlpha();
|
unsigned char *alpha = image.GetAlpha();
|
||||||
|
#endif
|
||||||
|
unsigned char *data = image.GetData();
|
||||||
|
|
||||||
const auto half = settings.GetFFTLength() / 2;
|
const auto half = settings.GetFFTLength() / 2;
|
||||||
const double binUnit = rate / (2 * half);
|
const double binUnit = rate / (2 * half);
|
||||||
@ -2603,8 +2604,10 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
|||||||
#endif //EXPERIMENTAL_FFT_Y_GRID
|
#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
|
||||||
// More transparent the closer to zero intensity.
|
// More transparent the closer to zero intensity.
|
||||||
alpha[px]= wxMin( 200, (value+0.3) * 500) ;
|
alpha[px]= wxMin( 200, (value+0.3) * 500) ;
|
||||||
|
#endif
|
||||||
px *=3;
|
px *=3;
|
||||||
data[px++] = rv;
|
data[px++] = rv;
|
||||||
data[px++] = gv;
|
data[px++] = gv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user