Redesign of EQ plugin (#3030)

* redesign of EQ plugin

* correct some symbols

* set pixelPerUnitHeight to float

* change textcolor of inactive handles to white

* revert changes in styles.css

* change grid color/adjust Fontsize of info box / change analizing color

* range changed (20 - 20000 Hz) / display width increased

* Update the EQ faders and remove unused files

* Increase transparency of the graph

* corrects the filter fader peak

* makes fader peak display more useful

* Implement @zapashcanon's suggestions
This commit is contained in:
Steffen Baranowsky
2017-02-14 18:25:32 +01:00
committed by GitHub
parent c1321ba80f
commit 558962d231
73 changed files with 127 additions and 200 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 958 B

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 B

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

View File

@@ -50,14 +50,14 @@ EqControls::EqControls( EqEffect *effect ) :
m_para4BwModel( 0.3, 0.1, 4 , 0.001, this , tr( "Peak 4 BW" ) ),
m_highShelfResModel( 1.4, 0.55, 10.0 , 0.001, this , tr( "High Shelf res" ) ),
m_lpResModel( 0.707,0.003, 10.0 , 0.001, this , tr( "LP res" ) ),
m_hpFeqModel( 31.0, 27.0, 20000, 0.001, this , tr( "HP freq" ) ),
m_lowShelfFreqModel( 80.0, 27.0, 20000, 0.001, this , tr( "Low Shelf freq" ) ),
m_para1FreqModel( 120.0, 27.0, 20000, 0.001, this , tr( "Peak 1 freq" ) ),
m_para2FreqModel( 250.0, 27.0, 20000, 0.001, this, tr( "Peak 2 freq" ) ),
m_para3FreqModel( 2000.0, 27.0, 20000, 0.001, this , tr( "Peak 3 freq" ) ),
m_para4FreqModel( 4000.0, 27.0, 20000, 0.001, this , tr( "Peak 4 freq" ) ),
m_highShelfFreqModel( 12000.0, 27.0, 20000, 0.001, this , tr( "High shelf freq" ) ),
m_lpFreqModel( 18000.0, 27.0, 20000, 0.001, this , tr( "LP freq" ) ),
m_hpFeqModel( 31.0, 20.0, 20000, 0.001, this , tr( "HP freq" ) ),
m_lowShelfFreqModel( 80.0, 20.0, 20000, 0.001, this , tr( "Low Shelf freq" ) ),
m_para1FreqModel( 120.0, 20.0, 20000, 0.001, this , tr( "Peak 1 freq" ) ),
m_para2FreqModel( 250.0, 20.0, 20000, 0.001, this, tr( "Peak 2 freq" ) ),
m_para3FreqModel( 2000.0, 20.0, 20000, 0.001, this , tr( "Peak 3 freq" ) ),
m_para4FreqModel( 4000.0, 20.0, 20000, 0.001, this , tr( "Peak 4 freq" ) ),
m_highShelfFreqModel( 12000.0, 20.0, 20000, 0.001, this , tr( "High shelf freq" ) ),
m_lpFreqModel( 18000.0, 20.0, 20000, 0.001, this , tr( "LP freq" ) ),
m_hpActiveModel( false, this , tr( "HP active" ) ),
m_lowShelfActiveModel( false, this , tr( "Low shelf active" ) ),
m_para1ActiveModel( false, this , tr( "Peak 1 active" ) ),

View File

@@ -44,21 +44,20 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
{
setAutoFillBackground( true );
QPalette pal;
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "EqLayout1BG" ) );
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
setPalette( pal );
setFixedSize( 500, 500 );
QGridLayout *mainLayout = new QGridLayout( this );
EqSpectrumView *inSpec = new EqSpectrumView( &controls->m_inFftBands, this );
mainLayout->addWidget( inSpec, 0, 1, 1, 8 );
inSpec->setColor( QColor( 238, 154, 120, 80 ) );
EqSpectrumView * inSpec = new EqSpectrumView( &controls->m_inFftBands, this );
inSpec->move( 26, 17 );
inSpec->setColor( QColor( 54, 45, 142, 150 ) );
EqSpectrumView *outSpec = new EqSpectrumView( &controls->m_outFftBands, this );
outSpec->setColor( QColor( 145, 205, 22, 80 ) );
mainLayout->addWidget( outSpec, 0, 1, 1, 8 );
EqSpectrumView * outSpec = new EqSpectrumView( &controls->m_outFftBands, this );
outSpec->setColor( QColor( 9, 166, 156, 150 ) );
outSpec->move( 26, 17 );
m_parameterWidget = new EqParameterWidget( this , controls );
mainLayout->addWidget( m_parameterWidget, 0, 1, 1, 8 );
m_parameterWidget->move( 26, 17 );
setBand( 0, &controls->m_hpActiveModel, &controls->m_hpFeqModel, &controls->m_hpResModel, 0, QColor(255 ,255, 255), tr( "HP" ) ,0,0, &controls->m_hp12Model, &controls->m_hp24Model, &controls->m_hp48Model,0,0,0);
setBand( 1, &controls->m_lowShelfActiveModel, &controls->m_lowShelfFreqModel, &controls->m_lowShelfResModel, &controls->m_lowShelfGainModel, QColor(255 ,255, 255), tr( "Low Shelf" ), &controls->m_lowShelfPeakL , &controls->m_lowShelfPeakR,0,0,0,0,0,0 );
@@ -69,89 +68,60 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
setBand( 6, &controls->m_highShelfActiveModel, &controls->m_highShelfFreqModel, &controls->m_highShelfResModel, &controls->m_highShelfGainModel, QColor(255 ,255, 255), tr( "High Shelf" ), &controls->m_highShelfPeakL, &controls->m_highShelfPeakR,0,0,0,0,0,0 );
setBand( 7, &controls->m_lpActiveModel, &controls->m_lpFreqModel, &controls->m_lpResModel, 0, QColor(255 ,255, 255), tr( "LP" ) ,0,0,0,0,0, &controls->m_lp12Model, &controls->m_lp24Model, &controls->m_lp48Model);
EqFader *inGainFader = new EqFader( &controls->m_inGainModel, tr( "In Gain" ), this, &controls->m_inPeakL, &controls->m_inPeakR );
mainLayout->addWidget( inGainFader, 0, 0 );
inGainFader->setDisplayConversion( false );
inGainFader->setHintText( tr( "Gain" ), "dBFS");
QPixmap * faderBg = new QPixmap( PLUGIN_NAME::getIconPixmap( "faderback" ) );
QPixmap * faderLeds = new QPixmap( PLUGIN_NAME::getIconPixmap( "faderleds" ) );
QPixmap * faderKnob = new QPixmap( PLUGIN_NAME::getIconPixmap( "faderknob" ) );
EqFader *outGainFader = new EqFader( &controls->m_outGainModel, tr( "Out Gain" ), this, &controls->m_outPeakL, &controls->m_outPeakR );
mainLayout->addWidget( outGainFader, 0, 9 );
outGainFader->setDisplayConversion( false );
outGainFader->setHintText( tr( "Gain" ), "dBFS" );
EqFader * GainFaderIn = new EqFader( &controls->m_inGainModel, tr( "In Gain" ), this, faderBg, faderLeds, faderKnob, &controls->m_inPeakL, &controls->m_inPeakR );
GainFaderIn->move( 23, 295 );
GainFaderIn->setDisplayConversion( false );
GainFaderIn->setHintText( tr( "Gain" ), "dBv");
EqFader * GainFaderOut = new EqFader( &controls->m_outGainModel, tr( "Out Gain" ), this, faderBg, faderLeds, faderKnob, &controls->m_outPeakL, &controls->m_outPeakR );
GainFaderOut->move( 453, 295);
GainFaderOut->setDisplayConversion( false );
GainFaderOut->setHintText( tr( "Gain" ), "dBv" );
// Gain Fader for each Filter exepts the pass filter
int distance = 126;
for( int i = 1; i < m_parameterWidget->bandCount() - 1; i++ )
{
EqFader *gainFader = new EqFader( m_parameterWidget->getBandModels( i )->gain, tr( "" ), this,
m_parameterWidget->getBandModels( i )->peakL, m_parameterWidget->getBandModels( i )->peakR );
mainLayout->addWidget( gainFader, 2, i+1 );
mainLayout->setAlignment( gainFader, Qt::AlignHCenter );
EqFader * gainFader = new EqFader( m_parameterWidget->getBandModels( i )->gain, tr( "" ), this, faderBg, faderLeds, faderKnob, m_parameterWidget->getBandModels( i )->peakL, m_parameterWidget->getBandModels( i )->peakR );
gainFader->move( distance, 295 );
distance += 44;
gainFader->setMinimumHeight(80);
gainFader->resize(gainFader->width() , 80);
gainFader->setDisplayConversion( false );
gainFader->setHintText( tr( "Gain") , "dB");
}
//Control Button and Knobs for each Band
distance = 81;
for( int i = 0; i < m_parameterWidget->bandCount() ; i++ )
{
Knob *resKnob = new Knob( knobBright_26, this );
mainLayout->setRowMinimumHeight( 4, 33 );
mainLayout->addWidget( resKnob, 5, i + 1 );
mainLayout->setAlignment( resKnob, Qt::AlignHCenter );
Knob * resKnob = new Knob( knobBright_26, this );
resKnob->move( distance, 440 );
resKnob->setVolumeKnob(false);
resKnob->setModel( m_parameterWidget->getBandModels( i )->res );
if(i > 1 && i < 6) { resKnob->setHintText( tr( "Bandwidth: " ) , tr( " Octave" ) ); }
else { resKnob->setHintText( tr( "Resonance : " ) , "" ); }
Knob *freqKnob = new Knob( knobBright_26, this );
mainLayout->addWidget( freqKnob, 3, i+1 );
mainLayout->setAlignment( freqKnob, Qt::AlignHCenter );
Knob * freqKnob = new Knob( knobBright_26, this );
freqKnob->move( distance, 396 );
freqKnob->setVolumeKnob( false );
freqKnob->setModel( m_parameterWidget->getBandModels( i )->freq );
freqKnob->setHintText( tr( "Frequency:" ), "Hz" );
// adds the Number Active buttons
PixmapButton *activeNumButton = new PixmapButton( this, NULL );
activeNumButton->setCheckable(true);
activeNumButton->setModel( m_parameterWidget->getBandModels( i )->active );
QString iconActiveFileName = "bandLabel" + QString::number(i+1) + "on";
QString iconInactiveFileName = "bandLabel" + QString::number(i+1);
activeNumButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( iconActiveFileName.toLatin1() ) );
activeNumButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( iconInactiveFileName.toLatin1() ) );
mainLayout->addWidget( activeNumButton, 1, i+1 );
mainLayout->setAlignment( activeNumButton, Qt::AlignHCenter );
activeNumButton->setModel( m_parameterWidget->getBandModels( i )->active );
// adds the symbols active buttons
PixmapButton *activeButton = new PixmapButton( this, NULL );
PixmapButton * activeButton = new PixmapButton( this, NULL );
activeButton->setCheckable(true);
activeButton->setModel( m_parameterWidget->getBandModels( i )->active );
switch (i)
{
case 0:
activeButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveHP" ) );
activeButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveHPoff" ) );
break;
case 1:
activeButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveLS" ) );
activeButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveLSoff" ) );
break;
case 6:
activeButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveHS" ) );
activeButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveHSoff" ) );
break;
case 7:
activeButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveLP" ) );
activeButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveLPoff" ) );
break;
default:
activeButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActivePeak" ) );
activeButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActivePeakoff" ) );
}
mainLayout->addWidget( activeButton, 7, i+1 );
mainLayout->setAlignment( activeButton, Qt::AlignHCenter);
QString iconActiveFileName = "bandLabel" + QString::number(i+1);
QString iconInactiveFileName = "bandLabel" + QString::number(i+1) + "off";
activeButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( iconActiveFileName.toLatin1() ) );
activeButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( iconInactiveFileName.toLatin1() ) );
activeButton->move( distance - 2, 276 );
activeButton->setModel( m_parameterWidget->getBandModels( i )->active );
// Connects the knobs, Faders and buttons with the curve graphic
@@ -161,79 +131,66 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
QObject::connect( m_parameterWidget->getBandModels( i )->active, SIGNAL( dataChanged() ), m_parameterWidget , SLOT ( updateHandle() ) );
m_parameterWidget->changeHandle( i );
distance += 44;
}
// adds the buttons for Spectrum analyser on/off
PixmapButton *inSpecB = new PixmapButton(this, NULL);
inSpecB->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveAnalyse" ) );
inSpecB->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveAnalyseoff" ) );
inSpecB->setCheckable( true );
inSpecB->setModel( &controls->m_analyseInModel );
PixmapButton *outSpecB = new PixmapButton(this, NULL);
outSpecB->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveAnalyse" ) );
outSpecB->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ActiveAnalyseoff" ) );
outSpecB->setCheckable( true );
outSpecB->setModel( &controls->m_analyseOutModel );
mainLayout->addWidget( inSpecB, 1, 0 );
mainLayout->addWidget( outSpecB, 1, 9 );
mainLayout->setAlignment( inSpecB, Qt::AlignHCenter );
mainLayout->setAlignment( outSpecB, Qt::AlignHCenter );
// adds the buttons for Spectrum analyser on/off
LedCheckBox * inSpecButton = new LedCheckBox( this );
inSpecButton->setCheckable(true);
inSpecButton->setModel( &controls->m_analyseInModel );
inSpecButton->move( 172, 240 );
LedCheckBox * outSpecButton = new LedCheckBox( this );
outSpecButton->setCheckable(true);
outSpecButton->setModel( &controls->m_analyseOutModel );
outSpecButton->move( 302, 240 );
//hp filter type
PixmapButton *hp12Button = new PixmapButton( this , NULL );
PixmapButton * hp12Button = new PixmapButton( this , NULL );
hp12Button->setModel( m_parameterWidget->getBandModels( 0 )->hp12 );
hp12Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "12dB" ) );
hp12Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "12dBoff" ) );
PixmapButton *hp24Button = new PixmapButton( this , NULL );
hp12Button->move( 79, 298 );
PixmapButton * hp24Button = new PixmapButton( this , NULL );
hp24Button->setModel(m_parameterWidget->getBandModels( 0 )->hp24 );
hp24Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "24dB" ) );
hp24Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "24dBoff" ) );
PixmapButton *hp48Button = new PixmapButton( this , NULL );
hp24Button->move( 79 , 328 );
PixmapButton * hp48Button = new PixmapButton( this , NULL );
hp48Button->setModel( m_parameterWidget->getBandModels(0)->hp48 );
hp48Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "48dB" ) );
hp48Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "48dBoff" ) );
hp48Button->move( 79, 358 );
//LP filter type
PixmapButton *lp12Button = new PixmapButton( this , NULL );
mainLayout->addWidget( lp12Button, 2, 1 );
PixmapButton * lp12Button = new PixmapButton( this , NULL );
lp12Button->setModel( m_parameterWidget->getBandModels( 7 )->lp12 );
lp12Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "12dB" ) );
lp12Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "12dBoff" ) );
PixmapButton *lp24Button = new PixmapButton( this , NULL );
lp12Button->move( 387, 298 );
PixmapButton * lp24Button = new PixmapButton( this , NULL );
lp24Button->setModel( m_parameterWidget->getBandModels( 7 )->lp24 );
lp24Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "24dB" ) );
lp24Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "24dBoff" ) );
PixmapButton *lp48Button = new PixmapButton( this , NULL );
lp24Button->move( 387, 328 );
PixmapButton * lp48Button = new PixmapButton( this , NULL );
lp48Button->setModel( m_parameterWidget->getBandModels( 7 )->lp48 );
lp48Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "48dB" ) );
lp48Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "48dBoff" ) );
lp48Button->move( 387, 358 );
// the curve has to change its appearance
connect( m_parameterWidget->getBandModels( 0 )->hp12 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
connect( m_parameterWidget->getBandModels( 0 )->hp24 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
connect( m_parameterWidget->getBandModels( 0 )->hp48 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
QObject::connect( m_parameterWidget->getBandModels( 0 )->hp12 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
QObject::connect( m_parameterWidget->getBandModels( 0 )->hp24 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
QObject::connect( m_parameterWidget->getBandModels( 0 )->hp48 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
connect( m_parameterWidget->getBandModels( 7 )->lp12 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
connect( m_parameterWidget->getBandModels( 7 )->lp24 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
connect( m_parameterWidget->getBandModels( 7 )->lp48 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
QVBoxLayout *hpGrpBtnLayout = new QVBoxLayout;
hpGrpBtnLayout->addWidget( hp12Button );
hpGrpBtnLayout->addWidget( hp24Button );
hpGrpBtnLayout->addWidget( hp48Button );
QVBoxLayout *lpGrpBtnLayout = new QVBoxLayout;
lpGrpBtnLayout->addWidget( lp12Button );
lpGrpBtnLayout->addWidget( lp24Button );
lpGrpBtnLayout->addWidget( lp48Button );
mainLayout->addLayout( hpGrpBtnLayout, 2, 1, Qt::AlignCenter );
mainLayout->addLayout( lpGrpBtnLayout, 2, 8, Qt::AlignCenter );
QObject::connect( m_parameterWidget->getBandModels( 7 )->lp12 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
QObject::connect( m_parameterWidget->getBandModels( 7 )->lp24 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
QObject::connect( m_parameterWidget->getBandModels( 7 )->lp48 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
automatableButtonGroup *lpBtnGrp = new automatableButtonGroup(this,tr ( "lp grp" ) );
lpBtnGrp->addButton( lp12Button );
@@ -246,40 +203,6 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
hpBtnGrp->addButton( hp24Button );
hpBtnGrp->addButton( hp48Button );
hpBtnGrp->setModel( &m_controls->m_hpTypeModel,false);
mainLayout->setAlignment( Qt::AlignTop );
for (int i = 0 ; i < 10; i++)
{
mainLayout->setColumnMinimumWidth(i, 50);
}
mainLayout->setAlignment( inGainFader, Qt::AlignHCenter );
mainLayout->setAlignment( outGainFader, Qt::AlignHCenter );
mainLayout->setRowMinimumHeight( 0,200 );
mainLayout->setRowMinimumHeight( 1, 40 );
mainLayout->setRowMinimumHeight(6,15);
mainLayout->setContentsMargins( 0, 11, 0, 0 );
mainLayout->setAlignment(inSpec, Qt::AlignCenter );
mainLayout->setAlignment(outSpec, Qt::AlignCenter );
QLabel *freqLabel = new QLabel( this );
freqLabel->setText("- " + tr( "Frequency")+ " -" );
freqLabel->move( 217 , 377 );
QLabel *resLabel1 = new QLabel( this );
resLabel1->setText("- " + tr( "Resonance")+ " -" );
resLabel1->move( 62 , 444 );
QLabel *resLabel2 = new QLabel( this );
resLabel2->setText("- " + tr( "Resonance")+ " -" );
resLabel2->move( 365 , 444 );
QLabel *bandWidthLabel = new QLabel( this );
bandWidthLabel->setText("- " + tr( "Bandwidth")+ " -" );
bandWidthLabel->move( 215 , 444 );
setLayout(mainLayout);
}

View File

@@ -27,7 +27,7 @@
#include "embed.h"
#include "lmms_math.h"
EqHandle::EqHandle( int num, int x, int y ) :
EqHandle::EqHandle( int num, int x, int y ):
m_numb( num ),
m_width( x ),
m_heigth( y ),
@@ -49,7 +49,7 @@ EqHandle::EqHandle( int num, int x, int y ) :
QRectF EqHandle::boundingRect() const
{
return QRectF( -11, -11, 23, 23 );
return QRectF( - m_circlePixmap.width() / 2, - m_circlePixmap.height() / 2, m_circlePixmap.width(), m_circlePixmap.height() );
}
@@ -57,7 +57,7 @@ QRectF EqHandle::boundingRect() const
float EqHandle::freqToXPixel( float freq , int w )
{
float min = log10f( 27 );
float min = log10f( 20 );
float max = log10f( 20000 );
float range = max - min;
return ( log10f( freq ) - min ) / range * w;
@@ -68,7 +68,7 @@ float EqHandle::freqToXPixel( float freq , int w )
float EqHandle::xPixelToFreq( float x , int w )
{
float min = log10f( 27 );
float min = log10f( 20 );
float max = log10f( 20000 );
float range = max - min;
return powf( 10 , x * ( range / w ) + min );
@@ -77,7 +77,7 @@ float EqHandle::xPixelToFreq( float x , int w )
float EqHandle::gainToYPixel(float gain , int h, int pixelPerUnitHeight)
float EqHandle::gainToYPixel(float gain , int h, float pixelPerUnitHeight )
{
return h * 0.5 - gain * pixelPerUnitHeight;
}
@@ -85,7 +85,7 @@ float EqHandle::gainToYPixel(float gain , int h, int pixelPerUnitHeight)
float EqHandle::yPixelToGain( float y , int h, int pixelPerUnitHeight )
float EqHandle::yPixelToGain(float y , int h, float pixelPerUnitHeight )
{
return ( ( h * 0.5 ) - y ) / pixelPerUnitHeight;
}
@@ -109,10 +109,10 @@ void EqHandle::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
emit positionChanged();
}
QString fileName = "handle" + QString::number(m_numb+1);
if ( !isActiveHandle() ) { fileName = fileName + "inactive"; }
QPixmap circlePixmap = PLUGIN_NAME::getIconPixmap( fileName.toLatin1() );
painter->drawPixmap( -12, -12, circlePixmap );
// graphics for the handles
loadPixmap();
painter->drawPixmap( - ( m_circlePixmap.width() / 2 ) - 1 , - ( m_circlePixmap.height() / 2 ), m_circlePixmap );
// on mouse hover draw an info box and change the pixmap of the handle
if ( isMouseHover() )
{
@@ -131,8 +131,8 @@ void EqHandle::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
{
rectX = rectX - ( 40 - ( m_width - EqHandle::x() ) );
}
painter->drawPixmap( -12, -12, PLUGIN_NAME::getIconPixmap( "handlehover" ) );
QPixmap hover = PLUGIN_NAME::getIconPixmap( "handlehover" );
painter->drawPixmap( - ( hover.width() / 2) - 1, - ( hover.height() / 2 ), hover );
QRectF textRect = QRectF ( rectX, rectY, 80, 30 );
QRectF textRect2 = QRectF ( rectX+1, rectY+1, 80, 30 );
QString freq = QString::number( xPixelToFreq( EqHandle::x(), m_width ) );
@@ -146,9 +146,12 @@ void EqHandle::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
res = tr( "BW: " ) + QString::number( getResonance() );
}
painter->setPen( QColor( 255, 255, 255 ) );
QFont painterFont = painter->font();
painterFont.setPointSizeF( painterFont.pointSizeF() * 0.7 );
painter->setFont( painterFont );
painter->setPen( Qt::black );
painter->drawRect( textRect );
painter->fillRect( textRect, QBrush( QColor( 128, 128, 255 , 64 ) ) );
painter->fillRect( textRect, QBrush( QColor( 6, 106, 43, 180 ) ) );
painter->setPen ( QColor( 0, 0, 0 ) );
painter->drawText( textRect2, Qt::AlignCenter,
@@ -179,6 +182,13 @@ QPainterPath EqHandle::getCurvePath()
return path;
}
void EqHandle::loadPixmap()
{
QString fileName = "handle" + QString::number(m_numb+1);
if ( !isActiveHandle() ) { fileName = fileName + "inactive"; }
m_circlePixmap = PLUGIN_NAME::getIconPixmap( fileName.toLatin1() );
}
@@ -798,17 +808,7 @@ void EqCurve::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
{
if ( m_handle->at(i)->isMouseHover() )
{
switch ( i+1 )
{
case 1: curveColor = QColor( 163, 23, 23, 10*m_alpha/4 );break;
case 2: curveColor = QColor( 229,108,0, 10*m_alpha/4 );break;
case 3: curveColor = QColor( 255,240,0, 10*m_alpha/4 );break;
case 4: curveColor = QColor( 12, 255, 0, 10*m_alpha/4 );break;
case 5: curveColor = QColor( 0, 252, 255, 10*m_alpha/4 );break;
case 6: curveColor = QColor( 59, 96, 235, 10*m_alpha/4 );break;
case 7: curveColor = QColor( 112, 73, 255, 10*m_alpha/4 );break;
case 8: curveColor = QColor( 255, 71, 227, 10*m_alpha/4 );
}
curveColor = QColor( qRgba( 6, 106, 43, 242 ));
QPen pen ( curveColor);
pen.setWidth( 2 );
painter->setPen( pen );

View File

@@ -52,8 +52,8 @@ public:
static float freqToXPixel( float freq, int w );
static float xPixelToFreq( float x , int w );
static float gainToYPixel( float gain, int h, int pixelPerUnitHeight );
static float yPixelToGain( float y, int h, int pixelPerUnitHeight );
static float gainToYPixel( float gain, int h, float pixelPerUnitHeight );
static float yPixelToGain( float y, int h, float pixelPerUnitHeight );
QRectF boundingRect() const;
QPainterPath getCurvePath();
@@ -94,6 +94,7 @@ protected:
private:
double calculateGain( const double freq, const double a1, const double a2, const double b0, const double b1, const double b2 );
void loadPixmap();
float m_pixelsPerUnitWidth;
float m_pixelsPerUnitHeight;
@@ -111,7 +112,7 @@ private:
bool m_mousePressed;
bool m_active;
bool m_handleMoved;
QPixmap m_circlePixmap;
private slots:
void handleMoved();

View File

@@ -327,7 +327,7 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
if(m_eqControls.m_analyseOutModel.value( true ) && outSum > 0 )
{
m_eqControls.m_outFftBands.analyze( buf, frames );
setBandPeaks( &m_eqControls.m_outFftBands , ( int )( sampleRate * 0.5 ) );
setBandPeaks( &m_eqControls.m_outFftBands , ( int )( sampleRate ) );
}
else
{
@@ -355,49 +355,53 @@ float EqEffect::peakBand( float minF, float maxF, EqAnalyser *fft, int sr )
}
}
return ( peak + 100 ) / 100;
return ( peak + 60 ) / 100;
}
void EqEffect::setBandPeaks(EqAnalyser *fft, int samplerate )
void EqEffect::setBandPeaks( EqAnalyser *fft, int samplerate )
{
m_eqControls.m_lowShelfPeakR = m_eqControls.m_lowShelfPeakL =
peakBand( 0,
m_eqControls.m_lowShelfFreqModel.value(), fft , samplerate );
peakBand( m_eqControls.m_lowShelfFreqModel.value()
* ( 1 - m_eqControls.m_lowShelfResModel.value() * 0.5 ),
m_eqControls.m_lowShelfFreqModel.value(),
fft , samplerate );
m_eqControls.m_para1PeakL = m_eqControls.m_para1PeakR =
peakBand( m_eqControls.m_para1FreqModel.value()
- ( m_eqControls.m_para1FreqModel.value() * m_eqControls.m_para1BwModel.value() * 0.5 ),
* ( 1 - m_eqControls.m_para1BwModel.value() * 0.5 ),
m_eqControls.m_para1FreqModel.value()
+ ( m_eqControls.m_para1FreqModel.value() * m_eqControls.m_para1BwModel.value() * 0.5 ),
* ( 1 + m_eqControls.m_para1BwModel.value() * 0.5 ),
fft , samplerate );
m_eqControls.m_para2PeakL = m_eqControls.m_para2PeakR =
peakBand( m_eqControls.m_para2FreqModel.value()
- ( m_eqControls.m_para2FreqModel.value() * m_eqControls.m_para2BwModel.value() * 0.5 ),
* ( 1 - m_eqControls.m_para2BwModel.value() * 0.5 ),
m_eqControls.m_para2FreqModel.value()
+ ( m_eqControls.m_para2FreqModel.value() * m_eqControls.m_para2BwModel.value() * 0.5 ),
* ( 1 + m_eqControls.m_para2BwModel.value() * 0.5 ),
fft , samplerate );
m_eqControls.m_para3PeakL = m_eqControls.m_para3PeakR =
peakBand( m_eqControls.m_para3FreqModel.value()
- ( m_eqControls.m_para3FreqModel.value() * m_eqControls.m_para3BwModel.value() * 0.5 ),
* ( 1 - m_eqControls.m_para3BwModel.value() * 0.5 ),
m_eqControls.m_para3FreqModel.value()
+ ( m_eqControls.m_para3FreqModel.value() * m_eqControls.m_para3BwModel.value() * 0.5 ),
* ( 1 + m_eqControls.m_para3BwModel.value() * 0.5 ),
fft , samplerate );
m_eqControls.m_para4PeakL = m_eqControls.m_para4PeakR =
peakBand( m_eqControls.m_para4FreqModel.value()
- ( m_eqControls.m_para4FreqModel.value() * m_eqControls.m_para4BwModel.value() * 0.5 ),
* ( 1 - m_eqControls.m_para4BwModel.value() * 0.5 ),
m_eqControls.m_para4FreqModel.value()
+ ( m_eqControls.m_para4FreqModel.value() * m_eqControls.m_para4BwModel.value() * 0.5 ),
* ( 1 + m_eqControls.m_para4BwModel.value() * 0.5 ),
fft , samplerate );
m_eqControls.m_highShelfPeakL = m_eqControls.m_highShelfPeakR =
peakBand( m_eqControls.m_highShelfFreqModel.value(),
samplerate * 0.5 , fft, samplerate );
m_eqControls.m_highShelfFreqModel.value()
* ( 1 + m_eqControls.m_highShelfResModel.value() * 0.5 ),
fft, samplerate );
}
extern "C"

View File

@@ -33,19 +33,18 @@
#include "TextFloat.h"
class EqFader : public Fader
{
public:
Q_OBJECT
public:
EqFader( FloatModel * model, const QString & name, QWidget * parent, QPixmap * back, QPixmap * leds, QPixmap * knob, float* lPeak, float* rPeak ) :
Fader( model, name, parent, back, leds, knob )
EqFader( FloatModel * model, const QString & name, QWidget * parent, QPixmap * backg, QPixmap * leds, QPixmap * knobpi, float* lPeak, float* rPeak ) :
Fader( model, name, parent, backg, leds, knobpi )
{
setMinimumSize( 23, 116 );
setMaximumSize( 23, 116 );
resize( 23, 116 );
setMinimumSize( 23, 80 );
setMaximumSize( 23, 80 );
resize( 23, 80 );
m_lPeak = lPeak;
m_rPeak = rPeak;
connect( gui->mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( updateVuMeters() ) );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -37,7 +37,7 @@
EqParameterWidget::EqParameterWidget( QWidget *parent, EqControls * controls ) :
QWidget( parent ),
m_displayWidth ( 400 ),
m_displayWidth ( 450 ),
m_displayHeigth ( 200 ),
m_controls ( controls )

View File

@@ -158,7 +158,7 @@ EqSpectrumView::EqSpectrumView(EqAnalyser *b, QWidget *_parent) :
m_analyser( b ),
m_periodicalUpdate( false )
{
setFixedSize( 400, 200 );
setFixedSize( 450, 200 );
connect( gui->mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( periodicalUpdate() ) );
setAttribute( Qt::WA_TranslucentBackground, true );
m_skipBands = MAX_BANDS * 0.5;

BIN
plugins/Eq/artwork.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
plugins/Eq/faderback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

BIN
plugins/Eq/faderknob.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
plugins/Eq/faderleds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 B

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 B

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 918 B

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 967 B

After

Width:  |  Height:  |  Size: 371 B