Skip to content

Commit

Permalink
Redesign Crossover Equalizer (#2994)
Browse files Browse the repository at this point in the history
* Redesign Crossover Equalizer

* Make it all pixel perfect
  • Loading branch information
Umcaruje authored Aug 28, 2016
1 parent f91d0e7 commit d2a5c49
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions plugins/CrossoverEQ/CrossoverEQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ bool CrossoverEQEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
}

// run band 1
if( ! mute1 )
if( mute1 )
{
for( int f = 0; f < frames; ++f )
{
Expand All @@ -162,7 +162,7 @@ bool CrossoverEQEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
}

// run band 2
if( ! mute2 )
if( mute2 )
{
for( int f = 0; f < frames; ++f )
{
Expand All @@ -172,7 +172,7 @@ bool CrossoverEQEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
}

// run band 3
if( ! mute3 )
if( mute3 )
{
for( int f = 0; f < frames; ++f )
{
Expand All @@ -182,7 +182,7 @@ bool CrossoverEQEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
}

// run band 4
if( ! mute4 )
if( mute4 )
{
for( int f = 0; f < frames; ++f )
{
Expand Down
24 changes: 12 additions & 12 deletions plugins/CrossoverEQ/CrossoverEQControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
QPalette pal;
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
setPalette( pal );
setFixedSize( 167, 188 );
setFixedSize( 167, 178 );

// knobs
Knob * xover12 = new Knob( knobBright_26, this );
xover12->move( 29, 15 );
xover12->move( 29, 11 );
xover12->setModel( & controls->m_xover12 );
xover12->setLabel( "1/2" );
xover12->setHintText( tr( "Band 1/2 Crossover:" ), " Hz" );

Knob * xover23 = new Knob( knobBright_26, this );
xover23->move( 69, 15 );
xover23->move( 69, 11 );
xover23->setModel( & controls->m_xover23 );
xover23->setLabel( "2/3" );
xover23->setHintText( tr( "Band 2/3 Crossover:" ), " Hz" );

Knob * xover34 = new Knob( knobBright_26, this );
xover34->move( 109, 15 );
xover34->move( 109, 11 );
xover34->setModel( & controls->m_xover34 );
xover34->setLabel( "3/4" );
xover34->setHintText( tr( "Band 3/4 Crossover:" ), " Hz" );
Expand Down Expand Up @@ -93,23 +93,23 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
gain4->setHintText( tr( "Band 4 Gain:" ), " dBV" );

// leds
LedCheckBox * mute1 = new LedCheckBox( "M", this, tr( "Band 1 Mute" ), LedCheckBox::Red );
mute1->move( 11, 158 );
LedCheckBox * mute1 = new LedCheckBox( "", this, tr( "Band 1 Mute" ), LedCheckBox::Green );
mute1->move( 15, 154 );
mute1->setModel( & controls->m_mute1 );
ToolTip::add( mute1, tr( "Mute Band 1" ) );

LedCheckBox * mute2 = new LedCheckBox( "M", this, tr( "Band 2 Mute" ), LedCheckBox::Red );
mute2->move( 51, 158 );
LedCheckBox * mute2 = new LedCheckBox( "", this, tr( "Band 2 Mute" ), LedCheckBox::Green );
mute2->move( 55, 154 );
mute2->setModel( & controls->m_mute2 );
ToolTip::add( mute2, tr( "Mute Band 2" ) );

LedCheckBox * mute3 = new LedCheckBox( "M", this, tr( "Band 3 Mute" ), LedCheckBox::Red );
mute3->move( 91, 158 );
LedCheckBox * mute3 = new LedCheckBox( "", this, tr( "Band 3 Mute" ), LedCheckBox::Green );
mute3->move( 95, 154 );
mute3->setModel( & controls->m_mute3 );
ToolTip::add( mute3, tr( "Mute Band 3" ) );

LedCheckBox * mute4 = new LedCheckBox( "M", this, tr( "Band 4 Mute" ), LedCheckBox::Red );
mute4->move( 131, 158 );
LedCheckBox * mute4 = new LedCheckBox( "", this, tr( "Band 4 Mute" ), LedCheckBox::Green );
mute4->move( 135, 154 );
mute4->setModel( & controls->m_mute4 );
ToolTip::add( mute4, tr( "Mute Band 4" ) );
}
8 changes: 4 additions & 4 deletions plugins/CrossoverEQ/CrossoverEQControls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ CrossoverEQControls::CrossoverEQControls( CrossoverEQEffect * eff ) :
m_gain2( 0.f, -60.f, 30.f, 0.1f, this, "Band 2 Gain" ),
m_gain3( 0.f, -60.f, 30.f, 0.1f, this, "Band 3 Gain" ),
m_gain4( 0.f, -60.f, 30.f, 0.1f, this, "Band 4 Gain" ),
m_mute1( false, this, "Mute Band 1" ),
m_mute2( false, this, "Mute Band 2" ),
m_mute3( false, this, "Mute Band 3" ),
m_mute4( false, this, "Mute Band 4" )
m_mute1( true, this, "Mute Band 1" ),
m_mute2( true, this, "Mute Band 2" ),
m_mute3( true, this, "Mute Band 3" ),
m_mute4( true, this, "Mute Band 4" )
{
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
connect( &m_xover12, SIGNAL( dataChanged() ), this, SLOT( xover12Changed() ) );
Expand Down
Binary file modified plugins/CrossoverEQ/artwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/CrossoverEQ/fader_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/CrossoverEQ/fader_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/CrossoverEQ/fader_knob2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d2a5c49

Please sign in to comment.