Ergonomic enhancements for AudioFileProcessor plugin (interactive wave view).
This patch includes: * sampleBuffer::visualise(): add possibility to specified a range to visualize instead of the whole sample * add sampleBuffer::sampleRate() and sampleBuffer::sampleLength() getters * definition of AudioFileProcessorWaveView and AudioFileProcessorWaveView::knob classes for AudioFileProcessor plugin * knob::getValue() specified “virtual” to allow redefinition in child class AudioFileProcessorWaveView::knob * delete audioFileKnob class (made obsolete by AudioFileProcessorWaveView::knob) * add audioFileProcessor::isPlaying() signal, which is emitted in audioFileProcessor::playNote * change type of AudioFileProcessorView::m_startKnob and AudioFileProcessorView::m_endKnob (AudioFileProcessorWaveView::knob instead of audioFileKnob) * replace AudioFileProcessorView::m_graph (QPixmap) by AudioFileProcessorView::m_waveView (AudioFileProcessorWaveView) Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
committed by
Tobias Doerffel
parent
ad3af97798
commit
d448e6743d
@@ -112,6 +112,8 @@ protected:
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _me );
|
||||
|
||||
virtual float getValue( const QPoint & _p );
|
||||
|
||||
private slots:
|
||||
virtual void enterValue();
|
||||
void displayHelp();
|
||||
@@ -128,7 +130,6 @@ private:
|
||||
|
||||
void drawKnob( QPainter * _p );
|
||||
void setPosition( const QPoint & _p );
|
||||
float getValue( const QPoint & _p );
|
||||
bool updateAngle();
|
||||
|
||||
inline float pageSize() const
|
||||
|
||||
@@ -77,10 +77,10 @@ public:
|
||||
const float _freq,
|
||||
const bool _looped = false );
|
||||
|
||||
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip );
|
||||
inline void visualize( QPainter & _p, const QRect & _dr )
|
||||
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip, f_cnt_t _from_frame = 0, f_cnt_t _to_frame = 0 );
|
||||
inline void visualize( QPainter & _p, const QRect & _dr, f_cnt_t _from_frame = 0, f_cnt_t _to_frame = 0 )
|
||||
{
|
||||
visualize( _p, _dr, _dr );
|
||||
visualize( _p, _dr, _dr, _from_frame, _to_frame );
|
||||
}
|
||||
|
||||
inline const QString & audioFile() const
|
||||
@@ -132,6 +132,16 @@ public:
|
||||
return m_frequency;
|
||||
}
|
||||
|
||||
sample_rate_t sampleRate() const
|
||||
{
|
||||
return m_sampleRate;
|
||||
}
|
||||
|
||||
int sampleLength() const
|
||||
{
|
||||
return double( m_endFrame - m_startFrame ) / m_sampleRate * 1000;
|
||||
}
|
||||
|
||||
inline void setFrequency( float _freq )
|
||||
{
|
||||
m_varLock.lock();
|
||||
|
||||
Reference in New Issue
Block a user