From 64aa78c4f6f84c25a4d5abf2453f5997551e9d9c Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 18 Dec 2006 00:29:17 +0000 Subject: [PATCH] added bassbooster-effect and effect-lib git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@439 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 19 ++ TODO | 3 +- configure.in | 5 +- include/effect_lib.h | 165 ++++++++++++++++++ plugins/Makefile.am | 2 +- plugins/bass_booster/Makefile.am | 36 ++++ plugins/bass_booster/bass_booster.cpp | 123 +++++++++++++ plugins/bass_booster/bass_booster.h | 67 +++++++ .../bassbooster_control_dialog.cpp | 140 +++++++++++++++ .../bass_booster/bassbooster_control_dialog.h | 73 ++++++++ plugins/bass_booster/logo.png | Bin 0 -> 3280 bytes src/core/effect_select_dialog.cpp | 19 +- src/widgets/rack_plugin.cpp | 2 +- 13 files changed, 644 insertions(+), 10 deletions(-) create mode 100644 include/effect_lib.h create mode 100644 plugins/bass_booster/Makefile.am create mode 100644 plugins/bass_booster/bass_booster.cpp create mode 100644 plugins/bass_booster/bass_booster.h create mode 100644 plugins/bass_booster/bassbooster_control_dialog.cpp create mode 100644 plugins/bass_booster/bassbooster_control_dialog.h create mode 100644 plugins/bass_booster/logo.png diff --git a/ChangeLog b/ChangeLog index 011ae76c1..ed48b9dcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2006-12-17 Tobias Doerffel + + * plugins/bass_booster/bassboster_control_dialog.cpp: + * plugins/bass_booster/bassboster_control_dialog.h: + * plugins/bass_booster/bass_boster.h: + * plugins/bass_booster/bass_boster.cpp: + * plugins/bass_booster/Makefile.am: + * plugins/Makefile.am: + * configure.in: + added bassbooster-effect-plugin + + * src/core/effect_select_dialog.cpp: + added support for effects without sub-plugin-support and fixed some + potential crashs + + * include/effect_lib.h: + added simple but powerful template-based effect-library with currently + two basic effects + 2006-12-11 Javier Serrano Polo * include/sample_buffer.h: diff --git a/TODO b/TODO index 5dfca56db..d903281d4 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ -- MIDI over Ethernet-support +- select number of channels in export-project-dialog +- MIDI over Ethernet support - lock m_instrument in instrumentTrack-class for not crashing when using m_instrument in notePlayHandle::supportsParallelizing() while instrument is being deleted or so - try to make vestige-plugin-dlls relative - do song-editor-tempo-connection to vst-plugin inside remoteVSTPlugin diff --git a/configure.in b/configure.in index 315ee31ea..87e51ee08 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.2.1-svn20061211, lmms-devel/at/lists/dot/sf/dot/net) -AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20061211) +AC_INIT(lmms, 0.2.1-svn20061217, lmms-devel/at/lists/dot/sf/dot/net) +AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20061217) AM_CONFIG_HEADER(config.h) @@ -554,6 +554,7 @@ AC_CONFIG_FILES([Makefile data/track_icons/Makefile plugins/Makefile plugins/audio_file_processor/Makefile + plugins/bass_booster/Makefile plugins/bit_invader/Makefile plugins/flp_import/Makefile plugins/ladspa_base/Makefile diff --git a/include/effect_lib.h b/include/effect_lib.h new file mode 100644 index 000000000..4a17f5b26 --- /dev/null +++ b/include/effect_lib.h @@ -0,0 +1,165 @@ +/* + * effect_lib.h - library with simple inline-effects + * + * Copyright (c) 2006 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef _EFFECT_LIB_H +#define _EFFECT_LIB_H + +#include "templates.h" +#include "types.h" + +namespace effectLib +{ + template + class base + { + public: + typedef SAMPLE sampleType; + virtual ~base() + { + } + virtual SAMPLE nextSample( const SAMPLE _in ) const = 0; + } ; + + template + class stereoBase + { + public: + virtual ~stereoBase() + { + } + typedef SAMPLE sampleType; + virtual void nextSample( SAMPLE & _in_left, + SAMPLE & _in_right ) const = 0; + } ; + + template + class monoToStereoAdaptor : public stereoBase + { + public: + typedef typename FX::sampleType sampleType; + + monoToStereoAdaptor( const FX & _mono_fx ) : + m_leftFX( _mono_fx ), + m_rightFX( _mono_fx ) + { + } + + virtual void nextSample( sampleType & _in_left, + sampleType & _in_right ) const + { + _in_left = m_leftFX.nextSample( _in_left ); + _in_right = m_rightFX.nextSample( _in_right ); + } + + private: + FX m_leftFX; + FX m_rightFX; + } ; + + + template + inline SAMPLE saturate( const SAMPLE _x ) + { + return( tMin( tMax( -1.0f, _x ), 1.0f ) ); + } + + + template + class bassBoost : public base + { + public: + bassBoost( const float _selectivity, + const float _gain, + const float _ratio ) : + m_selectivity( _selectivity ), + m_gain1( 1.0f / ( m_selectivity + 1.0f ) ), + m_gain2( _gain ), + m_ratio( _ratio ), + m_cap( 0.0f ) + { + } + + virtual ~bassBoost() + { + } + + virtual SAMPLE nextSample( const SAMPLE _in ) const + { + m_cap = ( _in + m_cap*m_selectivity ) * m_gain1; + return( /*saturate(*/ ( _in + m_cap*m_ratio ) * + m_gain2/* )*/ ); + } + +/* void setSelectivity( const float _selectivity ) + { + m_selectivity = _selectivity; + m_gain1 = 1.0f / ( m_selectivity + 1.0f ); + } + + void setGain( const float _gain ) + { + m_gain2 = _gain; + } + + void setRatio( const float _ratio ) + { + m_ratio = _ratio; + }*/ + + private: + float m_selectivity; + float m_gain1; + float m_gain2; + float m_ratio; + mutable float m_cap; + } ; + + + template + class stereoEnhancer : public stereoBase + { + public: + stereoEnhancer( const float _wide_coeff ) : + m_wideCoeff( _wide_coeff ) + { + } + + virtual void nextSample( SAMPLE & _in_left, + SAMPLE & _in_right ) const + { + const float delta = ( _in_left - + ( _in_left+_in_right ) / 2.0f ) * m_wideCoeff; + _in_left += delta; + _in_right -= delta; + } + + private: + const float m_wideCoeff; + } ; + +} ; + + +#endif diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 19407a2a4..53efb1f88 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -10,5 +10,5 @@ if STK_SUPPORT STK_DIR=stk endif -SUBDIRS = audio_file_processor bit_invader flp_import $(LADSPA_DIRS) midi_import organic plucked_string_synth $(STK_DIR) triple_oscillator $(VST_DIRS) vibed +SUBDIRS = audio_file_processor bass_booster bit_invader flp_import $(LADSPA_DIRS) midi_import organic plucked_string_synth $(STK_DIR) triple_oscillator $(VST_DIRS) vibed diff --git a/plugins/bass_booster/Makefile.am b/plugins/bass_booster/Makefile.am new file mode 100644 index 000000000..3d699aeab --- /dev/null +++ b/plugins/bass_booster/Makefile.am @@ -0,0 +1,36 @@ +AUTOMAKE_OPTIONS = foreign 1.4 + + +INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib + + +AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="bassbooster" + + +%.moc: ./%.h + $(MOC) -o $@ $< + + +MOC_FILES = ./bassbooster_control_dialog.moc + +BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h +EMBEDDED_RESOURCES = $(wildcard *png) + +./embedded_resources.h: $(EMBEDDED_RESOURCES) + $(BIN2RES) $(EMBEDDED_RESOURCES) > $@ + +EXTRA_DIST = $(EMBEDDED_RESOURCES) + + +CLEANFILES = $(MOC_FILES) ./embedded_resources.h + + + +pkglib_LTLIBRARIES= libbassbooster.la + +libbassbooster_la_SOURCES = bass_booster.cpp \ + bass_booster.h \ + bassbooster_control_dialog.cpp \ + bassbooster_control_dialog.h + +$(libbassbooster_la_SOURCES): ./embedded_resources.h diff --git a/plugins/bass_booster/bass_booster.cpp b/plugins/bass_booster/bass_booster.cpp new file mode 100644 index 000000000..91f428963 --- /dev/null +++ b/plugins/bass_booster/bass_booster.cpp @@ -0,0 +1,123 @@ +/* + * bass_booster.cpp - bass-booster-effect-plugin + * + * Copyright (c) 2006 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#include "bass_booster.h" + + +#undef SINGLE_SOURCE_COMPILE +#include "embed.cpp" + + +extern "C" +{ + +plugin::descriptor bassbooster_plugin_descriptor = +{ + STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), + "BassBooster Effect", + QT_TRANSLATE_NOOP( "pluginBrowser", + "plugin for using arbitrary VST-effects " + "inside LMMS." ), + "Tobias Doerffel ", + 0x0100, + plugin::Effect, + new QPixmap( PLUGIN_NAME::getIconPixmap( "logo" ) ), + NULL +} ; + +} + + + +bassBoosterEffect::bassBoosterEffect( effect::constructionData * _cdata ) : + effect( &bassbooster_plugin_descriptor, _cdata ), + m_bbFX( effectLib::bassBoost<>( 70.0f, 1.0f, 2.8f ) ) +{ +} + + + + +bassBoosterEffect::~bassBoosterEffect() +{ +} + + + + +bool FASTCALL bassBoosterEffect::processAudioBuffer( surroundSampleFrame * _buf, + const fpab_t _frames ) +{ + if( isBypassed() || !isRunning () ) + { + return( FALSE ); + } + + double out_sum = 0.0; + for( fpab_t f = 0; f < _frames; ++f ) + { + sample_t s[2] = { _buf[f][0], _buf[f][1] }; + m_bbFX.nextSample( s[0], s[1] ); + for( ch_cnt_t ch = 0; ch < SURROUND_CHANNELS; ++ch ) + { + _buf[f][ch] = getDryLevel() * _buf[f][ch] + + getWetLevel() * + s[ch%DEFAULT_CHANNELS]; + out_sum += _buf[f][ch]*_buf[f][ch]; + } + } + + if( out_sum <= getGate() ) + { + incrementBufferCount(); + if( getBufferCount() > getTimeout() ) + { + stopRunning(); + resetBufferCount(); + } + } + else + { + resetBufferCount(); + } + return( isRunning() ); +} + + + + + +extern "C" +{ + +// neccessary for getting instance out of shared lib +plugin * lmms_plugin_main( void * _data ) +{ + return( new bassBoosterEffect( + static_cast( _data ) ) ); +} + +} + diff --git a/plugins/bass_booster/bass_booster.h b/plugins/bass_booster/bass_booster.h new file mode 100644 index 000000000..e3e91480e --- /dev/null +++ b/plugins/bass_booster/bass_booster.h @@ -0,0 +1,67 @@ +/* + * bass_booster.h - bass-booster-effect-plugin + * + * Copyright (c) 2006 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef _BASS_BOOSTER_H +#define _BASS_BOOSTER_H + + +#include "effect.h" +#include "effect_lib.h" +#include "main_window.h" +#include "bassbooster_control_dialog.h" + + + +class bassBoosterEffect : public effect +{ +public: + bassBoosterEffect( effect::constructionData * _cdata ); + virtual ~bassBoosterEffect(); + virtual bool FASTCALL processAudioBuffer( surroundSampleFrame * _buf, + const fpab_t _frames ); + inline virtual QString nodeName( void ) const + { + return( "bassboostereffect" ); + } + + virtual inline effectControlDialog * createControlDialog( track * ) + { + return( new bassBoosterControlDialog( + eng()->getMainWindow()->workspace(), + this ) ); + } + + +private: + effectLib::monoToStereoAdaptor > m_bbFX; + + friend class bassBoosterControlDialog; +} ; + + + + + +#endif diff --git a/plugins/bass_booster/bassbooster_control_dialog.cpp b/plugins/bass_booster/bassbooster_control_dialog.cpp new file mode 100644 index 000000000..4037dbbe1 --- /dev/null +++ b/plugins/bass_booster/bassbooster_control_dialog.cpp @@ -0,0 +1,140 @@ +/* + * bassbooster_control_dialog.cpp - control-dialog for bassbooster-effect + * + * Copyright (c) 2006 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifdef QT4 + +#include + +#else + +#include + +#endif + +#include "bass_booster.h" +#include "knob.h" + + + +bassBoosterControlDialog::bassBoosterControlDialog( QWidget * _parent, + bassBoosterEffect * _eff ) : + effectControlDialog( _parent, _eff ), + m_effect( _eff ) +{ + QHBoxLayout * l = new QHBoxLayout( this ); + + m_freqKnob = new knob( knobBright_26, this, tr( "Frequency" ), + eng(), NULL ); + m_freqKnob->setRange( 50.0f, 200.0f, 1.0f ); + m_freqKnob->setInitValue( 100.0f ); + m_freqKnob->setLabel( tr( "FREQ" ) ); + m_freqKnob->setHintText( tr( "Frequency:" ) + " ", "Hz" ); + connect( m_freqKnob, SIGNAL( valueChanged( float ) ), + this, SLOT( changeFrequency( float ) ) ); + + m_gainKnob = new knob( knobBright_26, this, tr( "Gain" ), eng(), NULL ); + m_gainKnob->setRange( 0.1f, 5.0f, 0.1f ); + m_gainKnob->setInitValue( 1.0f ); + m_gainKnob->setLabel( tr( "GAIN" ) ); + m_gainKnob->setHintText( tr( "Gain:" ) + " ", "" ); + connect( m_gainKnob, SIGNAL( valueChanged( float ) ), + this, SLOT( changeGain( float ) ) ); + + m_ratioKnob = new knob( knobBright_26, this, tr( "Ratio" ), eng(), + NULL ); + m_ratioKnob->setRange( 0.1f, 10.0f, 0.1f ); + m_ratioKnob->setInitValue( 2.0f ); + m_ratioKnob->setLabel( tr( "RATIO" ) ); + m_ratioKnob->setHintText( tr( "Ratio:" ) + " ", "" ); + connect( m_ratioKnob, SIGNAL( valueChanged( float ) ), + this, SLOT( changeRatio( float ) ) ); + + l->addWidget( m_freqKnob ); + l->addWidget( m_gainKnob ); + l->addWidget( m_ratioKnob ); + + updateEffect(); +} + + + + +void bassBoosterControlDialog::changeFrequency( float ) +{ + updateEffect(); +} + + + + +void bassBoosterControlDialog::changeGain( float ) +{ + updateEffect(); +} + + + + +void bassBoosterControlDialog::changeRatio( float ) +{ + updateEffect(); +} + + + + +void bassBoosterControlDialog::updateEffect( void ) +{ + // TODO: try to preserve effect and just change params + m_effect->m_bbFX = effectLib::bassBoost<>( m_freqKnob->value(), + m_gainKnob->value(), m_ratioKnob->value() ); +} + + + + +void FASTCALL bassBoosterControlDialog::loadSettings( + const QDomElement & _this ) +{ + m_freqKnob->setValue( _this.attribute( "freq" ).toFloat() ); + m_gainKnob->setValue( _this.attribute( "gain" ).toFloat() ); + m_ratioKnob->setValue( _this.attribute( "ratio" ).toFloat() ); +} + + + + +void FASTCALL bassBoosterControlDialog::saveSettings( QDomDocument & _doc, + QDomElement & _this ) +{ + _this.setAttribute( "freq", m_freqKnob->value() ); + _this.setAttribute( "gain", m_gainKnob->value() ); + _this.setAttribute( "ratio", m_ratioKnob->value() ); +} + + + +#include "bassbooster_control_dialog.moc" + diff --git a/plugins/bass_booster/bassbooster_control_dialog.h b/plugins/bass_booster/bassbooster_control_dialog.h new file mode 100644 index 000000000..9f159ff5c --- /dev/null +++ b/plugins/bass_booster/bassbooster_control_dialog.h @@ -0,0 +1,73 @@ +/* + * bassbooster_control_dialog.h - control-dialog for bassbooster-effect + * + * Copyright (c) 2006 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + +#ifndef _BASSBOOSTER_CONTROL_DIALOG_H +#define _BASSBOOSTER_CONTROL_DIALOG_H + +#include "effect_control_dialog.h" + +class knob; +class bassBoosterEffect; + + +class bassBoosterControlDialog : public effectControlDialog +{ + Q_OBJECT +public: + bassBoosterControlDialog( QWidget * _parent, bassBoosterEffect * _eff ); + virtual ~bassBoosterControlDialog() + { + } + + virtual void FASTCALL saveSettings( QDomDocument & _doc, + QDomElement & _parent ); + virtual void FASTCALL loadSettings( const QDomElement & _this ); + inline virtual QString nodeName( void ) const + { + return( "bassboostercontrols" ); + } + + virtual ch_cnt_t getControlCount( void ) + { + return( 3 ); + } + + +private slots: + void changeFrequency( float ); + void changeGain( float ); + void changeRatio( float ); + + +private: + void updateEffect( void ); + + bassBoosterEffect * m_effect; + knob * m_freqKnob; + knob * m_gainKnob; + knob * m_ratioKnob; + +} ; + +#endif diff --git a/plugins/bass_booster/logo.png b/plugins/bass_booster/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6d757a2b04f134e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 @@ effectList::effectList( QWidget * _parent, engine * _engine ) : for( effectKeyList::const_iterator it = m_effectKeys.begin(); it != m_effectKeys.end(); ++it ) { - plugin_names += QString( ( *it ).desc->public_name ) + ": " + - ( *it ).name; + plugin_names += QString( ( *it ).desc->public_name ) + + ( ( ( *it ).desc->sub_plugin_features != NULL ) ? + ": " + ( *it ).name + : + "" ); } m_pluginList = new Q3ListBox( this ); @@ -239,6 +243,7 @@ void effectList::onHighlighted( int _pluginIndex ) { m_currentSelection = m_effectKeys[_pluginIndex]; delete m_descriptionWidget; + m_descriptionWidget = NULL; if( m_currentSelection.desc && m_currentSelection.desc->sub_plugin_features ) { @@ -247,9 +252,13 @@ void effectList::onHighlighted( int _pluginIndex ) createDescriptionWidget( m_descriptionWidgetParent, eng(), m_currentSelection ); } - dynamic_cast( m_descriptionWidgetParent->layout() )-> + if( m_descriptionWidget != NULL ) + { + dynamic_cast( + m_descriptionWidgetParent->layout() )-> addWidget( m_descriptionWidget ); - m_descriptionWidget->show(); + m_descriptionWidget->show(); + } emit( highlighted( m_currentSelection ) ); } diff --git a/src/widgets/rack_plugin.cpp b/src/widgets/rack_plugin.cpp index 78dc70b65..1b266732a 100644 --- a/src/widgets/rack_plugin.cpp +++ b/src/widgets/rack_plugin.cpp @@ -243,7 +243,7 @@ rackPlugin::~rackPlugin() void rackPlugin::editControls( void ) { - if( m_show) + if( m_show ) { m_controlView->show(); m_controlView->raise();