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.
|
||||
//#define EXPERIMENTAL_DA
|
||||
|
||||
// Define this so that sync-lock tiles shine through spectrogram.
|
||||
#define EXPERIMENTAL_SPECTROGRAM_OVERLAY
|
||||
|
||||
// EXPERIMENTAL_THEMING is mostly mainstream now.
|
||||
// the define is still present to mark out old code before theming, that we might
|
||||
// conceivably need.
|
||||
|
@ -2259,10 +2259,11 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
||||
wxImage image((int)mid.width, (int)mid.height);
|
||||
if (!image.IsOk())
|
||||
return;
|
||||
#ifdef EXPERIMENTAL_SPECTROGRAM_OVERLAY
|
||||
image.SetAlpha();
|
||||
|
||||
unsigned char *data = image.GetData();
|
||||
unsigned char *alpha = image.GetAlpha();
|
||||
#endif
|
||||
unsigned char *data = image.GetData();
|
||||
|
||||
const auto half = settings.GetFFTLength() / 2;
|
||||
const double binUnit = rate / (2 * half);
|
||||
@ -2603,8 +2604,10 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
||||
#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.
|
||||
alpha[px]= wxMin( 200, (value+0.3) * 500) ;
|
||||
#endif
|
||||
px *=3;
|
||||
data[px++] = rv;
|
||||
data[px++] = gv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user