1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00

25 Commits

Author SHA1 Message Date
andheh
87eaaa6f45 fixing strict-aliasing rule violations by passing enum types as int references 2018-03-06 21:30:39 +00:00
Paul Licameli
58574f2f78 Redo type HFFT as a smart pointer, remove malloc and free 2017-03-17 17:52:51 -04:00
Paul Licameli
18be1bdad6 Remove naked new[] in: tracks 2017-03-17 17:52:47 -04:00
Paul Licameli
8ddbc1d3d3 Assume number of spectrogram bins = 1/2 FFT window in fewer places...
... and that they have equal width on the linear scale
... also simplify the logic involving zero padding factor

This is more preparation for constant-q.
2017-03-17 17:52:28 -04:00
Paul Licameli
d831318132 simplify SpectrogramSettings::GetScale; abstract frequency-to-bin...
... this is a preparation for the constant-q feature, if we want it.
2017-03-17 17:52:27 -04:00
Paul Licameli
463e7d971d Make EXPERIMENTAL_FIND_NOTES work again 2017-03-17 17:52:16 -04:00
Paul Licameli
ed21545c80 pixel column counts and sample window sizes use unsigned types 2016-09-11 20:28:13 -04:00
Raphaël Marinier
6ac68db5be Code cleanup: removed the old real FFT code not used since at least 2009.
I confirmed that the currently used real FFT code in RealFFTf.cpp is faster
than the old one with a quick benchmark that calls PowerSpectrum() on 4-minute
audio file, with different sizes of computation windows:

Window_size: 256 method: new FFT time_s: 0.393
Window_size: 256 method: old FFT time_s: 1.065
Window_size: 1024 method: new FFT time_s: 0.38
Window_size: 1024 method: old FFT time_s: 0.958
Window_size: 4096 method: new FFT time_s: 0.413
Window_size: 4096 method: old FFT time_s: 1.084
Window_size: 16384 method: new FFT time_s: 0.518
Window_size: 16384 method: old FFT time_s: 1.338
Window_size: 65536 method: new FFT time_s: 0.655
Window_size: 65536 method: old FFT time_s: 1.524
Window_size: 262144 method: new FFT time_s: 0.735
Window_size: 262144 method: old FFT time_s: 1.873
2016-06-25 20:40:16 +02:00
Paul Licameli
dfc84d030c Fix warnings for out-of-order initializers, with in-class member initializers 2016-02-26 14:56:30 -05:00
Paul Licameli
b84c1b322e Bug1169: end the separate treatment of lin vs. log display bounds for spectrum...
... also make WaveTrack responsible for storing and validating the bounds
... also let the bounds vary per-track even though other settings are default
... also change some code names to mention "period" not "undertone"
2015-09-06 21:47:14 -04:00
Paul Licameli
b9db3bd83d Define and use TranslatableStringArray. This lets you define "listeners"...
... for language changes, without inserting extra code to send the
notifications.
2015-08-17 12:04:21 -04:00
Paul Licameli
84ee685ee9 reassignment, internals, implementing time correction, but -- ...
... it does not yet interact correctly with caching, so results may be
slightly wrong if you scroll the view by less than a screen.
2015-08-17 09:17:46 -04:00
Paul Licameli
7113d533fb reassignment, internals, implementing frequency correction only 2015-08-17 09:17:45 -04:00
Paul Licameli
1f94d99c43 reassignment added to list of algorithms in settings and preferences 2015-08-17 09:17:42 -04:00
Paul Licameli
7bf2d9b92c travis 2015-07-27 23:11:43 -04:00
Paul Licameli
adb4a534e8 Pitch is no longer a special view type... && bug fixes 1040, 1041
... It is a choice of algorithm in spectrogram settings, and any frequency
scale may be chosen with it.  Spectral selection works in it.
2015-07-27 23:01:20 -04:00
Paul Licameli
846c5d454e Other spectrogram scales, easily defined!! -- and include bug fixes 1038, 1039 2015-07-27 23:01:16 -04:00
Paul Licameli
43b7df701b Use class NumberScale in TrackArtist and spectral selection, abstracting...
... the details of mapping to and from pixel height
2015-07-27 23:01:11 -04:00
Paul Licameli
7d379cde13 Conditional compilation (disabled) to make Spectral selection choice global...
... not per track,
and the preferences or View Settings page has a separate static box for
global settings as opposed to track settings.  This is the only global setting
for now.
2015-07-27 23:01:06 -04:00
Paul Licameli
f74713f020 WaveTrack::WaveTrackDisplay does not encode scale or spectral selection...
... SpectrogramSettings does that instead, and Preferences or View Settings
are the user interface for changing it.

Handle invalidation of spectrogram pixel cache for scale type changes,
just as for other changes of settings.  No more
TrackArtist::InvalidateSpectrumCache().

View type of track now switches to Spectrum when applying or OKing the
View Settings... dialog and the Spectrogram page is open (and for now
it is still the only page)
2015-07-27 23:01:04 -04:00
Paul Licameli
113edcc70a SpectrumPrefs takes SpectrogramSettings object as parameter, and...
... writes global preferences explicitly, and only when it is the default
settings object.

Also impose validation of settings when constructing from preferences.
2015-07-26 21:33:03 -04:00
Paul Licameli
1dffeace93 Access SpectrogramSettings via WaveTrack, which may be nondefault (no UI yet)...
... and add accessors to SpectrogramSettings, and remove TrackArtist functions
for getting and setting the globals.
2015-07-26 21:10:16 -04:00
Paul Licameli
a1621f7d1b Define and use SpectrogramSettings::GetFFTLength() 2015-07-26 21:10:15 -04:00
Paul Licameli
778e7726df Safe copy constructor and assignment for SpectrogramSettings 2015-07-26 21:10:14 -04:00
Paul Licameli
786c1da645 Move class SpectrogramSettings to its own file 2015-07-26 21:10:13 -04:00