* made bass-booster HQ-mode-capable

* changed float's in bassbooster-FX to SAMPLE



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@960 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-05-12 13:10:14 +00:00
parent 7598cd7a8e
commit 8cf16971b8
3 changed files with 31 additions and 20 deletions

View File

@@ -1,4 +1,12 @@
2008-05-1 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
2008-05-12 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/bass_booster/bassbooster_controls.cpp:
made bass-booster HQ-mode-capable
* include/effect_lib.h:
changed float's in bassbooster to SAMPLE
2008-05-11 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/sf2_player/sf2_player.cpp:
retrieve resampling-interpolation from current mixer quality settings

View File

@@ -223,9 +223,9 @@ namespace effectLib
class fastBassBoost : public monoBase<SAMPLE>
{
public:
fastBassBoost( const float _frequency,
const float _gain,
const float _ratio,
fastBassBoost( const SAMPLE _frequency,
const SAMPLE _gain,
const SAMPLE _ratio,
const fastBassBoost<SAMPLE> & _orig =
fastBassBoost<SAMPLE>() ) :
m_frequency( tMax<SAMPLE>( _frequency, 10.0 ) ),
@@ -248,18 +248,18 @@ namespace effectLib
m_gain2/* )*/ );
}
void setFrequency( const float _frequency )
void setFrequency( const SAMPLE _frequency )
{
m_frequency = _frequency;
m_gain1 = 1.0 / ( m_frequency + 1.0 );
}
void setGain( const float _gain )
void setGain( const SAMPLE _gain )
{
m_gain2 = _gain;
}
void setRatio( const float _ratio )
void setRatio( const SAMPLE _ratio )
{
m_ratio = _ratio;
}
@@ -270,11 +270,11 @@ namespace effectLib
{
}
float m_frequency;
float m_gain1;
float m_gain2;
float m_ratio;
mutable float m_cap;
SAMPLE m_frequency;
SAMPLE m_gain1;
SAMPLE m_gain2;
SAMPLE m_ratio;
mutable SAMPLE m_cap;
} ;

View File

@@ -36,15 +36,17 @@ bassBoosterControls::bassBoosterControls( bassBoosterEffect * _eff ) :
m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this ),
m_ratioModel( 2.0f, 0.1f, 10.0f, 0.1f, this )
{
connect( &m_freqModel, SIGNAL( dataChanged( void ) ),
this, SLOT( changeFrequency( void ) ) );
connect( &m_freqModel, SIGNAL( dataChanged() ),
this, SLOT( changeFrequency() ) );
connect( &m_gainModel, SIGNAL( dataChanged( void ) ),
this, SLOT( changeGain( void ) ) );
connect( &m_gainModel, SIGNAL( dataChanged() ),
this, SLOT( changeGain() ) );
connect( &m_ratioModel, SIGNAL( dataChanged( void ) ),
this, SLOT( changeRatio( void ) ) );
connect( &m_ratioModel, SIGNAL( dataChanged() ),
this, SLOT( changeRatio() ) );
connect( engine::getMixer(), SIGNAL( sampleRateChanged() ),
this, SLOT( changeFrequency() ) );
changeFrequency();
changeGain();
changeRatio();
@@ -55,8 +57,9 @@ bassBoosterControls::bassBoosterControls( bassBoosterEffect * _eff ) :
void bassBoosterControls::changeFrequency( void )
{
m_effect->m_bbFX.leftFX().setFrequency( m_freqModel.value() );
m_effect->m_bbFX.rightFX().setFrequency( m_freqModel.value() );
const sample_t fac = engine::getMixer()->processingSampleRate() / 44100;
m_effect->m_bbFX.leftFX().setFrequency( m_freqModel.value() * fac );
m_effect->m_bbFX.rightFX().setFrequency( m_freqModel.value() * fac );
}