24 #ifndef FOURIERSPECTRUMGRAPHDRAWER_H
25 #define FOURIERSPECTRUMGRAPHDRAWER_H
27 #include "../system/prerequisites.h"
29 #include "../piano/keyboard.h"
30 #include "../messages/messagelistener.h"
31 #include "../analyzers/signalanalyzer.h"
59 virtual void draw() override final;
60 virtual
void clear() override final;
75 #endif // FOURIERSPECTRUMGRAPHDRAWER_H
std::shared_ptr< Message > MessagePtr
Global type of a shared message pointer.
OperationMode
Operation mode of the tuner.
OperationMode mCurrentOperationMode
Current mode of operation.
RoleType
< Roles of the items used here
int mNumberOfKeys
Total number of keys.
virtual void handleMessage(MessagePtr m) override
Message dispatcher for FourierSpectrumGraphDrawer.
Class describing a single piano key.
int mSamplingRate
copy of sample rate
std::map< double, double > FFTPolygon
Type for a frequency-to-intensity map for graphics.
The FourierSpectrumGraphDrawer class.
void updateSpectrum()
Function for updating the red curve showing the spectrum.
~FourierSpectrumGraphDrawer()
Empty destructor.
virtual void draw() overridefinal
Draw the spectrum.
const double updateInterval
Update interval at least 1 sec.
double mConcertPitch
Target freuqency of A4.
int mKeyNumberOfA4
Index of A4 key.
std::shared_ptr< Key > mKey
Shared pointer to selected key, holding the peaks.
Abstract base class for implementations rendering graphics.
std::shared_ptr< FFTPolygon > mPolygon
Shared pointer to spectral polygon.
virtual void clear() overridefinal
Clear the spectrum.
FourierSpectrumGraphDrawer(GraphicsViewAdapter *graphics)
Constructor of a FourierSpectrumGraphDrawer.
Abstract base class for drawing 2d graphics.