SpectrumAnalyzer: coding style / naming conventions improvements
@@ -18,7 +18,7 @@ ADD_SUBDIRECTORY(peak_controller_effect)
|
||||
ADD_SUBDIRECTORY(sf2_player)
|
||||
ADD_SUBDIRECTORY(sfxr)
|
||||
ADD_SUBDIRECTORY(sid)
|
||||
ADD_SUBDIRECTORY(spectrum_analyzer)
|
||||
ADD_SUBDIRECTORY(SpectrumAnalyzer)
|
||||
ADD_SUBDIRECTORY(stereo_enhancer)
|
||||
ADD_SUBDIRECTORY(stereo_matrix)
|
||||
ADD_SUBDIRECTORY(stk)
|
||||
|
||||
5
plugins/SpectrumAnalyzer/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(${FFTW3F_LIBRARIES})
|
||||
BUILD_PLUGIN(spectrumanalyzer SpectrumAnalyzer.cpp SpectrumAnalyzerControls.cpp SpectrumAnalyzerControlDialog.cpp SpectrumAnalyzer.h SpectrumAnalyzerControls.h SpectrumAnalyzerControlDialog.h MOCFILES SpectrumAnalyzerControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* spectrum_analyzer.cpp - spectrum analyzer plugin
|
||||
* SpectrumAnalyzer.cpp - spectrum analyzer effect plugin
|
||||
*
|
||||
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "spectrum_analyzer.h"
|
||||
#include "SpectrumAnalyzer.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
|
||||
@@ -34,9 +34,7 @@ Plugin::Descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Spectrum Analyzer",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser",
|
||||
"plugin for using arbitrary VST-effects "
|
||||
"inside LMMS." ),
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser", "Graphical spectrum analyzer plugin" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
@@ -49,7 +47,7 @@ Plugin::Descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
spectrumAnalyzer::spectrumAnalyzer( Model * _parent,
|
||||
SpectrumAnalyzer::SpectrumAnalyzer( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &spectrumanalyzer_plugin_descriptor, _parent, _key ),
|
||||
m_saControls( this ),
|
||||
@@ -58,16 +56,14 @@ spectrumAnalyzer::spectrumAnalyzer( Model * _parent,
|
||||
{
|
||||
memset( m_buffer, 0, sizeof( m_buffer ) );
|
||||
|
||||
m_specBuf = (fftwf_complex *) fftwf_malloc( ( FFT_BUFFER_SIZE + 1 ) *
|
||||
sizeof( fftwf_complex ) );
|
||||
m_fftPlan = fftwf_plan_dft_r2c_1d( FFT_BUFFER_SIZE*2, m_buffer,
|
||||
m_specBuf, FFTW_MEASURE );
|
||||
m_specBuf = (fftwf_complex *) fftwf_malloc( ( FFT_BUFFER_SIZE + 1 ) * sizeof( fftwf_complex ) );
|
||||
m_fftPlan = fftwf_plan_dft_r2c_1d( FFT_BUFFER_SIZE*2, m_buffer, m_specBuf, FFTW_MEASURE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
spectrumAnalyzer::~spectrumAnalyzer()
|
||||
SpectrumAnalyzer::~SpectrumAnalyzer()
|
||||
{
|
||||
fftwf_destroy_plan( m_fftPlan );
|
||||
fftwf_free( m_specBuf );
|
||||
@@ -76,12 +72,11 @@ spectrumAnalyzer::~spectrumAnalyzer()
|
||||
|
||||
|
||||
|
||||
bool spectrumAnalyzer::processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames )
|
||||
bool SpectrumAnalyzer::processAudioBuffer( sampleFrame* _buf, const fpp_t _frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
{
|
||||
return( false );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !m_saControls.isViewVisible() )
|
||||
@@ -126,7 +121,7 @@ bool spectrumAnalyzer::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
if( m_framesFilledUp < FFT_BUFFER_SIZE )
|
||||
{
|
||||
return( isRunning() );
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
|
||||
@@ -144,15 +139,12 @@ bool spectrumAnalyzer::processAudioBuffer( sampleFrame * _buf,
|
||||
MAX_BANDS,
|
||||
(int)(LOWEST_FREQ*(FFT_BUFFER_SIZE+1)/(float)(sr/2)),
|
||||
(int)(HIGHEST_FREQ*(FFT_BUFFER_SIZE+1)/(float)(sr/2)));
|
||||
m_energy = maximum( m_bands, MAX_BANDS ) /
|
||||
maximum( m_buffer, FFT_BUFFER_SIZE );
|
||||
m_energy = maximum( m_bands, MAX_BANDS ) / maximum( m_buffer, FFT_BUFFER_SIZE );
|
||||
}
|
||||
else
|
||||
{
|
||||
calc13octaveband31( m_absSpecBuf, m_bands,
|
||||
FFT_BUFFER_SIZE+1, sr/2.0 );
|
||||
m_energy = signalpower( m_buffer, FFT_BUFFER_SIZE ) /
|
||||
maximum( m_buffer, FFT_BUFFER_SIZE );
|
||||
calc13octaveband31( m_absSpecBuf, m_bands, FFT_BUFFER_SIZE+1, sr/2.0 );
|
||||
m_energy = signalpower( m_buffer, FFT_BUFFER_SIZE ) / maximum( m_buffer, FFT_BUFFER_SIZE );
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +152,7 @@ bool spectrumAnalyzer::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
checkGate( 0 );
|
||||
|
||||
return( isRunning() );
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
|
||||
@@ -171,11 +163,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return( new spectrumAnalyzer( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) ) );
|
||||
return new SpectrumAnalyzer( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* spectrum_analyzer.h - spectrum anaylzer
|
||||
* SpectrumAnalyzer.h - spectrum anaylzer effect plugin
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
#include "Effect.h"
|
||||
#include "fft_helpers.h"
|
||||
#include "spectrumanalyzer_controls.h"
|
||||
#include "SpectrumAnalyzerControls.h"
|
||||
|
||||
|
||||
const int MAX_BANDS = 249;
|
||||
|
||||
|
||||
class spectrumAnalyzer : public Effect
|
||||
class SpectrumAnalyzer : public Effect
|
||||
{
|
||||
public:
|
||||
enum ChannelModes
|
||||
@@ -44,9 +44,9 @@ public:
|
||||
RightChannel
|
||||
} ;
|
||||
|
||||
spectrumAnalyzer( Model * _parent,
|
||||
SpectrumAnalyzer( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~spectrumAnalyzer();
|
||||
virtual ~SpectrumAnalyzer();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
spectrumAnalyzerControls m_saControls;
|
||||
SpectrumAnalyzerControls m_saControls;
|
||||
|
||||
fftwf_plan m_fftPlan;
|
||||
|
||||
@@ -69,13 +69,10 @@ private:
|
||||
float m_bands[MAX_BANDS];
|
||||
float m_energy;
|
||||
|
||||
friend class spectrumAnalyzerControls;
|
||||
friend class spectrumView;
|
||||
friend class SpectrumAnalyzerControls;
|
||||
friend class SpectrumView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* spectrumanaylzer_control_dialog.cpp - view for spectrum analyzer
|
||||
* SpectrumAnalyzerControlDialog.cpp - view for spectrum analyzer
|
||||
*
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,24 +22,22 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#include "spectrum_analyzer.h"
|
||||
#include "SpectrumAnalyzer.h"
|
||||
#include "MainWindow.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
static inline void darken( QImage & _i, int _x, int _y, int _w, int _h )
|
||||
static inline void darken( QImage& img, int x, int y, int w, int h )
|
||||
{
|
||||
const int w = _i.width();
|
||||
QRgb * base = ( (QRgb *) _i.bits() ) + _y*w + _x;
|
||||
for( int y = 0; y < _h; ++y )
|
||||
QRgb * base = ( (QRgb *) img.bits() ) + y*img.width() + x;
|
||||
for( int y = 0; y < h; ++y )
|
||||
{
|
||||
QRgb * d = base + y*w;
|
||||
for( int x = 0; x < _w; ++x )
|
||||
for( int x = 0; x < w; ++x )
|
||||
{
|
||||
// shift each color component by 1 bit and set alpha
|
||||
// to 0xff
|
||||
@@ -50,26 +48,25 @@ static inline void darken( QImage & _i, int _x, int _y, int _w, int _h )
|
||||
|
||||
|
||||
|
||||
class spectrumView : public QWidget
|
||||
class SpectrumView : public QWidget
|
||||
{
|
||||
public:
|
||||
spectrumView( spectrumAnalyzer * _s, QWidget * _parent ) :
|
||||
SpectrumView( SpectrumAnalyzer* s, QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
m_sa( _s ),
|
||||
m_sa( s ),
|
||||
m_backgroundPlain( PLUGIN_NAME::getIconPixmap( "spectrum_background_plain" ).toImage() ),
|
||||
m_background( PLUGIN_NAME::getIconPixmap( "spectrum_background" ).toImage() )
|
||||
{
|
||||
setFixedSize( 249, 151 );
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
||||
}
|
||||
|
||||
virtual ~spectrumView()
|
||||
virtual ~SpectrumView()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void paintEvent( QPaintEvent * _pe )
|
||||
virtual void paintEvent( QPaintEvent* event )
|
||||
{
|
||||
QPainter p( this );
|
||||
QImage i = m_sa->m_saControls.m_linearSpec.value() ?
|
||||
@@ -135,7 +132,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
spectrumAnalyzer * m_sa;
|
||||
SpectrumAnalyzer * m_sa;
|
||||
QImage m_backgroundPlain;
|
||||
QImage m_background;
|
||||
|
||||
@@ -144,35 +141,31 @@ private:
|
||||
|
||||
|
||||
|
||||
spectrumAnalyzerControlDialog::spectrumAnalyzerControlDialog(
|
||||
spectrumAnalyzerControls * _controls ) :
|
||||
EffectControlDialog( _controls ),
|
||||
m_controls( _controls ),
|
||||
SpectrumAnalyzerControlDialog::SpectrumAnalyzerControlDialog( SpectrumAnalyzerControls* controls ) :
|
||||
EffectControlDialog( controls ),
|
||||
m_controls( controls ),
|
||||
m_logXAxis( PLUGIN_NAME::getIconPixmap( "log_x_axis" ) ),
|
||||
m_logYAxis( PLUGIN_NAME::getIconPixmap( "log_y_axis" ) )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(),
|
||||
PLUGIN_NAME::getIconPixmap( "background" ) );
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "background" ) );
|
||||
setFixedSize( 280, 243 );
|
||||
setPalette( pal );
|
||||
/* QVBoxLayout * l = new QVBoxLayout( this );*/
|
||||
spectrumView * v = new spectrumView( _controls->m_effect, this );
|
||||
SpectrumView* v = new SpectrumView( controls->m_effect, this );
|
||||
v->move( 27, 30 );
|
||||
|
||||
ledCheckBox * lin_spec = new ledCheckBox( tr( "Linear spectrum" ), this );
|
||||
lin_spec->move( 24, 204 );
|
||||
lin_spec->setModel( &_controls->m_linearSpec );
|
||||
lin_spec->setModel( &controls->m_linearSpec );
|
||||
|
||||
ledCheckBox * lin_y = new ledCheckBox( tr( "Linear Y axis" ), this );
|
||||
lin_y->move( 24, 220 );
|
||||
lin_y->setModel( &_controls->m_linearYAxis );
|
||||
lin_y->setModel( &controls->m_linearYAxis );
|
||||
|
||||
connect( &_controls->m_linearSpec, SIGNAL( dataChanged() ),
|
||||
this, SLOT( update() ) );
|
||||
connect( &_controls->m_linearYAxis, SIGNAL( dataChanged() ),
|
||||
this, SLOT( update() ) );
|
||||
connect( &controls->m_linearSpec, SIGNAL( dataChanged() ), this, SLOT( update() ) );
|
||||
connect( &controls->m_linearYAxis, SIGNAL( dataChanged() ), this, SLOT( update() ) );
|
||||
/* l->addWidget( v );
|
||||
l->addWidget( lin_spec );
|
||||
l->addWidget( lin_y );*/
|
||||
@@ -180,13 +173,15 @@ spectrumAnalyzerControlDialog::spectrumAnalyzerControlDialog(
|
||||
}
|
||||
|
||||
|
||||
void spectrumAnalyzerControlDialog::paintEvent( QPaintEvent * )
|
||||
void SpectrumAnalyzerControlDialog::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p( this );
|
||||
|
||||
if( !m_controls->m_linearSpec.value() )
|
||||
{
|
||||
p.drawPixmap( 25, 183, m_logXAxis );
|
||||
}
|
||||
|
||||
if( !m_controls->m_linearYAxis.value() )
|
||||
{
|
||||
p.drawPixmap( 3, 47, m_logYAxis);
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* spectrumanalyzer_control_dialog.h - view for spectrum analyzer
|
||||
* SpectrumAnalyzerControlDialog.h - view for spectrum analyzer
|
||||
*
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,27 +22,27 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SPECTRUMANALYZER_CONTROL_DIALOG_H
|
||||
#define _SPECTRUMANALYZER_CONTROL_DIALOG_H
|
||||
#ifndef _SPECTRUM_ANALYZER_CONTROL_DIALOG_H
|
||||
#define _SPECTRUM_ANALYZER_CONTROL_DIALOG_H
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class spectrumAnalyzerControls;
|
||||
class SpectrumAnalyzerControls;
|
||||
|
||||
|
||||
class spectrumAnalyzerControlDialog : public EffectControlDialog
|
||||
class SpectrumAnalyzerControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
spectrumAnalyzerControlDialog( spectrumAnalyzerControls * _controls );
|
||||
virtual ~spectrumAnalyzerControlDialog()
|
||||
SpectrumAnalyzerControlDialog( SpectrumAnalyzerControls* controls );
|
||||
virtual ~SpectrumAnalyzerControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void paintEvent( QPaintEvent* event );
|
||||
|
||||
spectrumAnalyzerControls * m_controls;
|
||||
SpectrumAnalyzerControls* m_controls;
|
||||
|
||||
QPixmap m_logXAxis;
|
||||
QPixmap m_logYAxis;
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* spectrumanaylzer_controls.cpp - controls for spectrum analyzer
|
||||
* SpectrumAnalyzerControls.cpp - controls for spectrum analyzer
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -23,18 +23,19 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "spectrum_analyzer.h"
|
||||
#include "SpectrumAnalyzer.h"
|
||||
#include "SpectrumAnalyzerControls.h"
|
||||
|
||||
|
||||
|
||||
spectrumAnalyzerControls::spectrumAnalyzerControls( spectrumAnalyzer * _eff ) :
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
SpectrumAnalyzerControls::SpectrumAnalyzerControls( SpectrumAnalyzer* effect ) :
|
||||
EffectControls( effect ),
|
||||
m_effect( effect ),
|
||||
m_linearSpec( false, this, tr( "Linear spectrum" ) ),
|
||||
m_linearYAxis( false, this, tr( "Linear Y-axis" ) ),
|
||||
m_channelMode( spectrumAnalyzer::MergeChannels,
|
||||
spectrumAnalyzer::MergeChannels,
|
||||
spectrumAnalyzer::RightChannel,
|
||||
m_linearYAxis( false, this, tr( "Linear Y axis" ) ),
|
||||
m_channelMode( SpectrumAnalyzer::MergeChannels,
|
||||
SpectrumAnalyzer::MergeChannels,
|
||||
SpectrumAnalyzer::RightChannel,
|
||||
this, tr( "Channel mode" ) )
|
||||
{
|
||||
}
|
||||
@@ -42,21 +43,19 @@ spectrumAnalyzerControls::spectrumAnalyzerControls( spectrumAnalyzer * _eff ) :
|
||||
|
||||
|
||||
|
||||
void spectrumAnalyzerControls::loadSettings( const QDomElement & _this )
|
||||
void SpectrumAnalyzerControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
// m_freqModel.setValue( _this.attribute( "freq" ).toFloat() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void spectrumAnalyzerControls::saveSettings( QDomDocument & _doc,
|
||||
void SpectrumAnalyzerControls::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
// _this.setAttribute( "freq", m_freqModel.value() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "moc_spectrumanalyzer_controls.cxx"
|
||||
#include "moc_SpectrumAnalyzerControls.cxx"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* spectrumanaylzer_controls.h - controls for spectrum-analyzer
|
||||
* SpectrumAnalyzerControls.h - controls for spectrum-analyzer
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -22,23 +22,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SPECTRUMANALYZER_CONTROLS_H
|
||||
#define _SPECTRUMANALYZER_CONTROLS_H
|
||||
#ifndef SPECTRUM_ANALYZER_CONTROLS_H
|
||||
#define SPECTRUM_ANALYZER_CONTROLS_H
|
||||
|
||||
#include "EffectControls.h"
|
||||
#include "spectrumanalyzer_control_dialog.h"
|
||||
#include "SpectrumAnalyzerControlDialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
class spectrumAnalyzer;
|
||||
class SpectrumAnalyzer;
|
||||
|
||||
|
||||
class spectrumAnalyzerControls : public EffectControls
|
||||
class SpectrumAnalyzerControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
spectrumAnalyzerControls( spectrumAnalyzer * _eff );
|
||||
virtual ~spectrumAnalyzerControls()
|
||||
SpectrumAnalyzerControls( SpectrumAnalyzer* effect );
|
||||
virtual ~SpectrumAnalyzerControls()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -46,29 +46,29 @@ public:
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return( "spectrumanaylzercontrols" );
|
||||
return "spectrumanaylzercontrols";
|
||||
}
|
||||
|
||||
virtual int controlCount()
|
||||
{
|
||||
return( 1 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return( new spectrumAnalyzerControlDialog( this ) );
|
||||
return new SpectrumAnalyzerControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
spectrumAnalyzer * m_effect;
|
||||
SpectrumAnalyzer* m_effect;
|
||||
BoolModel m_linearSpec;
|
||||
BoolModel m_linearYAxis;
|
||||
IntModel m_channelMode;
|
||||
|
||||
friend class spectrumAnalyzer;
|
||||
friend class spectrumAnalyzerControlDialog;
|
||||
friend class spectrumView;
|
||||
friend class SpectrumAnalyzer;
|
||||
friend class SpectrumAnalyzerControlDialog;
|
||||
friend class SpectrumView;
|
||||
|
||||
} ;
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 734 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 763 B |
@@ -1,5 +0,0 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(${FFTW3F_LIBRARIES})
|
||||
BUILD_PLUGIN(spectrumanalyzer spectrum_analyzer.cpp spectrumanalyzer_controls.cpp spectrumanalyzer_control_dialog.cpp spectrum_analyzer.h spectrumanalyzer_controls.h spectrumanalyzer_control_dialog.h MOCFILES spectrumanalyzer_controls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||