From b4421700fac3c7248864ec6675a7c93416c14eb0 Mon Sep 17 00:00:00 2001 From: Hannu Haahti Date: Sat, 29 Mar 2014 01:21:44 +0200 Subject: [PATCH] kicker: some cleanup --- plugins/kicker/KickerOsc.h | 2 -- plugins/kicker/kicker.cpp | 23 ++++------------------- plugins/kicker/kicker.h | 3 ++- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/plugins/kicker/KickerOsc.h b/plugins/kicker/KickerOsc.h index fe370c6b5..edcdcf5e5 100644 --- a/plugins/kicker/KickerOsc.h +++ b/plugins/kicker/KickerOsc.h @@ -59,7 +59,6 @@ public: for( fpp_t frame = 0; frame < frames; ++frame ) { 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 ) * ( 1 - m_noise ) ) + ( Oscillator::noiseSample( 0 ) * gain * gain * m_noise ); buf[frame][0] = s * gain; buf[frame][1] = s * gain; @@ -67,7 +66,6 @@ public: m_phase += m_freq / sampleRate; const double change = ( m_counter < m_length ) ? ( ( m_startFreq - m_endFreq ) * ( 1 - fastPow( m_counter / m_length, m_slope ) ) ) : 0; - //~ qDebug( "%f (%f) [%lu, %f]", change, powf( m_counter / m_length, m_slope ), m_counter, m_length ); m_freq = m_endFreq + change; ++m_counter; } diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index feecc34e5..655d41dd1 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -1,7 +1,8 @@ /* - * kicker.cpp - bassdrum-synthesizer + * kicker.cpp - drum synthesizer * * Copyright (c) 2006-2009 Tobias Doerffel + * Copyright (c) 2014 Hannu Haahti * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -44,7 +45,7 @@ Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor = STRINGIFY( PLUGIN_NAME ), "Kicker", QT_TRANSLATE_NOOP( "pluginBrowser", - "Versatile kick- & bassdrum-synthesizer" ), + "Versatile drum synthesizer" ), "Tobias Doerffel ", 0x0100, Plugin::Instrument, @@ -126,7 +127,6 @@ QString kickerInstrument::nodeName() const -//typedef DspEffectLibrary::foldbackDistortion<> DistFX; typedef DspEffectLibrary::Distortion DistFX; typedef KickerOsc > SweepOsc; @@ -156,25 +156,10 @@ void kickerInstrument::playNote( NotePlayHandle * _n, _n->noteOff(); } - //const float freq = instrumentTrack()->frequency( _n ) / 2; - //~ const float fdiff = m_endFreqModel.value() - m_startFreqModel.value(); -/* const fpp_t frames = _n->isReleased() ? - tMax( tMin( desiredReleaseFrames() - - _n->releaseFramesDone(), - engine::mixer()->framesPerAudioBuffer() ), 0 ) - : - engine::mixer()->framesPerAudioBuffer();*/ const fpp_t frames = _n->framesLeftForCurrentPeriod(); - //~ const float slopePoint = powf( fdiff / decfr, 1 + m_slopeModel.value() * 6 ); - - //~ const float f1 = m_startFreqModel.value() + tfp * ((fdiff/decfr) * slopePoint); - //~ const float f2 = m_startFreqModel.value() + (frames+tfp-1) * ((fdiff/decfr) * slopePoint); - - SweepOsc * so = static_cast( _n->m_pluginData ); - so->update( _working_buffer, frames, - engine::mixer()->processingSampleRate() ); + so->update( _working_buffer, frames, engine::mixer()->processingSampleRate() ); if( _n->isReleased() ) { diff --git a/plugins/kicker/kicker.h b/plugins/kicker/kicker.h index ca126c7e6..8253becf8 100644 --- a/plugins/kicker/kicker.h +++ b/plugins/kicker/kicker.h @@ -1,5 +1,6 @@ /* - * kicker.h - bassdrum-synthesizer + * kicker.h - drum synthesizer + * Copyright (c) 2014 Hannu Haahti * * Copyright (c) 2006-2008 Tobias Doerffel *