kicker: noise improvements, decay -> length

This commit is contained in:
Hannu Haahti
2014-03-28 21:04:22 +02:00
parent f1f6c71aa1
commit 8d987aabd4
2 changed files with 3 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ public:
{
const double gain = ( 1 - fastPow( ( m_counter < m_length ) ? m_counter / m_length : 1, m_env ) );
//~ qDebug( "%f", gain );
const sample_t s = Oscillator::sinSample( m_phase ) + ( Oscillator::noiseSample( 0 ) * gain * gain * m_noise );
const sample_t s = ( Oscillator::sinSample( m_phase ) * ( 1 - m_noise ) ) + ( Oscillator::noiseSample( 0 ) * gain * gain * m_noise );
buf[frame][0] = s * gain;
buf[frame][1] = s * gain;
m_FX.nextSample( buf[frame][0], buf[frame][1] );

View File

@@ -60,7 +60,7 @@ kickerInstrument::kickerInstrument( InstrumentTrack * _instrument_track ) :
Instrument( _instrument_track, &kicker_plugin_descriptor ),
m_startFreqModel( 150.0f, 5.0f, 1000.0f, 1.0f, this, tr( "Start frequency" ) ),
m_endFreqModel( 40.0f, 5.0f, 1000.0f, 1.0f, this, tr( "End frequency" ) ),
m_decayModel( 440.0f, 5.0f, 2000.0f, 1.0f, this, tr( "Decay" ) ),
m_decayModel( 440.0f, 5.0f, 2000.0f, 1.0f, this, tr( "Length" ) ),
m_distModel( 0.8f, 0.0f, 100.0f, 0.1f, this, tr( "Distortion" ) ),
m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ),
m_envModel( 0.163f, 0.01f, 1.0f, 0.001f, this, tr( "Env" ) ),
@@ -139,7 +139,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n,
m_gainModel.value() ),
m_startFreqModel.value(),
m_endFreqModel.value(),
m_noiseModel.value(),
m_noiseModel.value() * m_noiseModel.value(),
m_clickModel.value() * 0.25f,
m_slopeModel.value(),
m_envModel.value(),