MythTV  master
visualize.h
Go to the documentation of this file.
1 /*
2  visualize.h
3 
4  (c) 2003 Thor Sigvaldason and Isaac Richards
5  Closely based on code from mq3 by Brad Hughes
6 
7  Part of the mythTV project
8 
9  music visualizers
10 */
11 
12 #ifndef VISUALIZE_H
13 #define VISUALIZE_H
14 
15 // C++ headers
16 #include <vector>
17 
18 // Qt headers
19 #include <QCoreApplication>
20 #include <QVector>
21 
22 // MythTV headers
23 #include <libmyth/visual.h>
26 
27 // MythMusic headers
28 #include "constants.h"
29 
30 #include <complex>
31 extern "C" {
32  #include <libavutil/mem.h>
33  #include <libavcodec/avfft.h>
34 }
35 
36 static constexpr uint16_t SAMPLES_DEFAULT_SIZE { 512 };
37 
38 class MainVisual;
39 
40 class VisualNode
41 {
42  public:
43  VisualNode(short *l, short *r, unsigned long n, std::chrono::milliseconds timecode)
44  : m_left(l), m_right(r), m_length(n), m_offset(timecode)
45  {
46  // left and right are allocated and then passed to this class
47  // the code that allocated left and right should give up all ownership
48  }
49 
51  {
52  delete [] m_left;
53  delete [] m_right;
54  }
55 
56  short *m_left {nullptr};
57  short *m_right {nullptr};
58  unsigned long m_length;
59  std::chrono::milliseconds m_offset;
60 };
61 
63 {
64  public:
65  explicit VisualBase(bool screensaverenable = false);
66  virtual ~VisualBase(void);
67 
68  // return true if the output should stop
69  virtual bool process( VisualNode *node ) = 0;
70 
71  // this is called on nodes that will not be displayed :: Not needed for most visualizations
72  // (i.e. between the displayed frames, if you need the whole audio stream)
73  virtual bool processUndisplayed( VisualNode */*node*/ )
74  {
75  return true; // By default this does nothing : Ignore the in-between chunks of audio data
76  };
77 
78  virtual bool draw( QPainter *, const QColor & ) = 0;
79  virtual void resize( const QSize &size ) = 0;
80  virtual void handleKeyPress(const QString &action) = 0;
81  virtual int getDesiredFPS(void) { return m_fps; }
82  // Override this if you need the potential of capturing more data than the default
83  virtual unsigned long getDesiredSamples(void) { return SAMPLES_DEFAULT_SIZE; }
84  static void drawWarning(QPainter *p, const QColor &back, QSize size, const QString& warning, int fontsize = 28);
85 
86  protected:
87  int m_fps {20};
88  bool m_xscreensaverenable {true};
89 };
90 
92 {
93  public:
95  virtual ~VisFactory() = default;
96  const VisFactory* next() const {return m_pNextVisFactory;}
97  virtual const QString &name(void) const = 0;
98  virtual VisualBase* create(MainVisual *parent, const QString &pluginName) const = 0;
99  virtual uint plugins(QStringList *list) const = 0;
100  static const VisFactory* VisFactories() {return g_pVisFactories;}
101  protected:
104 };
105 
106 
107 #define RUBBERBAND 0 // NOLINT(cppcoreguidelines-macro-usage)
108 #define TWOCOLOUR 1 // NOLINT(cppcoreguidelines-macro-usage)
109 
110 class StereoScope : public VisualBase
111 {
112  public:
113  StereoScope();
114  ~StereoScope() override = default;
115 
116  void resize( const QSize &size ) override; // VisualBase
117  bool process( VisualNode *node ) override; // VisualBase
118  bool draw( QPainter *p, const QColor &back ) override; // VisualBase
119  void handleKeyPress(const QString &action) override // VisualBase
120  {(void) action;}
121 
122  protected:
123  QColor m_startColor {Qt::yellow};
124  QColor m_targetColor {Qt::red};
125  std::vector<double> m_magnitudes {};
126  QSize m_size;
127  bool const m_rubberband {RUBBERBAND};
128  double const m_falloff {1.0};
129 };
130 
131 class MonoScope : public StereoScope
132 {
133  public:
134  MonoScope() = default;
135  ~MonoScope() override = default;
136 
137  bool process( VisualNode *node ) override; // StereoScope
138  bool draw( QPainter *p, const QColor &back ) override; // StereoScope
139 };
140 
141 // WaveForm - see whole track - by twitham@sbcglobal.net, 2023/01
142 
143 #define WF_AUDIO_SIZE 4096 // maximum samples to process at a time
144 #define WF_WIDTH 1920 // image cache size, will scale to any display
145 #define WF_HEIGHT 1080
146 
147 class WaveForm : public StereoScope
148 {
149  public:
150  WaveForm() = default;
151  ~WaveForm() override;
152 
153  unsigned long getDesiredSamples(void) override;
154  bool processUndisplayed(VisualNode *node) override;
155  bool process( VisualNode *node ) override;
156  bool draw( QPainter *p, const QColor &back ) override;
157  void handleKeyPress(const QString &action) override;
158 
159  protected:
160  bool process_all_types(VisualNode *node, bool displayed);
161  void saveload(MusicMetadata *meta);
162  unsigned long m_offset {0}; // pass from process to draw
163  short *m_right {nullptr};
164  QFont m_font; // optional text overlay
165  bool m_showtext {true};
166  QImage m_image; // picture of full track
168  unsigned long m_duration {60000};
169  unsigned int m_lastx {WF_WIDTH}; // vert line tracker
170  unsigned int m_position {0}; // location inside pixel
171  short int m_minl {0}; // left range
172  short int m_maxl {0};
173  unsigned long m_sqrl {0}; // sum of squares, for RMS
174  short int m_minr {0}; // right range
175  short int m_maxr {0};
176  unsigned long m_sqrr {0};
177 };
178 
179 class LogScale
180 {
181  public:
182  explicit LogScale(int maxscale = 0, int maxrange = 0);
183  ~LogScale();
184 
185  int scale() const { return m_s; }
186  int range() const { return m_r; }
187 
188  void setMax(int maxscale, int maxrange);
189 
190  int operator[](int index);
191 
192 
193  private:
194  int *m_indices {nullptr};
195  int m_s {0};
196  int m_r {0};
197 };
198 
199 class Spectrum : public VisualBase
200 {
201  // This class draws bars (up and down)
202  // based on the magnitudes at various
203  // frequencies in the audio data.
204 
205  public:
206  Spectrum();
207  ~Spectrum() override;
208 
209  void resize(const QSize &size) override; // VisualBase
210  bool process(VisualNode *node) override; // VisualBase
211  bool draw(QPainter *p, const QColor &back = Qt::black) override; // VisualBase
212  void handleKeyPress(const QString &action) override // VisualBase
213  {(void) action;}
214 
215  protected:
216  static inline double clamp(double cur, double max, double min);
217 
218  QColor m_startColor {Qt::blue};
219  QColor m_targetColor {Qt::red};
220  QVector<QRect> m_rects;
221  QVector<double> m_magnitudes;
222  QSize m_size;
224 
225  // Setup the "magical" audio data transformations
226  // provided by the Fast Fourier Transforms library
227  double m_scaleFactor {2.0};
228  double m_falloff {10.0};
230 
231  FFTComplex* m_dftL { nullptr };
232  FFTComplex* m_dftR { nullptr };
233  FFTContext* m_fftContextForward { nullptr };
234 };
235 
236 class Squares : public Spectrum
237 {
238  public:
239  Squares();
240  ~Squares() override = default;
241 
242  void resize (const QSize &newsize) override; // Spectrum
243  bool draw(QPainter *p, const QColor &back = Qt::black) override; // Spectrum
244  void handleKeyPress(const QString &action) override // Spectrum
245  {(void) action;}
246 
247  private:
248  void drawRect(QPainter *p, QRect *rect, int i, int c, int w, int h);
249  QSize m_actualSize {0,0};
250  int m_fakeHeight {0};
252 };
253 
254 class Piano : public VisualBase
255 {
256  // This class draws bars (up and down)
257  // based on the magnitudes at piano pitch
258  // frequencies in the audio data.
259 
260  static constexpr unsigned long kPianoAudioSize { 4096 };
261  static constexpr unsigned int kPianoNumKeys { 88 };
262 
263 #define piano_audio float
264 #define goertzel_data float
265 
266  static constexpr double kPianoRmsNegligible { .001 };
267  static constexpr double kPianoSpectrumSmoothing { 0.95 };
268  static constexpr goertzel_data kPianoMinVol { -10 };
269  static constexpr double kPianoKeypressTooLight { .2 };
270 
274 
275  // This keeps track of the samples processed for each note
276  // Low notes require a lot of samples to be correctly identified
277  // Higher ones are displayed quicker
280 
281  bool is_black_note; // These are painted on top of white notes, and have different colouring
282 };
283 
284  public:
285  Piano();
286  ~Piano() override;
287 
288  void resize(const QSize &size) override; // VisualBase
289 
290  bool process(VisualNode *node) override; // VisualBase
291 
292  // These functions are new, since we need to inspect all the data
293  bool processUndisplayed(VisualNode *node) override; // VisualBase
294  unsigned long getDesiredSamples(void) override; // VisualBase
295 
296  bool draw(QPainter *p, const QColor &back = Qt::black) override; // VisualBase
297  void handleKeyPress(const QString &action) override // VisualBase
298  {(void) action;}
299 
300  protected:
301  static inline double clamp(double cur, double max, double min);
302  bool process_all_types(VisualNode *node, bool this_will_be_displayed);
303  void zero_analysis(void);
304 
305  QColor m_whiteStartColor {245,245,245};
306  QColor m_whiteTargetColor {Qt::red};
307  QColor m_blackStartColor {10,10,10};
308  QColor m_blackTargetColor {Qt::red};
309 
310  std::vector<QRect> m_rects {};
311  QSize m_size;
312 
313  std::chrono::milliseconds m_offsetProcessed {0ms};
314 
317 
318  std::vector<double> m_magnitude {};
319 };
320 
321 class AlbumArt : public VisualBase
322 {
324 
325  public:
326  AlbumArt(void);
327  ~AlbumArt() override = default;
328 
329  void resize(const QSize &size) override; // VisualBase
330  bool process(VisualNode *node = nullptr) override; // VisualBase
331  bool draw(QPainter *p, const QColor &back = Qt::black) override; // VisualBase
332  void handleKeyPress(const QString &action) override; // VisualBase
333 
334  private:
335  bool needsUpdate(void);
336  void findFrontCover(void);
337  bool cycleImage(void);
338 
339  QSize m_size;
340  QSize m_cursize;
342  QImage m_image;
343 
345  QDateTime m_lastCycle;
346 };
347 
348 class Blank : public VisualBase
349 {
350  // This draws ... well ... nothing
351  public:
352  Blank();
353  ~Blank() override = default;
354 
355  void resize(const QSize &size) override; // VisualBase
356  bool process(VisualNode *node = nullptr) override; // VisualBase
357  bool draw(QPainter *p, const QColor &back = Qt::black) override; // VisualBase
358  void handleKeyPress(const QString &action) override // VisualBase
359  {(void) action;}
360 
361  private:
362  QSize m_size;
363 };
364 
365 #endif // __visualize_h
Squares::Squares
Squares()
Definition: visualize.cpp:1093
VisualNode::~VisualNode
~VisualNode()
Definition: visualize.h:50
Piano::piano_key_data::samples_processed
int samples_processed
Definition: visualize.h:278
Blank::Blank
Blank()
Definition: visualize.cpp:1814
Spectrum::~Spectrum
~Spectrum() override
Definition: visualize.cpp:875
Piano::piano_key_data
Definition: visualize.h:271
Piano::m_magnitude
std::vector< double > m_magnitude
Definition: visualize.h:318
Piano::piano_key_data::samples_process_before_display_update
int samples_process_before_display_update
Definition: visualize.h:279
AlbumArt::findFrontCover
void findFrontCover(void)
Definition: visualize.cpp:1628
VisFactory::g_pVisFactories
static VisFactory * g_pVisFactories
Definition: visualize.h:102
Piano
Definition: visualize.h:254
AlbumArt::resize
void resize(const QSize &size) override
Definition: visualize.cpp:1676
WaveForm::m_right
short * m_right
Definition: visualize.h:163
Piano::kPianoNumKeys
static constexpr unsigned int kPianoNumKeys
Definition: visualize.h:261
Spectrum::m_scaleFactor
double m_scaleFactor
Definition: visualize.h:227
Piano::draw
bool draw(QPainter *p, const QColor &back=Qt::black) override
Definition: visualize.cpp:1490
back
static guint32 * back
Definition: goom_core.cpp:25
VisualNode
Definition: videovisual.h:25
Piano::processUndisplayed
bool processUndisplayed(VisualNode *node) override
Definition: visualize.cpp:1336
Piano::zero_analysis
void zero_analysis(void)
Definition: visualize.cpp:1230
Piano::getDesiredSamples
unsigned long getDesiredSamples(void) override
Definition: visualize.cpp:1326
WaveForm::m_sqrl
unsigned long m_sqrl
Definition: visualize.h:173
Spectrum::m_dftR
FFTComplex * m_dftR
Definition: visualize.h:232
Spectrum::process
bool process(VisualNode *node) override
Definition: visualize.cpp:920
VisualNode::VisualNode
VisualNode(short *l, short *r, unsigned long n, std::chrono::milliseconds timecode)
Definition: visualize.h:43
StereoScope
Definition: visualize.h:110
AlbumArt::m_image
QImage m_image
Definition: visualize.h:342
VisualBase::getDesiredSamples
virtual unsigned long getDesiredSamples(void)
Definition: visualize.h:83
VisFactory::VisFactory
VisFactory()
Definition: visualize.h:94
RUBBERBAND
#define RUBBERBAND
Definition: visualize.h:107
mythbaseexp.h
AlbumArt::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(AlbumArt)
LogScale::m_indices
int * m_indices
Definition: videovisualdefs.h:70
Blank::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.h:358
WaveForm::saveload
void saveload(MusicMetadata *meta)
Definition: visualize.cpp:547
LogScale::operator[]
int operator[](int index) const
Definition: videovisualdefs.h:63
WaveForm::draw
bool draw(QPainter *p, const QColor &back) override
Definition: visualize.cpp:731
WaveForm::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.cpp:770
LogScale::m_r
int m_r
Definition: videovisualdefs.h:72
WaveForm::m_minr
short int m_minr
Definition: visualize.h:174
SAMPLES_DEFAULT_SIZE
static constexpr uint16_t SAMPLES_DEFAULT_SIZE
Definition: visualize.h:36
AlbumArt
Definition: visualize.h:321
StereoScope::m_rubberband
const bool m_rubberband
Definition: visualize.h:127
Spectrum::m_magnitudes
QVector< double > m_magnitudes
Definition: visualize.h:221
VisualBase
Definition: visualize.h:62
Blank::draw
bool draw(QPainter *p, const QColor &back=Qt::black) override
Definition: visualize.cpp:1831
StereoScope::resize
void resize(const QSize &size) override
Definition: visualize.cpp:169
StereoScope::m_falloff
const double m_falloff
Definition: visualize.h:128
Spectrum::Spectrum
Spectrum()
Definition: visualize.cpp:863
Blank::m_size
QSize m_size
Definition: visualize.h:362
MusicMetadata
Definition: musicmetadata.h:80
StereoScope::process
bool process(VisualNode *node) override
Definition: visualize.cpp:179
LogScale::LogScale
LogScale(int maxscale=0, int maxrange=0)
Definition: videovisualdefs.h:9
StereoScope::m_size
QSize m_size
Definition: visualize.h:126
WaveForm::m_offset
unsigned long m_offset
Definition: visualize.h:162
WaveForm::m_showtext
bool m_showtext
Definition: visualize.h:165
Piano::m_offsetProcessed
std::chrono::milliseconds m_offsetProcessed
Definition: visualize.h:313
WaveForm::m_font
QFont m_font
Definition: visualize.h:164
MonoScope
Definition: visualize.h:131
VisualNode::m_left
short * m_left
Definition: videovisual.h:37
VisualBase::VisualBase
VisualBase(bool screensaverenable=false)
Definition: visualize.cpp:46
AlbumArt::m_currImageType
ImageType m_currImageType
Definition: visualize.h:341
Squares::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.h:244
WaveForm::m_position
unsigned int m_position
Definition: visualize.h:170
Spectrum::draw
bool draw(QPainter *p, const QColor &back=Qt::black) override
Definition: visualize.cpp:1032
WaveForm::m_duration
unsigned long m_duration
Definition: visualize.h:168
Piano::kPianoKeypressTooLight
static constexpr double kPianoKeypressTooLight
Definition: visualize.h:269
VisualNode::m_offset
std::chrono::milliseconds m_offset
Definition: videovisual.h:40
Spectrum::m_scale
LogScale m_scale
Definition: visualize.h:223
MonoScope::process
bool process(VisualNode *node) override
Definition: visualize.cpp:396
Spectrum::m_analyzerBarWidth
int m_analyzerBarWidth
Definition: visualize.h:229
Piano::m_whiteStartColor
QColor m_whiteStartColor
Definition: visualize.h:305
MonoScope::~MonoScope
~MonoScope() override=default
VisualBase::resize
virtual void resize(const QSize &size)=0
AlbumArt::draw
bool draw(QPainter *p, const QColor &back=Qt::black) override
Definition: visualize.cpp:1740
Piano::m_blackTargetColor
QColor m_blackTargetColor
Definition: visualize.h:308
Squares
Definition: visualize.h:236
StereoScope::draw
bool draw(QPainter *p, const QColor &back) override
Definition: visualize.cpp:297
Piano::kPianoAudioSize
static constexpr unsigned long kPianoAudioSize
Definition: visualize.h:260
Squares::drawRect
void drawRect(QPainter *p, QRect *rect, int i, int c, int w, int h)
Definition: visualize.cpp:1105
WF_WIDTH
#define WF_WIDTH
Definition: visualize.h:144
Piano::kPianoSpectrumSmoothing
static constexpr double kPianoSpectrumSmoothing
Definition: visualize.h:267
hardwareprofile.config.p
p
Definition: config.py:33
VisualNode::m_right
short * m_right
Definition: videovisual.h:38
LogScale::range
int range() const
Definition: visualize.h:186
AlbumArt::~AlbumArt
~AlbumArt() override=default
StereoScope::~StereoScope
~StereoScope() override=default
AlbumArt::cycleImage
bool cycleImage(void)
Definition: visualize.cpp:1647
Spectrum::m_startColor
QColor m_startColor
Definition: visualize.h:218
VisFactory
Definition: visualize.h:91
AlbumArt::m_cursize
QSize m_cursize
Definition: visualize.h:340
LogScale::setMax
void setMax(int maxscale, int maxrange)
Definition: videovisualdefs.h:22
LogScale::scale
int scale() const
Definition: visualize.h:185
Piano::piano_key_data::q2
goertzel_data q2
Definition: visualize.h:272
AlbumArt::needsUpdate
bool needsUpdate(void)
Definition: visualize.cpp:1720
VisualBase::getDesiredFPS
virtual int getDesiredFPS(void)
Definition: visualize.h:81
AlbumArt::process
bool process(VisualNode *node=nullptr) override
Definition: visualize.cpp:1681
StereoScope::m_targetColor
QColor m_targetColor
Definition: visualize.h:124
Squares::m_fakeHeight
int m_fakeHeight
Definition: visualize.h:250
VisualBase::~VisualBase
virtual ~VisualBase(void)
Definition: visualize.cpp:53
goertzel_data
#define goertzel_data
Definition: visualize.h:264
VisualBase::draw
virtual bool draw(QPainter *, const QColor &)=0
Piano::resize
void resize(const QSize &size) override
Definition: visualize.cpp:1246
StereoScope::m_magnitudes
std::vector< double > m_magnitudes
Definition: visualize.h:125
WaveForm
Definition: visualize.h:147
VisFactory::plugins
virtual uint plugins(QStringList *list) const =0
uint
unsigned int uint
Definition: compat.h:79
WaveForm::m_lastx
unsigned int m_lastx
Definition: visualize.h:169
VisFactory::VisFactories
static const VisFactory * VisFactories()
Definition: visualize.h:100
WaveForm::m_currentMetadata
MusicMetadata * m_currentMetadata
Definition: visualize.h:167
AlbumArt::m_currentMetadata
MusicMetadata * m_currentMetadata
Definition: visualize.h:344
WaveForm::getDesiredSamples
unsigned long getDesiredSamples(void) override
Definition: visualize.cpp:600
LogScale::m_s
int m_s
Definition: videovisualdefs.h:71
LogScale::~LogScale
~LogScale()
Definition: videovisualdefs.h:14
StereoScope::m_startColor
QColor m_startColor
Definition: visualize.h:123
Piano::piano_key_data::magnitude
goertzel_data magnitude
Definition: visualize.h:272
VisualBase::process
virtual bool process(VisualNode *node)=0
VisFactory::create
virtual VisualBase * create(MainVisual *parent, const QString &pluginName) const =0
Squares::m_actualSize
QSize m_actualSize
Definition: visualize.h:249
AlbumArt::m_lastCycle
QDateTime m_lastCycle
Definition: visualize.h:345
WaveForm::m_minl
short int m_minl
Definition: visualize.h:171
Piano::kPianoRmsNegligible
static constexpr double kPianoRmsNegligible
Definition: visualize.h:266
MainVisual
Definition: mainvisual.h:34
WaveForm::m_maxl
short int m_maxl
Definition: visualize.h:172
Piano::m_audioData
piano_audio * m_audioData
Definition: visualize.h:316
VisualBase::processUndisplayed
virtual bool processUndisplayed(VisualNode *)
Definition: visualize.h:73
IT_UNKNOWN
@ IT_UNKNOWN
Definition: musicmetadata.h:30
AlbumArt::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.cpp:1686
VisFactory::~VisFactory
virtual ~VisFactory()=default
VisualNode::m_length
long m_length
Definition: videovisual.h:39
Squares::~Squares
~Squares() override=default
StereoScope::StereoScope
StereoScope()
Definition: visualize.cpp:164
WaveForm::m_sqrr
unsigned long m_sqrr
Definition: visualize.h:176
VisualBase::m_fps
int m_fps
Definition: visualize.h:87
Spectrum::m_falloff
double m_falloff
Definition: visualize.h:228
Piano::piano_key_data::coeff
goertzel_data coeff
Definition: visualize.h:272
MonoScope::draw
bool draw(QPainter *p, const QColor &back) override
Definition: visualize.cpp:487
Piano::m_pianoData
piano_key_data * m_pianoData
Definition: visualize.h:315
Spectrum::resize
void resize(const QSize &size) override
Definition: visualize.cpp:882
Squares::draw
bool draw(QPainter *p, const QColor &back=Qt::black) override
Definition: visualize.cpp:1139
VisualNode::m_length
unsigned long m_length
Definition: visualize.h:58
WaveForm::WaveForm
WaveForm()=default
WaveForm::process_all_types
bool process_all_types(VisualNode *node, bool displayed)
Definition: visualize.cpp:634
Spectrum::m_fftContextForward
FFTContext * m_fftContextForward
Definition: visualize.h:233
Piano::piano_key_data::is_black_note
bool is_black_note
Definition: visualize.h:281
WaveForm::processUndisplayed
bool processUndisplayed(VisualNode *node) override
Definition: visualize.cpp:605
Blank::~Blank
~Blank() override=default
constants.h
Piano::m_size
QSize m_size
Definition: visualize.h:311
AlbumArt::AlbumArt
AlbumArt(void)
Definition: visualize.cpp:1621
VisualBase::m_xscreensaverenable
bool m_xscreensaverenable
Definition: visualize.h:88
Squares::resize
void resize(const QSize &newsize) override
Definition: visualize.cpp:1098
WaveForm::m_maxr
short int m_maxr
Definition: visualize.h:175
MonoScope::MonoScope
MonoScope()=default
Piano::kPianoMinVol
static constexpr goertzel_data kPianoMinVol
Definition: visualize.h:268
VisFactory::name
virtual const QString & name(void) const =0
Spectrum::m_dftL
FFTComplex * m_dftL
Definition: visualize.h:231
Blank::resize
void resize(const QSize &size) override
Definition: visualize.cpp:1820
Piano::m_whiteTargetColor
QColor m_whiteTargetColor
Definition: visualize.h:306
VisualBase::handleKeyPress
virtual void handleKeyPress(const QString &action)=0
Piano::process
bool process(VisualNode *node) override
Definition: visualize.cpp:1342
VisFactory::m_pNextVisFactory
VisFactory * m_pNextVisFactory
Definition: visualize.h:103
build_compdb.action
action
Definition: build_compdb.py:9
Spectrum::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.h:212
Blank
Definition: visualize.h:348
Spectrum
Definition: visualize.h:199
Blank::process
bool process(VisualNode *node=nullptr) override
Definition: visualize.cpp:1826
WaveForm::process
bool process(VisualNode *node) override
Definition: visualize.cpp:618
Piano::Piano
Piano()
Definition: visualize.cpp:1176
uint16_t
unsigned short uint16_t
Definition: iso6937tables.h:3
Spectrum::m_rects
QVector< QRect > m_rects
Definition: visualize.h:220
Piano::clamp
static double clamp(double cur, double max, double min)
Definition: visualize.cpp:1481
Piano::~Piano
~Piano() override
Definition: visualize.cpp:1222
Piano::piano_key_data::q1
goertzel_data q1
Definition: visualize.h:272
Piano::m_blackStartColor
QColor m_blackStartColor
Definition: visualize.h:307
Squares::m_numberOfSquares
int m_numberOfSquares
Definition: visualize.h:251
Spectrum::clamp
static double clamp(double cur, double max, double min)
Definition: visualize.cpp:1023
LogScale
Definition: videovisualdefs.h:6
VisFactory::next
const VisFactory * next() const
Definition: visualize.h:96
AlbumArt::m_size
QSize m_size
Definition: visualize.h:339
WaveForm::~WaveForm
~WaveForm() override
Definition: visualize.cpp:541
ImageType
ImageType
Definition: musicmetadata.h:28
Piano::m_rects
std::vector< QRect > m_rects
Definition: visualize.h:310
musicmetadata.h
Piano::process_all_types
bool process_all_types(VisualNode *node, bool this_will_be_displayed)
Definition: visualize.cpp:1352
StereoScope::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.h:119
Piano::piano_key_data::max_magnitude_seen
goertzel_data max_magnitude_seen
Definition: visualize.h:273
VisualBase::drawWarning
static void drawWarning(QPainter *p, const QColor &back, QSize size, const QString &warning, int fontsize=28)
Definition: visualize.cpp:65
WaveForm::m_image
QImage m_image
Definition: visualize.h:166
Spectrum::m_targetColor
QColor m_targetColor
Definition: visualize.h:219
Spectrum::m_size
QSize m_size
Definition: visualize.h:222
piano_audio
#define piano_audio
Definition: visualize.h:263
Piano::handleKeyPress
void handleKeyPress(const QString &action) override
Definition: visualize.h:297
visual.h