diff --git a/plugins/stk/voices/Makefile.am b/plugins/stk/voices/Makefile.am deleted file mode 100644 index 1e547a463..000000000 --- a/plugins/stk/voices/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -SUBDIRS = b3 \ - bandedwg \ - blow_bottle \ - blow_hole \ - bowed \ - brass \ - clarinet \ - flute \ - fmvoices \ - metal \ - moog \ - percflute \ - resonate \ - rhodey \ - tubebell \ - wurley diff --git a/plugins/stk/voices/b3/Makefile.am b/plugins/stk/voices/b3/Makefile.am deleted file mode 100644 index 14cf364ed..000000000 --- a/plugins/stk/voices/b3/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="b3" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./b3_model.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 = libb3.la - -libb3_la_SOURCES = b3_model.cpp \ - b3_model.h \ - b3_processor.cpp \ - b3_processor.h \ - b3_instrument.cpp \ - b3_instrument.h \ - b3_instrument_view.cpp \ - b3_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libb3_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libb3_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/b3/artwork.png b/plugins/stk/voices/b3/artwork.png deleted file mode 100644 index 712b2c14e..000000000 Binary files a/plugins/stk/voices/b3/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/b3/b3_instrument.cpp b/plugins/stk/voices/b3/b3_instrument.cpp deleted file mode 100644 index 762ee87ac..000000000 --- a/plugins/stk/voices/b3/b3_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "b3_instrument.h" -#include "b3_instrument_view.h" -#include "b3_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor b3_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "B3", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Organ noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -b3Instrument::b3Instrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &b3_plugin_descriptor ) -{ - model()->operator4()->setTrack( _channel_track ); - model()->operator3()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -b3Instrument::~b3Instrument() -{ -} - - - - -QString b3Instrument::nodeName( void ) const -{ - return( b3_plugin_descriptor.name ); -} - - - - -pluginView * b3Instrument::instantiateView( QWidget * _parent ) -{ - return( new b3InstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new b3Instrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/b3/b3_instrument.h b/plugins/stk/voices/b3/b3_instrument.h deleted file mode 100644 index 405f699e4..000000000 --- a/plugins/stk/voices/b3/b3_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _B3_INSTRUMENT_H -#define _B3_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "b3_processor.h" -#include "b3_model.h" - - -class b3Instrument : public stkInstrument -{ -public: - b3Instrument( instrumentTrack * _channel_track ); - virtual ~b3Instrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/b3/b3_instrument_view.cpp b/plugins/stk/voices/b3/b3_instrument_view.cpp deleted file mode 100644 index 459bafab4..000000000 --- a/plugins/stk/voices/b3/b3_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "b3_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -b3InstrumentView::b3InstrumentView( b3Instrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_operator4 = new knob( knobSmall_17, m_topView, tr( "Operator 4" ) ); - m_operator4->setLabel( tr( "Operator 4" ) ); - m_operator4->setHintText( tr( "Operator 4:" ) + " ", "" ); - - m_operator3 = new knob( knobSmall_17, m_topView, tr( "Operator 3" ) ); - m_operator3->setLabel( tr( "Operator 3" ) ); - m_operator3->setHintText( tr( "Operator 3:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_operator4 ); - h1->addWidget( m_operator3 ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -b3InstrumentView::~b3InstrumentView() -{ -} - - - - -void b3InstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - b3Instrument * inst = castModel(); - m_operator4->setModel( inst->model()->operator4() ); - m_operator3->setModel( inst->model()->operator3() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/b3/b3_instrument_view.h b/plugins/stk/voices/b3/b3_instrument_view.h deleted file mode 100644 index 4757163bc..000000000 --- a/plugins/stk/voices/b3/b3_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _B3_INSTRUMENT_VIEW_H -#define _B3_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "b3_instrument.h" - - -class b3InstrumentView: public stkInstrumentView -{ -public: - b3InstrumentView( b3Instrument * _instrument, QWidget * _parent ); - virtual ~b3InstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_operator4; - knob * m_operator3; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/b3/b3_model.cpp b/plugins/stk/voices/b3/b3_model.cpp deleted file mode 100644 index 416d8e03e..000000000 --- a/plugins/stk/voices/b3/b3_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "b3_model.h" - - -b3Model::b3Model( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _operator4, - StkFloat _operator3, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_operator4( new floatModel( _operator4, 0.0f, 128.0f, 0.1f, this ) ), - m_operator3( new floatModel( _operator3, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -b3Model::~b3Model() -{ - delete m_operator4; - delete m_operator3; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void b3Model::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_operator4->saveSettings( _doc, _parent, "operator4" ); - m_operator3->saveSettings( _doc, _parent, "operator3" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void b3Model::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_operator4->loadSettings( _this, "operator4" ); - m_operator3->loadSettings( _this, "operator3" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/b3/b3_model.h b/plugins/stk/voices/b3/b3_model.h deleted file mode 100644 index 5dcad0e5a..000000000 --- a/plugins/stk/voices/b3/b3_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _B3_MODEL_H -#define _B3_MODEL_H - -#include "stk_model.h" - - -class b3Model: public stkModel -{ -public: - b3Model( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _operator4 = 64.0f, - StkFloat _operator3 = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~b3Model(); - - inline floatModel * operator4( void ) const - { - return( m_operator4 ); - } - - inline floatModel * operator3( void ) const - { - return( m_operator3 ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - virtual void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_operator4; - floatModel * m_operator3; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/b3/b3_processor.cpp b/plugins/stk/voices/b3/b3_processor.cpp deleted file mode 100644 index e05ff7eb7..000000000 --- a/plugins/stk/voices/b3/b3_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "b3_processor.h" -#include "config_mgr.h" - - -b3Processor::b3Processor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -b3Processor::~b3Processor() -{ -} - - - - -void b3Processor::setControls( b3Model * _model ) -{ - voice()->controlChange( 2, _model->operator4()->value() ); - voice()->controlChange( 4, _model->operator3()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/b3/b3_processor.h b/plugins/stk/voices/b3/b3_processor.h deleted file mode 100644 index df225bc7f..000000000 --- a/plugins/stk/voices/b3/b3_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _B3_PROCESSOR_H -#define _B3_PROCESSOR_H - -#include "BeeThree.h" - -#include "stk_processor.h" - -#include "b3_model.h" - -class b3Processor: public stkProcessor -{ -public: - b3Processor( sample_rate_t _sample_rate ); - ~b3Processor( void ); - - void setControls( b3Model * _model ); -}; - -#endif diff --git a/plugins/stk/voices/b3/logo.png b/plugins/stk/voices/b3/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/b3/logo.png and /dev/null differ diff --git a/plugins/stk/voices/bandedwg/Makefile.am b/plugins/stk/voices/bandedwg/Makefile.am deleted file mode 100644 index cb8c8e10a..000000000 --- a/plugins/stk/voices/bandedwg/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="bandedwg" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./bandedwg_model.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 = libbandedwg.la - -libbandedwg_la_SOURCES = bandedwg_model.cpp \ - bandedwg_model.h \ - bandedwg_processor.cpp \ - bandedwg_processor.h \ - bandedwg_instrument.cpp \ - bandedwg_instrument.h \ - bandedwg_instrument_view.cpp \ - bandedwg_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libbandedwg_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libbandedwg_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/bandedwg/artwork.png b/plugins/stk/voices/bandedwg/artwork.png deleted file mode 100644 index c3c3fa78a..000000000 Binary files a/plugins/stk/voices/bandedwg/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/bandedwg/bandedwg_instrument.cpp b/plugins/stk/voices/bandedwg/bandedwg_instrument.cpp deleted file mode 100644 index 3463273a4..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_instrument.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "bandedwg_instrument.h" -#include "bandedwg_instrument_view.h" -#include "bandedwg_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor bandedwg_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Banded Wave Guide", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Bowed or struck objects" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -bandedWGInstrument::bandedWGInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &bandedwg_plugin_descriptor ) -{ - model()->bowPressure()->setTrack( _channel_track ); - model()->bowPosition()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); - model()->bowVelocity()->setTrack( _channel_track ); - model()->setStrike()->setTrack( _channel_track ); - model()->sound()->setTrack( _channel_track ); -} - - - - -bandedWGInstrument::~bandedWGInstrument() -{ -} - - - - -QString bandedWGInstrument::nodeName( void ) const -{ - return( bandedwg_plugin_descriptor.name ); -} - - - - -pluginView * bandedWGInstrument::instantiateView( QWidget * _parent ) -{ - return( new bandedWGInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new bandedWGInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/bandedwg/bandedwg_instrument.h b/plugins/stk/voices/bandedwg/bandedwg_instrument.h deleted file mode 100644 index 4befeca2f..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BANDEDWG_INSTRUMENT_H -#define _BANDEDWG_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "bandedwg_processor.h" -#include "bandedwg_model.h" - - -class bandedWGInstrument : public stkInstrument -{ -public: - bandedWGInstrument( instrumentTrack * _channel_track ); - virtual ~bandedWGInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/bandedwg/bandedwg_instrument_view.cpp b/plugins/stk/voices/bandedwg/bandedwg_instrument_view.cpp deleted file mode 100644 index fb231b404..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_instrument_view.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "bandedwg_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -bandedWGInstrumentView::bandedWGInstrumentView( bandedWGInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout; - QHBoxLayout * h2 = new QHBoxLayout; - QHBoxLayout * h3 = new QHBoxLayout; - - m_bowPressure = new knob( knobSmall_17, m_topView, tr( "Pressure" ) ); - m_bowPressure->setLabel( tr( "Bow Pressure" ) ); - m_bowPressure->setHintText( tr( "Pressure:" ) + " ", "" ); - - m_bowPosition = new knob( knobSmall_17, m_topView, tr( "Position" ) ); - m_bowPosition->setLabel( tr( "Bow Position" ) ); - m_bowPosition->setHintText( tr( "Position:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Vib Freq:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "Vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - m_bowVelocity = new knob( knobSmall_17, m_topView, tr( "Bow Vel" ) ); - m_bowVelocity->setLabel( tr( "Bow Velocity" ) ); - m_bowVelocity->setHintText( tr( "Velocity" ) + " ", "" ); - - m_setStrike = new knob( knobSmall_17, m_topView, tr( "Strike" ) ); - m_setStrike->setLabel( tr( "Set Strike" ) ); - m_setStrike->setHintText( tr( "Strike" ) + " ", "" ); - - m_sound = new knob( knobSmall_17, m_topView, tr( "Instrument" ) ); - m_sound->setLabel( tr( "Instrument" ) ); - m_sound->setHintText( tr( "Instrument" ) + " ", "" ); - - h1->addWidget( m_bowPressure ); - h1->addWidget( m_bowPosition ); - - h2->addWidget( m_vibratoFrequency ); - h2->addWidget( m_vibratoGain ); - - h3->addWidget( m_bowVelocity ); - h3->addWidget( m_setStrike ); - h3->addWidget( m_sound ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -bandedWGInstrumentView::~bandedWGInstrumentView() -{ -} - - - - -void bandedWGInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - bandedWGInstrument * inst = castModel(); - m_bowPressure->setModel( inst->model()->bowPressure() ); - m_bowPosition->setModel( inst->model()->bowPosition() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); - m_bowVelocity->setModel( inst->model()->bowVelocity() ); - m_setStrike->setModel( inst->model()->setStrike() ); - m_sound->setModel( inst->model()->sound() ); -} - - - diff --git a/plugins/stk/voices/bandedwg/bandedwg_instrument_view.h b/plugins/stk/voices/bandedwg/bandedwg_instrument_view.h deleted file mode 100644 index f99b86c77..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_instrument_view.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BANDEDWG_INSTRUMENT_VIEW_H -#define _BANDEDWG_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "bandedwg_instrument.h" - - -class bandedWGInstrumentView: public stkInstrumentView -{ -public: - bandedWGInstrumentView( bandedWGInstrument * _instrument, QWidget * _parent ); - virtual ~bandedWGInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_bowPressure; - knob * m_bowPosition; - knob * m_vibratoFrequency; - knob * m_vibratoGain; - knob * m_bowVelocity; - knob * m_setStrike; - knob * m_sound; -}; - -#endif diff --git a/plugins/stk/voices/bandedwg/bandedwg_model.cpp b/plugins/stk/voices/bandedwg/bandedwg_model.cpp deleted file mode 100644 index 0a13f53c8..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_model.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "bandedwg_model.h" - - -bandedWGModel::bandedWGModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _bow_pressure, - StkFloat _bow_position, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain, - StkFloat _bow_velocity, - StkFloat _set_strike, - StkFloat _sound ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_bowPressure( new floatModel( _bow_pressure, 0.0f, 128.0f, 0.1f, this ) ), - m_bowPosition( new floatModel( _bow_position, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_bowVelocity( new floatModel( _bow_velocity, 0.0f, 128.0f, 0.1f, this ) ), - m_setStrike( new floatModel( _set_strike, 0.0f, 128.0f, 0.1f, this ) ), - m_sound( new floatModel( _sound, 0.0f, 3.0f, 1.0f, this ) ) -{ -} - - - - -bandedWGModel::~bandedWGModel() -{ - delete m_bowPressure; - delete m_bowPosition; - delete m_vibratoFrequency; - delete m_vibratoGain; - delete m_bowVelocity; - delete m_setStrike; - delete m_sound; -} - - - - -void bandedWGModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_bowPressure->saveSettings( _doc, _parent, "bowpressure" ); - m_bowPosition->saveSettings( _doc, _parent, "bowgain" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); - m_bowVelocity->saveSettings( _doc, _parent, "bowvelocity" ); - m_setStrike->saveSettings( _doc, _parent, "setstrike" ); - m_sound->saveSettings( _doc, _parent, "sound" ); -} - - - - -void bandedWGModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_bowPressure->loadSettings( _this, "bowpressure" ); - m_bowPosition->loadSettings( _this, "bowposition" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); - m_bowVelocity->loadSettings( _this, "bowvelocity" ); - m_setStrike->loadSettings( _this, "setstrike" ); - m_sound->loadSettings( _this, "sound" ); -} - diff --git a/plugins/stk/voices/bandedwg/bandedwg_model.h b/plugins/stk/voices/bandedwg/bandedwg_model.h deleted file mode 100644 index eab3e1c49..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_model.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BANDEDWG_MODEL_H -#define _BANDEDWG_MODEL_H - -#include "stk_model.h" - - -class bandedWGModel: public stkModel -{ -public: - bandedWGModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _bow_pressure = 64.0f, - StkFloat _bow_position = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f, - StkFloat _bow_velocity = 64.0f, - StkFloat _set_strike = 64.0f, - StkFloat _sound = 0.0f ); - ~bandedWGModel(); - - inline floatModel * bowPressure( void ) const - { - return( m_bowPressure ); - } - - inline floatModel * bowPosition( void ) const - { - return( m_bowPosition ); - } - - inline floatModel * vibratoFrequency( void ) const - { - return( m_vibratoFrequency ); - } - - inline floatModel * vibratoGain( void ) const - { - return( m_vibratoGain ); - } - - inline floatModel * bowVelocity( void ) const - { - return( m_bowVelocity ); - } - - inline floatModel * setStrike( void ) const - { - return( m_setStrike ); - } - - inline floatModel * sound( void ) const - { - return( m_sound ); - } - - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - virtual void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_bowPressure; - floatModel * m_bowPosition; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; - floatModel * m_bowVelocity; - floatModel * m_setStrike; - floatModel * m_sound; -}; - -#endif diff --git a/plugins/stk/voices/bandedwg/bandedwg_processor.cpp b/plugins/stk/voices/bandedwg/bandedwg_processor.cpp deleted file mode 100644 index fef8f88bb..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_processor.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "bandedwg_processor.h" -#include "config_mgr.h" - - -bandedWGProcessor::bandedWGProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -bandedWGProcessor::~bandedWGProcessor() -{ -} - - - - -void bandedWGProcessor::setControls( bandedWGModel * _model ) -{ - voice()->controlChange( 2, _model->bowPressure()->value() ); - voice()->controlChange( 4, _model->bowPosition()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 1, _model->vibratoGain()->value() ); - voice()->controlChange( 128, _model->bowVelocity()->value() ); - voice()->controlChange( 64, _model->setStrike()->value() ); - voice()->controlChange( 16, _model->sound()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/bandedwg/bandedwg_processor.h b/plugins/stk/voices/bandedwg/bandedwg_processor.h deleted file mode 100644 index ed147b53d..000000000 --- a/plugins/stk/voices/bandedwg/bandedwg_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BANDEDWG_PROCESSOR_H -#define _BANDEDWG_PROCESSOR_H - -#include "BandedWG.h" - -#include "stk_processor.h" - -#include "bandedwg_model.h" - -class bandedWGProcessor: public stkProcessor -{ -public: - bandedWGProcessor( sample_rate_t _sample_rate ); - ~bandedWGProcessor( void ); - - void setControls( bandedWGModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/bandedwg/logo.png b/plugins/stk/voices/bandedwg/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/bandedwg/logo.png and /dev/null differ diff --git a/plugins/stk/voices/blow_bottle/Makefile.am b/plugins/stk/voices/blow_bottle/Makefile.am deleted file mode 100644 index 4543314df..000000000 --- a/plugins/stk/voices/blow_bottle/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="blowbottle" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./blow_bottle_model.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 = libblowbottle.la - -libblowbottle_la_SOURCES = blow_bottle_model.cpp \ - blow_bottle_model.h \ - blow_bottle_processor.cpp \ - blow_bottle_processor.h \ - blow_bottle_instrument.cpp \ - blow_bottle_instrument.h \ - blow_bottle_instrument_view.cpp \ - blow_bottle_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libblowbottle_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libblowbottle_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/blow_bottle/artwork.png b/plugins/stk/voices/blow_bottle/artwork.png deleted file mode 100644 index bfdd3dcb3..000000000 Binary files a/plugins/stk/voices/blow_bottle/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_instrument.cpp b/plugins/stk/voices/blow_bottle/blow_bottle_instrument.cpp deleted file mode 100644 index 647adb37c..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_instrument.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * blow_bottle_instrument.cpp - interface to lmms for blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "blow_bottle_instrument.h" -#include "blow_bottle_instrument_view.h" -#include "blow_bottle_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor blowbottle_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Blow Bottle", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Blown bottle noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -blowBottleInstrument::blowBottleInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &blowbottle_plugin_descriptor ) -{ - model()->noiseGain()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); -} - - - - -blowBottleInstrument::~blowBottleInstrument() -{ -} - - - - -QString blowBottleInstrument::nodeName( void ) const -{ - return( blowbottle_plugin_descriptor.name ); -} - - - - -pluginView * blowBottleInstrument::instantiateView( QWidget * _parent ) -{ - return( new blowBottleInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new blowBottleInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_instrument.h b/plugins/stk/voices/blow_bottle/blow_bottle_instrument.h deleted file mode 100644 index 66f6cef02..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_instrument.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * blow_bottle_instrument.h - interface to lmms for blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_BOTTLE_INSTRUMENT_H -#define _BLOW_BOTTLE_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "blow_bottle_processor.h" -#include "blow_bottle_model.h" - - -class blowBottleInstrument : public stkInstrument -{ -public: - blowBottleInstrument( instrumentTrack * _channel_track ); - virtual ~blowBottleInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_instrument_view.cpp b/plugins/stk/voices/blow_bottle/blow_bottle_instrument_view.cpp deleted file mode 100644 index 61fe9a051..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_instrument_view.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * blow_bottle_instrument_view.cpp - gui interface to blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "blow_bottle_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -blowBottleInstrumentView::blowBottleInstrumentView( blowBottleInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - - m_noiseGain = new knob( knobSmall_17, m_topView, tr( "Noise" ) ); - m_noiseGain->setLabel( tr( "Noise Gain" ) ); - m_noiseGain->setHintText( tr( "Noise:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Vib Freq:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "Vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - vl->addWidget( m_noiseGain ); - vl->addWidget( m_vibratoFrequency ); - vl->addWidget( m_vibratoGain ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -blowBottleInstrumentView::~blowBottleInstrumentView() -{ -} - - - - -void blowBottleInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - blowBottleInstrument * inst = castModel(); - m_noiseGain->setModel( inst->model()->noiseGain() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); -} - - - diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_instrument_view.h b/plugins/stk/voices/blow_bottle/blow_bottle_instrument_view.h deleted file mode 100644 index 38e9e8dc3..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_instrument_view.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * blow_bottle_instrument_view.h - gui interface to blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_BOTTLE_INSTRUMENT_VIEW_H -#define _BLOW_BOTTLE_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "blow_bottle_instrument.h" - - -class blowBottleInstrumentView: public stkInstrumentView -{ -public: - blowBottleInstrumentView( blowBottleInstrument * _instrument, QWidget * _parent ); - virtual ~blowBottleInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_noiseGain; - knob * m_vibratoFrequency; - knob * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_model.cpp b/plugins/stk/voices/blow_bottle/blow_bottle_model.cpp deleted file mode 100644 index 7d8739f02..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_model.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * blow_bottle_model.cpp - data storage for blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * 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 "blow_bottle_model.h" - - -blowBottleModel::blowBottleModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _noise_gain, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_noiseGain( new floatModel( _noise_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -blowBottleModel::~blowBottleModel() -{ - delete m_noiseGain; - delete m_vibratoFrequency; - delete m_vibratoGain; -} - - - - -void blowBottleModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_noiseGain->saveSettings( _doc, _parent, "noisegain" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); -} - - - - -void blowBottleModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_noiseGain->loadSettings( _this, "noisegain" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); -} - diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_model.h b/plugins/stk/voices/blow_bottle/blow_bottle_model.h deleted file mode 100644 index 2dee5d91a..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_model.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * blow_bottle_model.h - data storage for blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_BOTTLE_MODEL_H -#define _BLOW_BOTTLE_MODEL_H - -#include "stk_model.h" - - -class blowBottleModel: public stkModel -{ -public: - blowBottleModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _noise_gain = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f ); - ~blowBottleModel(); - - inline floatModel * noiseGain( void ) { return( m_noiseGain ); } - inline floatModel * vibratoFrequency( void ) { return( m_vibratoFrequency ); } - inline floatModel * vibratoGain( void ) { return( m_vibratoGain ); } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_noiseGain; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; - floatModel * m_volume; -}; - -#endif diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_processor.cpp b/plugins/stk/voices/blow_bottle/blow_bottle_processor.cpp deleted file mode 100644 index f65239356..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_processor.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * blow_bottle_processor.cpp - sound generator for blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * 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 "BlowBotl.h" - -#include "blow_bottle_processor.h" -#include "config_mgr.h" - - -blowBottleProcessor::blowBottleProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -blowBottleProcessor::~blowBottleProcessor() -{ -} - - - - -void blowBottleProcessor::setControls( blowBottleModel * _model ) -{ - voice()->controlChange( 1, _model->vibratoGain()->value() ); - voice()->controlChange( 4, _model->noiseGain()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 128, _model->volume()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/blow_bottle/blow_bottle_processor.h b/plugins/stk/voices/blow_bottle/blow_bottle_processor.h deleted file mode 100644 index f94f8539a..000000000 --- a/plugins/stk/voices/blow_bottle/blow_bottle_processor.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * blow_bottle_processor.h - sound generator for blown bottle noises - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_BOTTLE_PROCESSOR_H -#define _BLOW_BOTTLE_PROCESSOR_H - -#include "BlowBotl.h" - -#include "stk_processor.h" - -#include "blow_bottle_model.h" - -class blowBottleProcessor: public stkProcessor -{ -public: - blowBottleProcessor( sample_rate_t _sample_rate ); - ~blowBottleProcessor( void ); - - void setControls( blowBottleModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/blow_bottle/logo.png b/plugins/stk/voices/blow_bottle/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/blow_bottle/logo.png and /dev/null differ diff --git a/plugins/stk/voices/blow_hole/Makefile.am b/plugins/stk/voices/blow_hole/Makefile.am deleted file mode 100644 index d4751fdd4..000000000 --- a/plugins/stk/voices/blow_hole/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="blowhole" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./blow_hole_model.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 = libblowhole.la - -libblowhole_la_SOURCES = blow_hole_model.cpp \ - blow_hole_model.h \ - blow_hole_processor.cpp \ - blow_hole_processor.h \ - blow_hole_instrument.cpp \ - blow_hole_instrument.h \ - blow_hole_instrument_view.cpp \ - blow_hole_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libblowhole_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libblowhole_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/blow_hole/artwork.png b/plugins/stk/voices/blow_hole/artwork.png deleted file mode 100644 index 0192c1d05..000000000 Binary files a/plugins/stk/voices/blow_hole/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/blow_hole/blow_hole_instrument.cpp b/plugins/stk/voices/blow_hole/blow_hole_instrument.cpp deleted file mode 100644 index c04b41864..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "blow_hole_instrument.h" -#include "blow_hole_instrument_view.h" -#include "blow_hole_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor blowhole_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Blow Hole", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Blown tube noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -blowHoleInstrument::blowHoleInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &blowhole_plugin_descriptor ) -{ - model()->reedStiffness()->setTrack( _channel_track ); - model()->noiseGain()->setTrack( _channel_track ); - model()->toneholeState()->setTrack( _channel_track ); - model()->registerState()->setTrack( _channel_track ); - model()->breathPressure()->setTrack( _channel_track ); -} - - - - -blowHoleInstrument::~blowHoleInstrument() -{ -} - - - - -QString blowHoleInstrument::nodeName( void ) const -{ - return( blowhole_plugin_descriptor.name ); -} - - - - -pluginView * blowHoleInstrument::instantiateView( QWidget * _parent ) -{ - return( new blowHoleInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new blowHoleInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/blow_hole/blow_hole_instrument.h b/plugins/stk/voices/blow_hole/blow_hole_instrument.h deleted file mode 100644 index 21ffb7fea..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_HOLE_INSTRUMENT_H -#define _BLOW_HOLE_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "blow_hole_processor.h" -#include "blow_hole_model.h" - - -class blowHoleInstrument : public stkInstrument -{ -public: - blowHoleInstrument( instrumentTrack * _channel_track ); - virtual ~blowHoleInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/blow_hole/blow_hole_instrument_view.cpp b/plugins/stk/voices/blow_hole/blow_hole_instrument_view.cpp deleted file mode 100644 index c1453099d..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "blow_hole_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -blowHoleInstrumentView::blowHoleInstrumentView( blowHoleInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_reedStiffness = new knob( knobSmall_17, m_topView, tr( "Stiffness" ) ); - m_reedStiffness->setLabel( tr( "Reed Stiffness" ) ); - m_reedStiffness->setHintText( tr( "Stiffness:" ) + " ", "" ); - - m_noiseGain = new knob( knobSmall_17, m_topView, tr( "Noise" ) ); - m_noiseGain->setLabel( tr( "Noise Gain" ) ); - m_noiseGain->setHintText( tr( "Noise:" ) + " ", "" ); - - m_toneholeState = new knob( knobSmall_17, m_topView, tr( "Tone Hole" ) ); - m_toneholeState->setLabel( tr( "Tone Hole" ) ); - m_toneholeState->setHintText( tr( "Tone Hole:" ) + " ", "" ); - - m_registerState = new knob( knobSmall_17, m_topView, tr( "Register" ) ); - m_registerState->setLabel( tr( "Register" ) ); - m_registerState->setHintText( tr( "Register:" ) + " ", "" ); - - m_breathPressure = new knob( knobSmall_17, m_topView, tr( "Breath Pres" ) ); - m_breathPressure->setLabel( tr( "Breath Pressure" ) ); - m_breathPressure->setHintText( tr( "Pressure:" ) + " ", "" ); - - h1->addWidget( m_reedStiffness ); - h1->addWidget( m_noiseGain ); - - h2->addWidget( m_toneholeState ); - h2->addWidget( m_registerState ); - - h3->addWidget( m_breathPressure ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -blowHoleInstrumentView::~blowHoleInstrumentView() -{ -} - - - - -void blowHoleInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - blowHoleInstrument * inst = castModel(); - m_reedStiffness->setModel( inst->model()->reedStiffness() ); - m_noiseGain->setModel( inst->model()->noiseGain() ); - m_toneholeState->setModel( inst->model()->toneholeState() ); - m_registerState->setModel( inst->model()->registerState() ); - m_breathPressure->setModel( inst->model()->breathPressure() ); -} - - - diff --git a/plugins/stk/voices/blow_hole/blow_hole_instrument_view.h b/plugins/stk/voices/blow_hole/blow_hole_instrument_view.h deleted file mode 100644 index 7631fe0c2..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_HOLE_INSTRUMENT_VIEW_H -#define _BLOW_HOLE_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "blow_hole_instrument.h" - - -class blowHoleInstrumentView: public stkInstrumentView -{ -public: - blowHoleInstrumentView( blowHoleInstrument * _instrument, QWidget * _parent ); - virtual ~blowHoleInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_reedStiffness; - knob * m_noiseGain; - knob * m_toneholeState; - knob * m_registerState; - knob * m_breathPressure; -}; - -#endif diff --git a/plugins/stk/voices/blow_hole/blow_hole_model.cpp b/plugins/stk/voices/blow_hole/blow_hole_model.cpp deleted file mode 100644 index 644f06361..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "blow_hole_model.h" - - -blowHoleModel::blowHoleModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _reed_stiffness, - StkFloat _noise_gain, - StkFloat _tonehole_state, - StkFloat _register_state, - StkFloat _breath_pressure ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_reedStiffness( new floatModel( _reed_stiffness, 0.0f, 128.0f, 0.1f, this ) ), - m_noiseGain( new floatModel( _noise_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_toneholeState( new floatModel( _tonehole_state, 0.0f, 128.0f, 0.1f, this ) ), - m_registerState( new floatModel( _register_state, 0.0f, 128.0f, 0.1f, this ) ), - m_breathPressure( new floatModel( _breath_pressure, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -blowHoleModel::~blowHoleModel() -{ - delete m_reedStiffness; - delete m_noiseGain; - delete m_toneholeState; - delete m_registerState; - delete m_breathPressure; -} - - - - -void blowHoleModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_reedStiffness->saveSettings( _doc, _parent, "reedstiffness" ); - m_noiseGain->saveSettings( _doc, _parent, "noisegain" ); - m_toneholeState->saveSettings( _doc, _parent, "toneholestate" ); - m_registerState->saveSettings( _doc, _parent, "registerstate" ); - m_breathPressure->saveSettings( _doc, _parent, "breathpressure" ); -} - - - - -void blowHoleModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_reedStiffness->loadSettings( _this, "reedstiffness" ); - m_noiseGain->loadSettings( _this, "noisegain" ); - m_toneholeState->loadSettings( _this, "toneholestate" ); - m_registerState->loadSettings( _this, "registerstate" ); - m_breathPressure->loadSettings( _this, "breathpressure" ); -} - diff --git a/plugins/stk/voices/blow_hole/blow_hole_model.h b/plugins/stk/voices/blow_hole/blow_hole_model.h deleted file mode 100644 index 5d8ec20f0..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_model.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_HOLE_MODEL_H -#define _BLOW_HOLE_MODEL_H - -#include "stk_model.h" - - -class blowHoleModel: public stkModel -{ -public: - blowHoleModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _reed_stiffness = 64.0f, - StkFloat _noise_gain = 64.0f, - StkFloat _tonehole_state = 64.0f, - StkFloat _register_state = 64.0f, - StkFloat _breath_pressure = 64.0f ); - ~blowHoleModel(); - - inline floatModel * reedStiffness( void ) { return( m_reedStiffness ); } - inline floatModel * noiseGain( void ) { return( m_noiseGain ); } - inline floatModel * toneholeState( void ) { return( m_toneholeState ); } - inline floatModel * registerState( void ) { return( m_registerState ); } - inline floatModel * breathPressure( void ) { return( m_breathPressure ); } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_reedStiffness; - floatModel * m_noiseGain; - floatModel * m_toneholeState; - floatModel * m_registerState; - floatModel * m_breathPressure; -}; - -#endif diff --git a/plugins/stk/voices/blow_hole/blow_hole_processor.cpp b/plugins/stk/voices/blow_hole/blow_hole_processor.cpp deleted file mode 100644 index 13ce2fefc..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "blow_hole_processor.h" -#include "config_mgr.h" - - -blowHoleProcessor::blowHoleProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate, 20.0f ) -{ -} - - - - -blowHoleProcessor::~blowHoleProcessor() -{ -} - - - - -void blowHoleProcessor::setControls( blowHoleModel * _model ) -{ - voice()->controlChange( 1, _model->registerState()->value() ); - voice()->controlChange( 2, _model->reedStiffness()->value() ); - voice()->controlChange( 4, _model->noiseGain()->value() ); - voice()->controlChange( 11, _model->toneholeState()->value() ); - voice()->controlChange( 128, _model->breathPressure()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/blow_hole/blow_hole_processor.h b/plugins/stk/voices/blow_hole/blow_hole_processor.h deleted file mode 100644 index 331aeba3c..000000000 --- a/plugins/stk/voices/blow_hole/blow_hole_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BLOW_HOLE_PROCESSOR_H -#define _BLOW_HOLE_PROCESSOR_H - -#include "BlowHole.h" - -#include "stk_processor.h" - -#include "blow_hole_model.h" - -class blowHoleProcessor: public stkProcessor -{ -public: - blowHoleProcessor( sample_rate_t _sample_rate ); - ~blowHoleProcessor( void ); - - void setControls( blowHoleModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/blow_hole/logo.png b/plugins/stk/voices/blow_hole/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/blow_hole/logo.png and /dev/null differ diff --git a/plugins/stk/voices/bowed/Makefile.am b/plugins/stk/voices/bowed/Makefile.am deleted file mode 100644 index 34d2bd52d..000000000 --- a/plugins/stk/voices/bowed/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="bowed" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./bowed_model.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 = libbowed.la - -libbowed_la_SOURCES = bowed_model.cpp \ - bowed_model.h \ - bowed_processor.cpp \ - bowed_processor.h \ - bowed_instrument.cpp \ - bowed_instrument.h \ - bowed_instrument_view.cpp \ - bowed_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libbowed_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libbowed_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/bowed/artwork.png b/plugins/stk/voices/bowed/artwork.png deleted file mode 100644 index 02d4f7084..000000000 Binary files a/plugins/stk/voices/bowed/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/bowed/bowed_instrument.cpp b/plugins/stk/voices/bowed/bowed_instrument.cpp deleted file mode 100644 index f509d463a..000000000 --- a/plugins/stk/voices/bowed/bowed_instrument.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "bowed_instrument.h" -#include "bowed_instrument_view.h" -#include "bowed_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor bowed_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Bowed", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Bowed string" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -bowedInstrument::bowedInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &bowed_plugin_descriptor ) -{ - model()->bowPressure()->setTrack( _channel_track ); - model()->bowPosition()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); -} - - - - -bowedInstrument::~bowedInstrument() -{ -} - - - - -QString bowedInstrument::nodeName( void ) const -{ - return( bowed_plugin_descriptor.name ); -} - - - - -pluginView * bowedInstrument::instantiateView( QWidget * _parent ) -{ - return( new bowedInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new bowedInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/bowed/bowed_instrument.h b/plugins/stk/voices/bowed/bowed_instrument.h deleted file mode 100644 index 82fbb9017..000000000 --- a/plugins/stk/voices/bowed/bowed_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BOWED_INSTRUMENT_H -#define _BOWED_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "bowed_processor.h" -#include "bowed_model.h" - - -class bowedInstrument : public stkInstrument -{ -public: - bowedInstrument( instrumentTrack * _channel_track ); - virtual ~bowedInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/bowed/bowed_instrument_view.cpp b/plugins/stk/voices/bowed/bowed_instrument_view.cpp deleted file mode 100644 index 2493b2571..000000000 --- a/plugins/stk/voices/bowed/bowed_instrument_view.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "bowed_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -bowedInstrumentView::bowedInstrumentView( bowedInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout; - QHBoxLayout * h2 = new QHBoxLayout; - - m_bowPressure = new knob( knobSmall_17, m_topView, tr( "Pressure" ) ); - m_bowPressure->setLabel( tr( "Bow Pressure" ) ); - m_bowPressure->setHintText( tr( "Pressure:" ) + " ", "" ); - - m_bowPosition = new knob( knobSmall_17, m_topView, tr( "Position" ) ); - m_bowPosition->setLabel( tr( "Bow Position" ) ); - m_bowPosition->setHintText( tr( "Position:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Vib Freq:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "Vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - h1->addWidget( m_bowPressure ); - h1->addWidget( m_bowPosition ); - - h2->addWidget( m_vibratoFrequency ); - h2->addWidget( m_vibratoGain ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -bowedInstrumentView::~bowedInstrumentView() -{ -} - - - - -void bowedInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - bowedInstrument * inst = castModel(); - m_bowPressure->setModel( inst->model()->bowPressure() ); - m_bowPosition->setModel( inst->model()->bowPosition() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); -} - - - diff --git a/plugins/stk/voices/bowed/bowed_instrument_view.h b/plugins/stk/voices/bowed/bowed_instrument_view.h deleted file mode 100644 index 20237bf37..000000000 --- a/plugins/stk/voices/bowed/bowed_instrument_view.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BOWED_INSTRUMENT_VIEW_H -#define _BOWED_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "bowed_instrument.h" - - -class bowedInstrumentView: public stkInstrumentView -{ -public: - bowedInstrumentView( bowedInstrument * _instrument, QWidget * _parent ); - virtual ~bowedInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_bowPressure; - knob * m_bowPosition; - knob * m_vibratoFrequency; - knob * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/bowed/bowed_model.cpp b/plugins/stk/voices/bowed/bowed_model.cpp deleted file mode 100644 index 16df264e1..000000000 --- a/plugins/stk/voices/bowed/bowed_model.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "bowed_model.h" - - -bowedModel::bowedModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _bow_pressure, - StkFloat _bow_position, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_bowPressure( new floatModel( _bow_pressure, 0.0f, 128.0f, 0.1f, this ) ), - m_bowPosition( new floatModel( _bow_position, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -bowedModel::~bowedModel() -{ - delete m_bowPressure; - delete m_bowPosition; - delete m_vibratoFrequency; - delete m_vibratoGain; -} - - - - -void bowedModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_bowPressure->saveSettings( _doc, _parent, "bowpressure" ); - m_bowPosition->saveSettings( _doc, _parent, "bowgain" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); -} - - - - -void bowedModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_bowPressure->loadSettings( _this, "bowpressure" ); - m_bowPosition->loadSettings( _this, "bowposition" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); -} - diff --git a/plugins/stk/voices/bowed/bowed_model.h b/plugins/stk/voices/bowed/bowed_model.h deleted file mode 100644 index c04cb5678..000000000 --- a/plugins/stk/voices/bowed/bowed_model.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BOWED_MODEL_H -#define _BOWED_MODEL_H - -#include "stk_model.h" - - -class bowedModel: public stkModel -{ -public: - bowedModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _bow_pressure = 64.0f, - StkFloat _bow_position = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f ); - ~bowedModel(); - - inline floatModel * bowPressure( void ) const - { - return( m_bowPressure ); - } - - inline floatModel * bowPosition( void ) const - { - return( m_bowPosition ); - } - - inline floatModel * vibratoFrequency( void ) const - { - return( m_vibratoFrequency ); - } - - inline floatModel * vibratoGain( void ) const - { - return( m_vibratoGain ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_bowPressure; - floatModel * m_bowPosition; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/bowed/bowed_processor.cpp b/plugins/stk/voices/bowed/bowed_processor.cpp deleted file mode 100644 index ab165c6f9..000000000 --- a/plugins/stk/voices/bowed/bowed_processor.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "bowed_processor.h" -#include "config_mgr.h" - - -bowedProcessor::bowedProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate, 20.0f ) -{ -} - - - - -bowedProcessor::~bowedProcessor() -{ -} - - - - -void bowedProcessor::setControls( bowedModel * _model ) -{ - voice()->controlChange( 2, _model->bowPressure()->value() ); - voice()->controlChange( 4, _model->bowPosition()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 1, _model->vibratoGain()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/bowed/bowed_processor.h b/plugins/stk/voices/bowed/bowed_processor.h deleted file mode 100644 index 6fd34cffa..000000000 --- a/plugins/stk/voices/bowed/bowed_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BOWED_PROCESSOR_H -#define _BOWED_PROCESSOR_H - -#include "Bowed.h" - -#include "stk_processor.h" - -#include "bowed_model.h" - -class bowedProcessor: public stkProcessor -{ -public: - bowedProcessor( sample_rate_t _sample_rate ); - ~bowedProcessor( void ); - - void setControls( bowedModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/bowed/logo.png b/plugins/stk/voices/bowed/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/bowed/logo.png and /dev/null differ diff --git a/plugins/stk/voices/brass/Makefile.am b/plugins/stk/voices/brass/Makefile.am deleted file mode 100644 index f774e101c..000000000 --- a/plugins/stk/voices/brass/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="brass" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./brass_model.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 = libbrass.la - -libbrass_la_SOURCES = brass_model.cpp \ - brass_model.h \ - brass_processor.cpp \ - brass_processor.h \ - brass_instrument.cpp \ - brass_instrument.h \ - brass_instrument_view.cpp \ - brass_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libbrass_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libbrass_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/brass/artwork.png b/plugins/stk/voices/brass/artwork.png deleted file mode 100644 index e28e00b2d..000000000 Binary files a/plugins/stk/voices/brass/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/brass/brass_instrument.cpp b/plugins/stk/voices/brass/brass_instrument.cpp deleted file mode 100644 index 87f52e50c..000000000 --- a/plugins/stk/voices/brass/brass_instrument.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "brass_instrument.h" -#include "brass_instrument_view.h" -#include "brass_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor brass_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Brass", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Brass sounds" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -brassInstrument::brassInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &brass_plugin_descriptor ) -{ - model()->lipTension()->setTrack( _channel_track ); - model()->slideLength()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); -} - - - - -brassInstrument::~brassInstrument() -{ -} - - - - -QString brassInstrument::nodeName( void ) const -{ - return( brass_plugin_descriptor.name ); -} - - - - -pluginView * brassInstrument::instantiateView( QWidget * _parent ) -{ - return( new brassInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new brassInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/brass/brass_instrument.h b/plugins/stk/voices/brass/brass_instrument.h deleted file mode 100644 index 502414798..000000000 --- a/plugins/stk/voices/brass/brass_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BRASS_INSTRUMENT_H -#define _BRASS_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "brass_processor.h" -#include "brass_model.h" - - -class brassInstrument : public stkInstrument -{ -public: - brassInstrument( instrumentTrack * _channel_track ); - virtual ~brassInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/brass/brass_instrument_view.cpp b/plugins/stk/voices/brass/brass_instrument_view.cpp deleted file mode 100644 index 9b303aa97..000000000 --- a/plugins/stk/voices/brass/brass_instrument_view.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "brass_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -brassInstrumentView::brassInstrumentView( brassInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout; - QHBoxLayout * h2 = new QHBoxLayout; - - m_lipTension = new knob( knobSmall_17, m_topView, tr( "Tension" ) ); - m_lipTension->setLabel( tr( "Lip Tension" ) ); - m_lipTension->setHintText( tr( "Tension:" ) + " ", "" ); - - m_slideLength = new knob( knobSmall_17, m_topView, tr( "Length" ) ); - m_slideLength->setLabel( tr( "Slide Length" ) ); - m_slideLength->setHintText( tr( "Length:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Vib Freq:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "Vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - h1->addWidget( m_lipTension ); - h1->addWidget( m_slideLength ); - - h2->addWidget( m_vibratoFrequency ); - h2->addWidget( m_vibratoGain ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -brassInstrumentView::~brassInstrumentView() -{ -} - - - - -void brassInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - brassInstrument * inst = castModel(); - m_lipTension->setModel( inst->model()->lipTension() ); - m_slideLength->setModel( inst->model()->slideLength() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); -} - - - diff --git a/plugins/stk/voices/brass/brass_instrument_view.h b/plugins/stk/voices/brass/brass_instrument_view.h deleted file mode 100644 index e06e5ae9d..000000000 --- a/plugins/stk/voices/brass/brass_instrument_view.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BRASS_INSTRUMENT_VIEW_H -#define _BRASS_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "brass_instrument.h" - - -class brassInstrumentView: public stkInstrumentView -{ -public: - brassInstrumentView( brassInstrument * _instrument, QWidget * _parent ); - virtual ~brassInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_lipTension; - knob * m_slideLength; - knob * m_vibratoFrequency; - knob * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/brass/brass_model.cpp b/plugins/stk/voices/brass/brass_model.cpp deleted file mode 100644 index d5ba16a76..000000000 --- a/plugins/stk/voices/brass/brass_model.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "brass_model.h" - - -brassModel::brassModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _lip_tension, - StkFloat _slide_length, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_lipTension( new floatModel( _lip_tension, 0.0f, 128.0f, 0.1f, this ) ), - m_slideLength( new floatModel( _slide_length, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -brassModel::~brassModel() -{ - delete m_lipTension; - delete m_slideLength; - delete m_vibratoFrequency; - delete m_vibratoGain; -} - - - - -void brassModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_lipTension->saveSettings( _doc, _parent, "liptension" ); - m_slideLength->saveSettings( _doc, _parent, "slidelength" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); -} - - - - -void brassModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_lipTension->loadSettings( _this, "liptension" ); - m_slideLength->loadSettings( _this, "slidelength" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); -} - diff --git a/plugins/stk/voices/brass/brass_model.h b/plugins/stk/voices/brass/brass_model.h deleted file mode 100644 index 9b9bca080..000000000 --- a/plugins/stk/voices/brass/brass_model.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BRASS_MODEL_H -#define _BRASS_MODEL_H - -#include "stk_model.h" - - -class brassModel: public stkModel -{ -public: - brassModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _lip_tension = 64.0f, - StkFloat _slid_position = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f ); - ~brassModel(); - - inline floatModel * lipTension( void ) const - { - return( m_lipTension ); - } - - inline floatModel * slideLength( void ) const - { - return( m_slideLength ); - } - - inline floatModel * vibratoFrequency( void ) const - { - return( m_vibratoFrequency ); - } - - inline floatModel * vibratoGain( void ) const - { - return( m_vibratoGain ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_lipTension; - floatModel * m_slideLength; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/brass/brass_processor.cpp b/plugins/stk/voices/brass/brass_processor.cpp deleted file mode 100644 index 11057adfc..000000000 --- a/plugins/stk/voices/brass/brass_processor.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "brass_processor.h" -#include "config_mgr.h" - - -brassProcessor::brassProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate, 20.0f ) -{ -} - - - - -brassProcessor::~brassProcessor() -{ -} - - - - -void brassProcessor::setControls( brassModel * _model ) -{ - voice()->controlChange( 2, _model->lipTension()->value() ); - voice()->controlChange( 4, _model->slideLength()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 1, _model->vibratoGain()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/brass/brass_processor.h b/plugins/stk/voices/brass/brass_processor.h deleted file mode 100644 index b6c5d2c82..000000000 --- a/plugins/stk/voices/brass/brass_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _BRASS_PROCESSOR_H -#define _BRASS_PROCESSOR_H - -#include "Brass.h" - -#include "stk_processor.h" - -#include "brass_model.h" - -class brassProcessor: public stkProcessor -{ -public: - brassProcessor( sample_rate_t _sample_rate ); - ~brassProcessor( void ); - - void setControls( brassModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/brass/logo.png b/plugins/stk/voices/brass/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/brass/logo.png and /dev/null differ diff --git a/plugins/stk/voices/clarinet/Makefile.am b/plugins/stk/voices/clarinet/Makefile.am deleted file mode 100644 index f84457b67..000000000 --- a/plugins/stk/voices/clarinet/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="clarinet" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./clarinet_model.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 = libclarinet.la - -libclarinet_la_SOURCES = clarinet_model.cpp \ - clarinet_model.h \ - clarinet_processor.cpp \ - clarinet_processor.h \ - clarinet_instrument.cpp \ - clarinet_instrument.h \ - clarinet_instrument_view.cpp \ - clarinet_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libclarinet_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libclarinet_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/clarinet/artwork.png b/plugins/stk/voices/clarinet/artwork.png deleted file mode 100644 index f7c72c65f..000000000 Binary files a/plugins/stk/voices/clarinet/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/clarinet/clarinet_instrument.cpp b/plugins/stk/voices/clarinet/clarinet_instrument.cpp deleted file mode 100644 index 92b30f689..000000000 --- a/plugins/stk/voices/clarinet/clarinet_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "clarinet_instrument.h" -#include "clarinet_instrument_view.h" -#include "clarinet_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor clarinet_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Clarinet", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Clarinet noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -clarinetInstrument::clarinetInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &clarinet_plugin_descriptor ) -{ - model()->reedStiffness()->setTrack( _channel_track ); - model()->noiseGain()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); - model()->breathPressure()->setTrack( _channel_track ); -} - - - - -clarinetInstrument::~clarinetInstrument() -{ -} - - - - -QString clarinetInstrument::nodeName( void ) const -{ - return( clarinet_plugin_descriptor.name ); -} - - - - -pluginView * clarinetInstrument::instantiateView( QWidget * _parent ) -{ - return( new clarinetInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new clarinetInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/clarinet/clarinet_instrument.h b/plugins/stk/voices/clarinet/clarinet_instrument.h deleted file mode 100644 index 73c4b1a32..000000000 --- a/plugins/stk/voices/clarinet/clarinet_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _CLARINET_INSTRUMENT_H -#define _CLARINET_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "clarinet_processor.h" -#include "clarinet_model.h" - - -class clarinetInstrument : public stkInstrument -{ -public: - clarinetInstrument( instrumentTrack * _channel_track ); - virtual ~clarinetInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/clarinet/clarinet_instrument_view.cpp b/plugins/stk/voices/clarinet/clarinet_instrument_view.cpp deleted file mode 100644 index 54a4de7e4..000000000 --- a/plugins/stk/voices/clarinet/clarinet_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "clarinet_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -clarinetInstrumentView::clarinetInstrumentView( clarinetInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_reedStiffness = new knob( knobSmall_17, m_topView, tr( "Stiffness" ) ); - m_reedStiffness->setLabel( tr( "Reed Stiffness" ) ); - m_reedStiffness->setHintText( tr( "Stiffness:" ) + " ", "" ); - - m_noiseGain = new knob( knobSmall_17, m_topView, tr( "Noise" ) ); - m_noiseGain->setLabel( tr( "Noise Gain" ) ); - m_noiseGain->setHintText( tr( "Noise:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Tone Hole:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - m_breathPressure = new knob( knobSmall_17, m_topView, tr( "Breath Pres" ) ); - m_breathPressure->setLabel( tr( "Breath Pressure" ) ); - m_breathPressure->setHintText( tr( "Pressure:" ) + " ", "" ); - - h1->addWidget( m_reedStiffness ); - h1->addWidget( m_noiseGain ); - - h2->addWidget( m_vibratoFrequency ); - h2->addWidget( m_vibratoGain ); - - h3->addWidget( m_breathPressure ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -clarinetInstrumentView::~clarinetInstrumentView() -{ -} - - - - -void clarinetInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - clarinetInstrument * inst = castModel(); - m_reedStiffness->setModel( inst->model()->reedStiffness() ); - m_noiseGain->setModel( inst->model()->noiseGain() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); - m_breathPressure->setModel( inst->model()->breathPressure() ); -} - - - diff --git a/plugins/stk/voices/clarinet/clarinet_instrument_view.h b/plugins/stk/voices/clarinet/clarinet_instrument_view.h deleted file mode 100644 index 046b25536..000000000 --- a/plugins/stk/voices/clarinet/clarinet_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _CLARINET_INSTRUMENT_VIEW_H -#define _CLARINET_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "clarinet_instrument.h" - - -class clarinetInstrumentView: public stkInstrumentView -{ -public: - clarinetInstrumentView( clarinetInstrument * _instrument, QWidget * _parent ); - virtual ~clarinetInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_reedStiffness; - knob * m_noiseGain; - knob * m_vibratoFrequency; - knob * m_vibratoGain; - knob * m_breathPressure; -}; - -#endif diff --git a/plugins/stk/voices/clarinet/clarinet_model.cpp b/plugins/stk/voices/clarinet/clarinet_model.cpp deleted file mode 100644 index f50e44fb7..000000000 --- a/plugins/stk/voices/clarinet/clarinet_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "clarinet_model.h" - - -clarinetModel::clarinetModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _reed_stiffness, - StkFloat _noise_gain, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain, - StkFloat _breath_pressure ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_reedStiffness( new floatModel( _reed_stiffness, 0.0f, 128.0f, 0.1f, this ) ), - m_noiseGain( new floatModel( _noise_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_breathPressure( new floatModel( _breath_pressure, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -clarinetModel::~clarinetModel() -{ - delete m_reedStiffness; - delete m_noiseGain; - delete m_vibratoFrequency; - delete m_vibratoGain; - delete m_breathPressure; -} - - - - -void clarinetModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_reedStiffness->saveSettings( _doc, _parent, "reedstiffness" ); - m_noiseGain->saveSettings( _doc, _parent, "noisegain" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); - m_breathPressure->saveSettings( _doc, _parent, "breathpressure" ); -} - - - - -void clarinetModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_reedStiffness->loadSettings( _this, "reedstiffness" ); - m_noiseGain->loadSettings( _this, "noisegain" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); - m_breathPressure->loadSettings( _this, "breathpressure" ); -} - diff --git a/plugins/stk/voices/clarinet/clarinet_model.h b/plugins/stk/voices/clarinet/clarinet_model.h deleted file mode 100644 index a8698208a..000000000 --- a/plugins/stk/voices/clarinet/clarinet_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _CLARINET_MODEL_H -#define _CLARINET_MODEL_H - -#include "stk_model.h" - - -class clarinetModel: public stkModel -{ -public: - clarinetModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _reed_stiffness = 64.0f, - StkFloat _noise_gain = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f, - StkFloat _breath_pressure = 64.0f ); - ~clarinetModel(); - - inline floatModel * reedStiffness( void ) const - { - return( m_reedStiffness ); - } - - inline floatModel * noiseGain( void ) const - { - return( m_noiseGain ); - } - - inline floatModel * vibratoFrequency( void ) - { - return( m_vibratoFrequency ); - } - - inline floatModel * vibratoGain( void ) const - { - return( m_vibratoGain ); - } - - inline floatModel * breathPressure( void ) const - { - return( m_breathPressure ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_reedStiffness; - floatModel * m_noiseGain; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; - floatModel * m_breathPressure; -}; - -#endif diff --git a/plugins/stk/voices/clarinet/clarinet_processor.cpp b/plugins/stk/voices/clarinet/clarinet_processor.cpp deleted file mode 100644 index 3151e53ee..000000000 --- a/plugins/stk/voices/clarinet/clarinet_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "clarinet_processor.h" -#include "config_mgr.h" - - -clarinetProcessor::clarinetProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate, 20.0f ) -{ -} - - - - -clarinetProcessor::~clarinetProcessor() -{ -} - - - - -void clarinetProcessor::setControls( clarinetModel * _model ) -{ - voice()->controlChange( 2, _model->reedStiffness()->value() ); - voice()->controlChange( 4, _model->noiseGain()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 1, _model->vibratoGain()->value() ); - voice()->controlChange( 128, _model->breathPressure()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/clarinet/clarinet_processor.h b/plugins/stk/voices/clarinet/clarinet_processor.h deleted file mode 100644 index 0a65c35ff..000000000 --- a/plugins/stk/voices/clarinet/clarinet_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _CLARINET_PROCESSOR_H -#define _CLARINET_PROCESSOR_H - -#include "Clarinet.h" - -#include "stk_processor.h" - -#include "clarinet_model.h" - -class clarinetProcessor: public stkProcessor -{ -public: - clarinetProcessor( sample_rate_t _sample_rate ); - ~clarinetProcessor( void ); - - void setControls( clarinetModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/clarinet/logo.png b/plugins/stk/voices/clarinet/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/clarinet/logo.png and /dev/null differ diff --git a/plugins/stk/voices/flute/Makefile.am b/plugins/stk/voices/flute/Makefile.am deleted file mode 100644 index 6fe59d7ab..000000000 --- a/plugins/stk/voices/flute/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="flute" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./flute_model.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 = libflute.la - -libflute_la_SOURCES = flute_model.cpp \ - flute_model.h \ - flute_processor.cpp \ - flute_processor.h \ - flute_instrument.cpp \ - flute_instrument.h \ - flute_instrument_view.cpp \ - flute_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libflute_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libflute_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/flute/artwork.png b/plugins/stk/voices/flute/artwork.png deleted file mode 100644 index d54a42f4b..000000000 Binary files a/plugins/stk/voices/flute/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/flute/flute_instrument.cpp b/plugins/stk/voices/flute/flute_instrument.cpp deleted file mode 100644 index 87a92a6d5..000000000 --- a/plugins/stk/voices/flute/flute_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "flute_instrument.h" -#include "flute_instrument_view.h" -#include "flute_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor flute_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Flute", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Flute noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -fluteInstrument::fluteInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &flute_plugin_descriptor ) -{ - model()->jetDelay()->setTrack( _channel_track ); - model()->noiseGain()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); - model()->breathPressure()->setTrack( _channel_track ); -} - - - - -fluteInstrument::~fluteInstrument() -{ -} - - - - -QString fluteInstrument::nodeName( void ) const -{ - return( flute_plugin_descriptor.name ); -} - - - - -pluginView * fluteInstrument::instantiateView( QWidget * _parent ) -{ - return( new fluteInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new fluteInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/flute/flute_instrument.h b/plugins/stk/voices/flute/flute_instrument.h deleted file mode 100644 index 3715d811f..000000000 --- a/plugins/stk/voices/flute/flute_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FLUTE_INSTRUMENT_H -#define _FLUTE_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "flute_processor.h" -#include "flute_model.h" - - -class fluteInstrument : public stkInstrument -{ -public: - fluteInstrument( instrumentTrack * _channel_track ); - virtual ~fluteInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/flute/flute_instrument_view.cpp b/plugins/stk/voices/flute/flute_instrument_view.cpp deleted file mode 100644 index c91e2ba6e..000000000 --- a/plugins/stk/voices/flute/flute_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "flute_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -fluteInstrumentView::fluteInstrumentView( fluteInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_jetDelay = new knob( knobSmall_17, m_topView, tr( "Jet Delay" ) ); - m_jetDelay->setLabel( tr( "Jet Delay" ) ); - m_jetDelay->setHintText( tr( "Delay:" ) + " ", "" ); - - m_noiseGain = new knob( knobSmall_17, m_topView, tr( "Noise" ) ); - m_noiseGain->setLabel( tr( "Noise Gain" ) ); - m_noiseGain->setHintText( tr( "Noise:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Tone Hole:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - m_breathPressure = new knob( knobSmall_17, m_topView, tr( "Breath Pres" ) ); - m_breathPressure->setLabel( tr( "Breath Pressure" ) ); - m_breathPressure->setHintText( tr( "Pressure:" ) + " ", "" ); - - h1->addWidget( m_jetDelay ); - h1->addWidget( m_noiseGain ); - - h2->addWidget( m_vibratoFrequency ); - h2->addWidget( m_vibratoGain ); - - h3->addWidget( m_breathPressure ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -fluteInstrumentView::~fluteInstrumentView() -{ -} - - - - -void fluteInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - fluteInstrument * inst = castModel(); - m_jetDelay->setModel( inst->model()->jetDelay() ); - m_noiseGain->setModel( inst->model()->noiseGain() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); - m_breathPressure->setModel( inst->model()->breathPressure() ); -} - - - diff --git a/plugins/stk/voices/flute/flute_instrument_view.h b/plugins/stk/voices/flute/flute_instrument_view.h deleted file mode 100644 index 88349df40..000000000 --- a/plugins/stk/voices/flute/flute_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FLUTE_INSTRUMENT_VIEW_H -#define _FLUTE_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "flute_instrument.h" - - -class fluteInstrumentView: public stkInstrumentView -{ -public: - fluteInstrumentView( fluteInstrument * _instrument, QWidget * _parent ); - virtual ~fluteInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_jetDelay; - knob * m_noiseGain; - knob * m_vibratoFrequency; - knob * m_vibratoGain; - knob * m_breathPressure; -}; - -#endif diff --git a/plugins/stk/voices/flute/flute_model.cpp b/plugins/stk/voices/flute/flute_model.cpp deleted file mode 100644 index 40cca4722..000000000 --- a/plugins/stk/voices/flute/flute_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "flute_model.h" - - -fluteModel::fluteModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _jet_delay, - StkFloat _noise_gain, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain, - StkFloat _breath_pressure ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_jetDelay( new floatModel( _jet_delay, 0.0f, 128.0f, 0.1f, this ) ), - m_noiseGain( new floatModel( _noise_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ), - m_breathPressure( new floatModel( _breath_pressure, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -fluteModel::~fluteModel() -{ - delete m_jetDelay; - delete m_noiseGain; - delete m_vibratoFrequency; - delete m_vibratoGain; - delete m_breathPressure; -} - - - - -void fluteModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_jetDelay->saveSettings( _doc, _parent, "reedstiffness" ); - m_noiseGain->saveSettings( _doc, _parent, "noisegain" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); - m_breathPressure->saveSettings( _doc, _parent, "breathpressure" ); -} - - - - -void fluteModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_jetDelay->loadSettings( _this, "reedstiffness" ); - m_noiseGain->loadSettings( _this, "noisegain" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); - m_breathPressure->loadSettings( _this, "breathpressure" ); -} - diff --git a/plugins/stk/voices/flute/flute_model.h b/plugins/stk/voices/flute/flute_model.h deleted file mode 100644 index 810950571..000000000 --- a/plugins/stk/voices/flute/flute_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FLUTE_MODEL_H -#define _FLUTE_MODEL_H - -#include "stk_model.h" - - -class fluteModel: public stkModel -{ -public: - fluteModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _jet_delay = 64.0f, - StkFloat _noise_gain = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f, - StkFloat _breath_pressure = 64.0f ); - ~fluteModel(); - - inline floatModel * jetDelay( void ) const - { - return( m_jetDelay ); - } - - inline floatModel * noiseGain( void ) const - { - return( m_noiseGain ); - } - - inline floatModel * vibratoFrequency( void ) - { - return( m_vibratoFrequency ); - } - - inline floatModel * vibratoGain( void ) const - { - return( m_vibratoGain ); - } - - inline floatModel * breathPressure( void ) const - { - return( m_breathPressure ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_jetDelay; - floatModel * m_noiseGain; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; - floatModel * m_breathPressure; -}; - -#endif diff --git a/plugins/stk/voices/flute/flute_processor.cpp b/plugins/stk/voices/flute/flute_processor.cpp deleted file mode 100644 index 5fb36bcf5..000000000 --- a/plugins/stk/voices/flute/flute_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "flute_processor.h" -#include "config_mgr.h" - - -fluteProcessor::fluteProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate, 20.0f ) -{ -} - - - - -fluteProcessor::~fluteProcessor() -{ -} - - - - -void fluteProcessor::setControls( fluteModel * _model ) -{ - voice()->controlChange( 2, _model->jetDelay()->value() ); - voice()->controlChange( 4, _model->noiseGain()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 1, _model->vibratoGain()->value() ); - voice()->controlChange( 128, _model->breathPressure()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/flute/flute_processor.h b/plugins/stk/voices/flute/flute_processor.h deleted file mode 100644 index b5bcf7266..000000000 --- a/plugins/stk/voices/flute/flute_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FLUTE_PROCESSOR_H -#define _FLUTE_PROCESSOR_H - -#include "Flute.h" - -#include "stk_processor.h" - -#include "flute_model.h" - -class fluteProcessor: public stkProcessor -{ -public: - fluteProcessor( sample_rate_t _sample_rate ); - ~fluteProcessor( void ); - - void setControls( fluteModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/flute/logo.png b/plugins/stk/voices/flute/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/flute/logo.png and /dev/null differ diff --git a/plugins/stk/voices/fmvoices/Makefile.am b/plugins/stk/voices/fmvoices/Makefile.am deleted file mode 100644 index d6c5e130a..000000000 --- a/plugins/stk/voices/fmvoices/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="fmvoices" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./fmvoices_model.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 = libfmvoices.la - -libfmvoices_la_SOURCES = fmvoices_model.cpp \ - fmvoices_model.h \ - fmvoices_processor.cpp \ - fmvoices_processor.h \ - fmvoices_instrument.cpp \ - fmvoices_instrument.h \ - fmvoices_instrument_view.cpp \ - fmvoices_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libfmvoices_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libfmvoices_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/fmvoices/artwork.png b/plugins/stk/voices/fmvoices/artwork.png deleted file mode 100644 index a316fb4bb..000000000 Binary files a/plugins/stk/voices/fmvoices/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/fmvoices/fmvoices_instrument.cpp b/plugins/stk/voices/fmvoices/fmvoices_instrument.cpp deleted file mode 100644 index 734b098e4..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "fmvoices_instrument.h" -#include "fmvoices_instrument_view.h" -#include "fmvoices_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor fmvoices_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "FM Voices", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Voice noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -fmvoicesInstrument::fmvoicesInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &fmvoices_plugin_descriptor ) -{ - model()->vowel()->setTrack( _channel_track ); - model()->spectralTilt()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -fmvoicesInstrument::~fmvoicesInstrument() -{ -} - - - - -QString fmvoicesInstrument::nodeName( void ) const -{ - return( fmvoices_plugin_descriptor.name ); -} - - - - -pluginView * fmvoicesInstrument::instantiateView( QWidget * _parent ) -{ - return( new fmvoicesInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new fmvoicesInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/fmvoices/fmvoices_instrument.h b/plugins/stk/voices/fmvoices/fmvoices_instrument.h deleted file mode 100644 index d24046d06..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FMVOICES_INSTRUMENT_H -#define _FMVOICES_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "fmvoices_processor.h" -#include "fmvoices_model.h" - - -class fmvoicesInstrument : public stkInstrument -{ -public: - fmvoicesInstrument( instrumentTrack * _channel_track ); - virtual ~fmvoicesInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/fmvoices/fmvoices_instrument_view.cpp b/plugins/stk/voices/fmvoices/fmvoices_instrument_view.cpp deleted file mode 100644 index 59808bb9b..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "fmvoices_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -fmvoicesInstrumentView::fmvoicesInstrumentView( fmvoicesInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_vowel = new knob( knobSmall_17, m_topView, tr( "Vowel" ) ); - m_vowel->setLabel( tr( "Vowel" ) ); - m_vowel->setHintText( tr( "Vowel:" ) + " ", "" ); - - m_spectralTilt = new knob( knobSmall_17, m_topView, tr( "Tilt" ) ); - m_spectralTilt->setLabel( tr( "Spectral Tilt" ) ); - m_spectralTilt->setHintText( tr( "Tilt:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_vowel ); - h1->addWidget( m_spectralTilt ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -fmvoicesInstrumentView::~fmvoicesInstrumentView() -{ -} - - - - -void fmvoicesInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - fmvoicesInstrument * inst = castModel(); - m_vowel->setModel( inst->model()->vowel() ); - m_spectralTilt->setModel( inst->model()->spectralTilt() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/fmvoices/fmvoices_instrument_view.h b/plugins/stk/voices/fmvoices/fmvoices_instrument_view.h deleted file mode 100644 index 233e949c6..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FMVOICES_INSTRUMENT_VIEW_H -#define _FMVOICES_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "fmvoices_instrument.h" - - -class fmvoicesInstrumentView: public stkInstrumentView -{ -public: - fmvoicesInstrumentView( fmvoicesInstrument * _instrument, QWidget * _parent ); - virtual ~fmvoicesInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_vowel; - knob * m_spectralTilt; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/fmvoices/fmvoices_model.cpp b/plugins/stk/voices/fmvoices/fmvoices_model.cpp deleted file mode 100644 index ab3adea19..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "fmvoices_model.h" - - -fmvoicesModel::fmvoicesModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _vowel, - StkFloat _spectral_tilt, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_vowel( new floatModel( _vowel, 0.0f, 128.0f, 0.1f, this ) ), - m_spectralTilt( new floatModel( _spectral_tilt, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -fmvoicesModel::~fmvoicesModel() -{ - delete m_vowel; - delete m_spectralTilt; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void fmvoicesModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_vowel->saveSettings( _doc, _parent, "vowel" ); - m_spectralTilt->saveSettings( _doc, _parent, "spectraltilt" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void fmvoicesModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_vowel->loadSettings( _this, "vowel" ); - m_spectralTilt->loadSettings( _this, "spectraltilt" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/fmvoices/fmvoices_model.h b/plugins/stk/voices/fmvoices/fmvoices_model.h deleted file mode 100644 index c99834f36..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FMVOICES_MODEL_H -#define _FMVOICES_MODEL_H - -#include "stk_model.h" - - -class fmvoicesModel: public stkModel -{ -public: - fmvoicesModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _vowel = 64.0f, - StkFloat _spectral_tilt = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~fmvoicesModel(); - - inline floatModel * vowel( void ) const - { - return( m_vowel ); - } - - inline floatModel * spectralTilt( void ) const - { - return( m_spectralTilt ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_vowel; - floatModel * m_spectralTilt; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/fmvoices/fmvoices_processor.cpp b/plugins/stk/voices/fmvoices/fmvoices_processor.cpp deleted file mode 100644 index ee470f736..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "fmvoices_processor.h" -#include "config_mgr.h" - - -fmvoicesProcessor::fmvoicesProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -fmvoicesProcessor::~fmvoicesProcessor() -{ -} - - - - -void fmvoicesProcessor::setControls( fmvoicesModel * _model ) -{ - voice()->controlChange( 2, _model->vowel()->value() ); - voice()->controlChange( 4, _model->spectralTilt()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/fmvoices/fmvoices_processor.h b/plugins/stk/voices/fmvoices/fmvoices_processor.h deleted file mode 100644 index 9c46047f3..000000000 --- a/plugins/stk/voices/fmvoices/fmvoices_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _FMVOICES_PROCESSOR_H -#define _FMVOICES_PROCESSOR_H - -#include "FMVoices.h" - -#include "stk_processor.h" - -#include "fmvoices_model.h" - -class fmvoicesProcessor: public stkProcessor -{ -public: - fmvoicesProcessor( sample_rate_t _sample_rate ); - ~fmvoicesProcessor( void ); - - void setControls( fmvoicesModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/fmvoices/logo.png b/plugins/stk/voices/fmvoices/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/fmvoices/logo.png and /dev/null differ diff --git a/plugins/stk/voices/include/stk_instrument.h b/plugins/stk/voices/include/stk_instrument.h deleted file mode 100644 index a88681947..000000000 --- a/plugins/stk/voices/include/stk_instrument.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * stk_instrument.h - base class for stk interfaces to lmms - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _STK_INSTRUMENT_H -#define _STK_INSTRUMENT_H - -#include "instrument.h" - -#include "stk_voice.h" - - -template -class stkInstrument : public instrument -{ -public: - stkInstrument( instrumentTrack * _channel_track, - const descriptor * _descriptor, - Uint8 _polyphony = 64 ); - virtual ~stkInstrument(); - - void playNote( notePlayHandle * _n, bool _try_parallelizing, sampleFrame * _buf ); - - void deleteNotePluginData( notePlayHandle * _n ); - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - - MODEL * model( void ) const; - - void setMissingFile( bool _state ); - -private: - MODEL * m_model; - - stkVoice * m_voice; - - sampleFrame * m_buffer; - fpp_t m_frames; -}; - - - - -template -stkInstrument::stkInstrument( - instrumentTrack * _channel_track, - const descriptor * _descriptor, - Uint8 _polyphony ): - instrument( _channel_track, _descriptor ), - m_model( new MODEL() ), - m_voice( new stkVoice( _polyphony ) ), - m_buffer( new sampleFrame[engine::getMixer()->framesPerPeriod()] ) -{ - m_model->monophonic()->setTrack( _channel_track ); - m_model->portamento()->setTrack( _channel_track ); - m_model->bend()->setTrack( _channel_track ); - m_model->bendRange()->setTrack( _channel_track ); - m_model->velocitySensitiveLPF()->setTrack( _channel_track ); - m_model->velocitySensitiveQ()->setTrack( _channel_track ); - m_model->volume()->setTrack( _channel_track ); - m_model->pan()->setTrack( _channel_track ); - m_model->releaseTriggered()->setTrack( _channel_track ); - m_model->randomizeAttack()->setTrack( _channel_track ); - m_model->randomizeLength()->setTrack( _channel_track ); - m_model->randomizeVelocityAmount()->setTrack( _channel_track ); - m_model->randomizeFrequencyAmount()->setTrack( _channel_track ); - m_model->spread()->setTrack( _channel_track ); -} - - - - -template -stkInstrument::~stkInstrument() -{ - delete m_voice; - delete m_model; -} - - - - -template -inline void stkInstrument::playNote( - notePlayHandle * _n, - bool _try_parallelizing, - sampleFrame * _buf ) -{ - m_frames = _n->framesLeftForCurrentPeriod(); - - m_voice->playNote( _n, m_model, _buf, m_frames ); - getInstrumentTrack()->processAudioBuffer( _buf, m_frames, _n ); -} - - - - -template -inline void stkInstrument::deleteNotePluginData( - notePlayHandle * _n ) -{ - static_cast( _n->m_pluginData )->setActive( FALSE ); - _n->m_pluginData = NULL; -} - - - - -template -void stkInstrument::saveSettings( - QDomDocument & _doc, - QDomElement & _parent ) -{ - m_model->saveSettings( _doc, _parent ); -} - - - - -template -inline void stkInstrument::loadSettings( - const QDomElement & _this ) -{ - m_model->loadSettings( _this ); -} - - - - -template -inline MODEL * stkInstrument::model( void ) const -{ - return( m_model ); -} - - - - -template -inline void stkInstrument::setMissingFile( bool _state ) -{ - m_voice->setMissingFile( _state ); -} - - -#endif diff --git a/plugins/stk/voices/include/stk_instrument_view.h b/plugins/stk/voices/include/stk_instrument_view.h deleted file mode 100644 index dc161d3d7..000000000 --- a/plugins/stk/voices/include/stk_instrument_view.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * stk_instrument_view.h - base class for stk gui interfaces - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _STK_INSTRUMENT_VIEW_H -#define _STK_INSTRUMENT_VIEW_H - -#include -#include - -#include "config_mgr.h" -#include "instrument_view.h" -#include "led_checkbox.h" -#include "tempo_sync_knob.h" - - -template -class stkInstrumentView: public instrumentView -{ -public: - stkInstrumentView( INSTRUMENT * _instrument, QWidget * _parent ); - virtual ~stkInstrumentView(); - -protected: - virtual void modelChanged( void ); - - QWidget * m_topView; - ledCheckBox * m_monophonic; - tempoSyncKnob * m_portamento; - knob * m_bend; - knob * m_bendRange; - ledCheckBox * m_velocitySensitiveLPF; - knob * m_velocitySensitiveQ; - knob * m_volume; - knob * m_pan; - ledCheckBox * m_releaseTriggered; - ledCheckBox * m_randomizeAttack; - tempoSyncKnob * m_randomizeLength; - knob * m_randomizeVelocityAmount; - knob * m_randomizeFrequencyAmount; - knob * m_spread; -}; - - -template -stkInstrumentView::stkInstrumentView( INSTRUMENT * _instrument, - QWidget * _parent ): - instrumentView( _instrument, _parent ) -{ - bool filesMissing = - !QDir( configManager::inst()->stkDir() ).exists() || - !QFileInfo( configManager::inst()->stkDir() + - QDir::separator() + - "sinewave.raw" ).exists(); - - if( filesMissing ) - { - QMessageBox::information( 0, tr( "Missing files" ), - tr( "Your Stk-installation seems to be " - "incomplete. Please make sure " - "the full Stk-package is installed!" ), - QMessageBox::Ok ); - } - - _instrument->setMissingFile( filesMissing ); - - m_topView = new QWidget( this ); - m_topView->setGeometry( 6, 51, 237, 100 ); - - m_monophonic = new ledCheckBox( tr( "" ), this ); - m_monophonic->move( 115, 206 ); - - m_portamento = new tempoSyncKnob( knobSmall_17, this, - tr( "Portamento" ) ); - m_portamento->setHintText( tr( "Portamento:" ) + " ", "ms" ); - m_portamento->move( 19, 218 ); - - m_bend = new knob( knobSmall_17, this, tr( "Bend" ) ); - m_bend->setHintText( tr( "Bend:" ) + " ", " half steps" ); - m_bend->move( 12, 190 ); - - m_velocitySensitiveLPF = new ledCheckBox( tr( "" ), this ); - m_velocitySensitiveLPF->move( 13, 165 ); - - m_velocitySensitiveQ = new knob( knobSmall_17, this, tr( "Q" ) ); - m_velocitySensitiveQ->setHintText( tr( "Q:" ) + " ", "" ); - m_velocitySensitiveQ->move( 74, 164 ); - - m_bendRange = new knob( knobSmall_17, this, tr( "Range" ) ); - m_bendRange->setHintText( tr( "Range:" ) + " ", - " " + tr( "half steps" ) ); - m_bendRange->move( 55, 190 ); - - m_volume = new knob( knobSmall_17, this, tr( "Volume" ) ); - m_volume->setHintText( tr( "Volume:" ) + " ", "" ); - m_volume->move( 158, 16 ); - - m_pan = new knob( knobSmall_17, this, tr( "Pan" ) ); - m_pan->setHintText( tr( "Pan:" ) + " ", "" ); - m_pan->move( 181, 16 ); - - m_releaseTriggered = new ledCheckBox( tr( "" ), this ); - m_releaseTriggered->move( 115, 222 ); - - m_randomizeAttack = new ledCheckBox( tr( "" ), this ); - m_randomizeAttack->move( 110, 166 ); - - m_randomizeLength = new tempoSyncKnob( knobSmall_17, this, - tr( "Length" ) ); - m_randomizeLength->setHintText( tr( "Length:" ) + " ", "ms" ); - m_randomizeLength->move( 197, 180 ); - - m_randomizeVelocityAmount = new knob( knobSmall_17, this, - tr( "Velocity" ) ); - m_randomizeVelocityAmount->setHintText( tr( "Velocity:" ) + " ", "" ); - m_randomizeVelocityAmount->move( 123, 180 ); - - m_randomizeFrequencyAmount = new knob( knobSmall_17, this, - tr( "Frequency" ) ); - m_randomizeFrequencyAmount->setHintText( tr( "Frequency:" ) + " ", - " " + tr( "half steps" ) ); - m_randomizeFrequencyAmount->move( 158, 180 ); - - m_spread = new knob( knobSmall_17, this, tr( "Spread" ) ); - m_spread->setHintText( tr( "Spread:" ) + " ", "" ); - m_spread->move( 212, 16 ); -} - - - - -template -stkInstrumentView::~stkInstrumentView() -{ -} - - - - -template -void stkInstrumentView::modelChanged() -{ - INSTRUMENT * inst = castModel(); - m_monophonic->setModel( inst->model()->monophonic() ); - m_portamento->setModel( inst->model()->portamento() ); - m_bend->setModel( inst->model()->bend() ); - m_bendRange->setModel( inst->model()->bendRange() ); - m_velocitySensitiveLPF->setModel( inst->model()->velocitySensitiveLPF() ); - m_velocitySensitiveQ->setModel( inst->model()->velocitySensitiveQ() ); - m_volume->setModel( inst->model()->volume() ); - m_pan->setModel( inst->model()->pan() ); - m_releaseTriggered->setModel( inst->model()->releaseTriggered() ); - m_randomizeAttack->setModel( inst->model()->randomizeAttack() ); - m_randomizeLength->setModel( inst->model()->randomizeLength() ); - m_randomizeVelocityAmount->setModel( inst->model()->randomizeVelocityAmount() ); - m_randomizeFrequencyAmount->setModel( inst->model()->randomizeFrequencyAmount() ); - m_spread->setModel( inst->model()->spread() ); -} - - -#endif diff --git a/plugins/stk/voices/include/stk_model.h b/plugins/stk/voices/include/stk_model.h deleted file mode 100644 index 7a67c89a5..000000000 --- a/plugins/stk/voices/include/stk_model.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * stk_model.h - base class for stk instrument models - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _STK_MODEL_H -#define _STK_MODEL_H - -#include "Instrmnt.h" - -#include "automatable_model.h" -#include "basic_filters.h" - - -class stkModel: public model -{ -public: - stkModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - bool _release_triggered = FALSE, - bool _randomize_attack = FALSE, - StkFloat _randomize_length = 0.0f, - StkFloat _randomize_velocity_amount = 0.5f, - StkFloat _randomize_frequency_amount = 0.5f, - StkFloat _spread = 0.0f ); - virtual ~stkModel(); - - // Indicates whether or not the instrument should use multiple voices - // when generating the signal. - inline boolModel * monophonic( void ) const - { - return( m_monophonic ); - } - - // Stores the time in ms over which a note will slide from the previous - // frequency. - inline floatModel * portamento( void ) const - { - return( m_portamento ); - } - - // Stores the pitch bend setting. Scaled by bendRange. - inline floatModel * bend( void ) const - { - return( m_bend ); - } - - // Stores the range in half steps over which a note can be bent. - inline floatModel * bendRange( void ) const - { - return( m_bendRange ); - } - - // Indicates whether or not to apply a low pass filter to the notes - // where the cutoff frequency is scaled by the notes' velocities. - inline boolModel * velocitySensitiveLPF( void ) const - { - return( m_velocitySensitiveLPF ); - } - - // Stores the Q value for the low pass filter. - inline floatModel * velocitySensitiveQ( void ) const - { - return( m_velocitySensitiveQ ); - } - - // Stores the volume setting for the voice. - inline floatModel * volume( void ) const - { - return( m_volume ); - } - - // Stores the pan setting for the voice. - inline floatModel * pan( void ) const - { - return( m_pan ); - } - - // Indicates whether or not only the release portion of the envelope - // should be played. - inline boolModel * releaseTriggered( void ) const - { - return( m_releaseTriggered ); - } - - // Indicates whether or not random offsets should be generated for - // the volume and pitch. The offsets will move linearly to - // zero over the length of time defined by randomizeLength. - inline boolModel * randomizeAttack( void ) const - { - return( m_randomizeAttack ); - } - - // Stores the length of time in ms over which random offsets should - // be applied. - inline floatModel * randomizeLength( void ) const - { - return( m_randomizeLength ); - } - - // Stores the range for the random offset generated for the - // volume of a note. - inline floatModel * randomizeVelocityAmount( void ) const - { - return( m_randomizeVelocityAmount ); - } - - // Stores the range in half steps for the random offset generated - // for the pitch of a note. - inline floatModel * randomizeFrequencyAmount( void ) const - { - return( m_randomizeFrequencyAmount ); - } - - // Sets a delay for the right channel. Provides a quick and dirty - // way to create a stereo spread effect. - inline floatModel * spread( void ) const - { - return( m_spread ); - } - - // Calculates the amount to scale a frequency in order to provide - // a "bend" in a note. - inline float bendScaler() const - { - return( pow( 2.0f, ( m_bendRange->value() * m_bend->value() / - 49152.0f ) ) ); - } - - // Generates a random number between -1.0 and 1.0. - inline float offset( void ) const - { - return( 2.0f * ( static_cast( rand() ) / - static_cast( RAND_MAX ) - 0.5f ) ); - } - - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - -private: - boolModel * m_monophonic; // multiple voice indicator - floatModel * m_portamento; // time for slide between notes - floatModel * m_bend; // bend state of note - floatModel * m_bendRange; // range of bend in half steps - boolModel * m_velocitySensitiveLPF; // turns on a LPF - floatModel * m_velocitySensitiveQ; // Q setting for the LPF - floatModel * m_volume; // volume of the voice - floatModel * m_pan; // pan position of the voice - boolModel * m_releaseTriggered; // only play release - boolModel * m_randomizeAttack; // turns on randomization - floatModel * m_randomizeLength; // time for randomization - floatModel * m_randomizeVelocityAmount; // velocity randomization - floatModel * m_randomizeFrequencyAmount;// pitch randomization - floatModel * m_spread; // stereo width -}; - - - -#endif diff --git a/plugins/stk/voices/include/stk_processor.h b/plugins/stk/voices/include/stk_processor.h deleted file mode 100644 index d9ae72d4f..000000000 --- a/plugins/stk/voices/include/stk_processor.h +++ /dev/null @@ -1,363 +0,0 @@ -/* - * stk_processor.h - base class for stk sound generators - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _STK_PROCESSOR_H -#define _STK_PROCESSOR_H - -#include "Instrmnt.h" - -#include "config_mgr.h" -#include "note_play_handle.h" -#include "types.h" - - -template -class stkProcessor -{ -public: - stkProcessor( sample_rate_t _sample_rate ); - stkProcessor( sample_rate_t _sample_rate, - StkFloat _lowest_frequency ); - virtual ~stkProcessor( void ); - - StkFloat nextSampleLeft( void ); - StkFloat nextSampleRight( void ); - - Instrmnt * voice( void ); - bool active( void ); - float lastFrequency( void ); - notePlayHandle * note( void ); - fpp_t attackFrame( void ); - float deltaVelocity( void ); - float deltaFrequency( void ); - basicFilters<> * velocitySensitiveLPF( void ); - float velocity( void ); - void clearBuffer( void ); - - void setActive( bool _state ); - void setLastFrequency( float _frequency ); - void setNote( notePlayHandle * _note ); - void setAttackFrame( fpp_t _frame ); - void setDeltaVelocity( float _velocity ); - void setDeltaFrequency( float _frequency ); - void setVelocity( float _velocity ); - void noteOn( StkFloat _pitch, StkFloat _velocity ); - -protected: - Uint8 m_delayRead; - Uint8 m_delayWrite; - -private: - Instrmnt * m_voice; - - StkFloat m_delay[256]; - bool m_active; - StkFloat m_sample; - Uint16 m_bufferIndex; - float m_lastFrequency; - float m_velocity; - notePlayHandle * m_note; - fpp_t m_attackFrame; - float m_deltaVelocity; - float m_deltaFrequency; - basicFilters<> * m_velocitySensitiveLPF; -}; - - - - -template - inline stkProcessor::stkProcessor( - sample_rate_t _sample_rate ): - m_delayWrite( 0 ), - m_lastFrequency( 440.0f ) -{ - try - { - Stk::setSampleRate( _sample_rate ); - Stk::setRawwavePath( - configManager::inst()->stkDir().toAscii().constData() ); - - m_voice = new STKVOICE(); - } - catch( ... ) - { - m_voice = NULL; - } - - setActive( FALSE ); - - m_velocitySensitiveLPF = - new basicFilters<>( engine::getMixer()->processingSampleRate() ); - - m_velocitySensitiveLPF->setFilterType( basicFilters<>::LOWPASS ); -} - - - - -template - inline stkProcessor::stkProcessor( - sample_rate_t _sample_rate, - StkFloat _lowest_frequency ): - m_delayWrite( 0 ), - m_lastFrequency( 440.0f ) -{ - try - { - Stk::setSampleRate( _sample_rate ); - Stk::setRawwavePath( - configManager::inst()->stkDir().toAscii().constData() ); - - m_voice = new STKVOICE( _lowest_frequency ); - } - catch( ... ) - { - m_voice = NULL; - } - - setActive( FALSE ); - - m_velocitySensitiveLPF = - new basicFilters<>( engine::getMixer()->processingSampleRate() ); - - m_velocitySensitiveLPF->setFilterType( basicFilters<>::LOWPASS ); -} - - - - -template -inline stkProcessor::~stkProcessor( void ) -{ - m_voice->noteOff( 0.0 ); - delete m_voice; - delete m_velocitySensitiveLPF; -} - - - - -template -inline StkFloat stkProcessor::nextSampleLeft( void ) -{ - if( m_voice == NULL ) - { - return( 0.0f ); - } - else - { - m_sample = m_voice->tick(); - m_delay[m_delayWrite] = m_sample; - m_delayWrite++; - return( m_sample ); - } -} - - - - -template -inline StkFloat stkProcessor::nextSampleRight( void ) -{ - m_sample = m_delay[m_delayRead]; - m_delayRead++; - return( m_sample ); -} - - - - -template -inline Instrmnt * stkProcessor::voice( void ) -{ - return( m_voice ); -} - - - - -template -inline bool stkProcessor::active( void ) -{ - return( m_active ); -} - - - - -template -inline float stkProcessor::lastFrequency( void ) -{ - return( m_lastFrequency ); -} - - - - -template -inline notePlayHandle * stkProcessor::note( void ) -{ - return( m_note ); -} - - - - -template -inline fpp_t stkProcessor::attackFrame( void ) -{ - return( m_attackFrame ); -} - - - - -template -inline float stkProcessor::deltaVelocity( void ) -{ - return( m_deltaVelocity ); -} - - - - -template -inline float stkProcessor::deltaFrequency( void ) -{ - return( m_deltaFrequency ); -} - - - - -template -inline basicFilters<> * stkProcessor::velocitySensitiveLPF( void ) -{ - return( m_velocitySensitiveLPF ); -} - - - - -template -inline float stkProcessor::velocity( void ) -{ - return( m_velocity ); -} - - - - -template -void stkProcessor::setActive( bool _state ) -{ - m_active = _state; - - if( !m_active && m_voice != NULL ) - { - clearBuffer(); - m_voice->noteOff( 0.0f ); - m_note = NULL; - } -} - - - -template -void stkProcessor::setLastFrequency( float _frequency ) -{ - m_lastFrequency = _frequency; -} - - - - -template -void stkProcessor::setNote( notePlayHandle * _note ) -{ - m_note = _note; -} - - - - -template -void stkProcessor::setAttackFrame( fpp_t _frame ) -{ - m_attackFrame = _frame; -} - - - - -template -void stkProcessor::setDeltaVelocity( float _velocity ) -{ - m_deltaVelocity = _velocity; -} - - - - -template -void stkProcessor::setDeltaFrequency( float _frequency ) -{ - m_deltaFrequency = _frequency; -} - - - - -template -void stkProcessor::clearBuffer( void ) -{ - for( m_bufferIndex = 0; m_bufferIndex < 256; m_bufferIndex++ ) - { - m_delay[m_bufferIndex] = 0.0; - } -} - - - - -template -void stkProcessor::noteOn( StkFloat _pitch, - StkFloat _velocity ) -{ - m_voice->noteOn( _pitch, _velocity ); -} - - - - -template -void stkProcessor::setVelocity( float _velocity ) -{ - m_velocity = _velocity; -} - - - -#endif diff --git a/plugins/stk/voices/include/stk_voice.h b/plugins/stk/voices/include/stk_voice.h deleted file mode 100644 index 05d87677f..000000000 --- a/plugins/stk/voices/include/stk_voice.h +++ /dev/null @@ -1,364 +0,0 @@ -/* - * stk_voice.h - base class for stk voices - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _STK_VOICE_H -#define _STK_VOICE_H - -#include "note_play_handle.h" - - -template -class stkVoice -{ -public: - stkVoice( Uint8 _polyphony = 64 ); - virtual ~stkVoice(); - - void playNote( notePlayHandle * _n, MODEL * _model, - sampleFrame * _buffer, const fpp_t _frames ); - - void setMissingFile( bool _state ); - -private: - bool m_filesMissing; - - float m_targetFrequency; - float m_currentFrequency; - float m_lastFrequency; - PROCESSOR * m_processor; - fpp_t m_frame; - sample_t m_leftSample; - sample_t m_rightSample; - Uint8 m_channel; - float m_leftRMS; - float m_rightRMS; - float m_pan; - fpp_t m_totalAttackFrames; - fpp_t m_attackFrame; - float m_deltaVelocity; - float m_deltaFrequency; - float m_attackVelocity; - float m_attackFrequency; - - QVector m_voices; - Uint8 m_voiceIndex; - Uint8 m_polyphony; - - sample_rate_t m_sampleRate; - int m_portamentoFrames; -}; - - -template -stkVoice::stkVoice( Uint8 _polyphony ): - m_lastFrequency( 440.0f ), - m_polyphony( _polyphony ), - m_sampleRate( engine::getMixer()->processingSampleRate() ), - m_portamentoFrames( 0 ) -{ - for( m_voiceIndex = 0; m_voiceIndex < m_polyphony; m_voiceIndex++ ) - { - m_voices.append( new PROCESSOR( m_sampleRate ) ); - } -} - - - - -template -stkVoice::~stkVoice() -{ - for( m_voiceIndex = 0; m_voiceIndex < m_polyphony; m_voiceIndex++ ) - { - delete m_voices[m_voiceIndex]; - } -} - - - -template -void stkVoice::playNote( notePlayHandle * _n, - MODEL * _model, - sampleFrame * _buffer, - const fpp_t _frames ) -{ - // Don't do anything if STK isn't installed properly. - if( m_filesMissing ) - { - return; - } - - // Don't do anything if the instrument is release triggered and we - // haven't released yet. - if( _model->releaseTriggered()->value() && !_n->released() ) - { - return; - } - - // If it's a new note, we need to get a voice. - if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) - { - // Monophonic instruments only use the first defined voice. - if( _model->monophonic()->value() ) - { - if( m_voices[0]->active() && - m_voices[0]->note() != NULL ) - { - m_voices[0]->note()->noteOff( 0 ); - } - m_processor = m_voices[0]; - } - // Otherwise, search for a voice that isn't in use. - else - { - m_processor = NULL; - for( m_voiceIndex = 0; m_voiceIndex < m_polyphony; - m_voiceIndex++ ) - { - if( !m_voices[m_voiceIndex]->active() ) - { - m_processor = m_voices[m_voiceIndex]; - break; - } - } - - // Don't do anything if no voices are available. - if( m_processor == NULL ) - { - return; - } - } - - // Assign the voice and label it as active. - _n->m_pluginData = m_processor; - m_processor->setActive( TRUE ); - - // Initialize the velocity and the number of frames played - // so far. - m_processor->setVelocity( - static_cast( _n->getVolume() ) / - 100.0f ); - m_processor->setAttackFrame( 0 ); - - // Initialize the number of frames for the portamento - // transition. - m_portamentoFrames = static_cast( - engine::getMixer()->processingSampleRate() * - _model->portamento()->value() / - 1000.0f ); - - // If the attack is randomized, calculate the number of frames - // over which the modifications should take place and - // generate a pair of offsets. - if( _model->randomizeAttack()->value() ) - { - m_totalAttackFrames = static_cast( - engine::getMixer()->processingSampleRate() * - _model->randomizeLength()->value() / - 1000.0f ); - - m_attackVelocity = - _model->randomizeVelocityAmount()->value() * - _model->offset(); - if( m_processor->velocity() + m_attackVelocity < 0.0f ) - { - m_attackVelocity = -m_processor->velocity(); - } - if( m_processor->velocity() + - m_attackVelocity > 1.0f ) - { - m_attackVelocity = 1.0f - m_processor->velocity(); - } - - m_processor->setDeltaVelocity( m_attackVelocity ); - - m_attackFrequency = - _model->randomizeFrequencyAmount()->value() * - _model->offset(); - - m_processor->setDeltaFrequency( m_attackFrequency ); - } - else - { - m_totalAttackFrames = 0; - m_processor->setDeltaVelocity( 0.0f ); - m_processor->setDeltaFrequency( 0.0f ); - } - - // If the velocity sensitive filter is turned on, calculate the - // coefficients and clear the taps. The filter cutoff is set - // as: - // cutoff = max_freq * ( 10^velocity ) / 10 - if( _model->velocitySensitiveLPF()->value() ) - { - m_processor->velocitySensitiveLPF()->calcFilterCoeffs( - pow( 10.0f, m_processor->velocity() + - m_processor->deltaVelocity() ) * - engine::getMixer()->processingSampleRate() / 20.0f, - _model->velocitySensitiveQ()->value() ); - m_processor->velocitySensitiveLPF()->clearHistory(); - } - } - - // Used to keep track of the level across the buffer. - m_leftRMS = 0.0f; - m_rightRMS = 0.0f; - - // Get the processing unit assigned to the note. - m_processor = static_cast( _n->m_pluginData ); - - // Initialize the pitch settings. - m_targetFrequency = _n->frequency(); - m_lastFrequency = m_processor->lastFrequency(); - m_currentFrequency = m_lastFrequency; - - m_processor->setControls( _model ); - - // Initialize the attack offset calculation variables. - m_attackVelocity = 0.0f; - m_attackFrequency = 1.0f; - m_attackFrame = m_processor->attackFrame(); - m_deltaVelocity = m_processor->deltaVelocity(); - m_deltaFrequency = m_processor->deltaFrequency(); - - // Generate the buffer. - for( m_frame = 0; m_frame < _frames; ++m_frame ) - { - // Slide across the randomized attack offsets. - // Will be ignored if randomization is turned off because - // both m_attackFrame and m_totalAttackFrames will be - // zero. Just a linear iterpolation. - if( m_attackFrame < m_totalAttackFrames ) - { - m_attackVelocity = m_deltaVelocity - m_deltaVelocity * - m_attackFrame / - m_totalAttackFrames; - - if( m_processor->velocity() + m_attackVelocity < 0.0f ) - { - m_attackVelocity = -m_processor->velocity(); - } - else if( m_processor->velocity() + m_attackVelocity > 1.0f ) - { - m_attackVelocity = 1.0f - m_processor->velocity(); - } - - - m_attackFrequency = m_deltaFrequency - - m_deltaFrequency * - m_attackFrame / - m_totalAttackFrames; - - // Convert m_attackFrequency to a half step based - // scaling factor for the pitch. - m_attackFrequency = pow( 2.0f, m_attackFrequency / - 12.0f ); - - m_attackFrame++; - } - - // If there are any portamento frames to be processed, - // calculate the pitch slide based on whatever the most - // recently used frequency was. - if( m_portamentoFrames > 0 ) - { - m_currentFrequency += ( m_targetFrequency - - m_lastFrequency ) / - static_cast( m_portamentoFrames ); - - // Sliding polyphonic instruments can end up with - // negative frequencies, so stop the slid as long - // as the situation persists. - if( m_currentFrequency < 0.0f ) - { - m_currentFrequency -= - ( m_targetFrequency - m_lastFrequency ) / - static_cast( m_portamentoFrames ); - } - - m_processor->noteOn( m_currentFrequency * - _model->bendScaler(), - m_processor->velocity() + - m_attackVelocity ); - } - else - { - m_processor->noteOn( m_targetFrequency * - _model->bendScaler() * - m_attackFrequency, - m_processor->velocity() + - m_attackVelocity ); - } - - // Calculate the pan level for the right channel. - m_pan = ( 1.0f + _model->pan()->value() ) / 2.0f; - - // Generate the samples. - m_leftSample = m_processor->nextSampleLeft() * - _model->volume()->value() * ( 1.0f - m_pan ); - m_rightSample = m_processor->nextSampleRight() * - _model->volume()->value() * m_pan; - - // Process the velocity sensitive filter. - if( _model->velocitySensitiveLPF()->value() ) - { - m_leftSample = m_processor->velocitySensitiveLPF()->update( m_leftSample, 0 ); - m_rightSample = m_processor->velocitySensitiveLPF()->update( m_rightSample, 1 ); - } - - // Keep track of the levels. - m_leftRMS += m_leftSample * m_leftSample; - m_rightRMS += m_rightSample * m_rightSample; - - // Stuff the samples into the channels. - for( m_channel = 0; m_channel < DEFAULT_CHANNELS / 2; - ++m_channel ) - { - _buffer[m_frame][m_channel * DEFAULT_CHANNELS / 2] = m_leftSample; - _buffer[m_frame][( m_channel + 1 ) * DEFAULT_CHANNELS / 2] = m_rightSample; - } - } - - // Remember the frequency and the number of frames processed. - m_processor->setLastFrequency( m_currentFrequency ); - m_processor->setAttackFrame( m_attackFrame ); - - // Keep track of the portamento frames. - if( m_portamentoFrames > 0 ) - { - m_portamentoFrames -= _frames; - } -} - - - - -template - void stkVoice::setMissingFile( bool _state ) -{ - m_filesMissing = _state; -} - - -#endif diff --git a/plugins/stk/voices/metal/Makefile.am b/plugins/stk/voices/metal/Makefile.am deleted file mode 100644 index 63a340767..000000000 --- a/plugins/stk/voices/metal/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="metal" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./metal_model.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 = libmetal.la - -libmetal_la_SOURCES = metal_model.cpp \ - metal_model.h \ - metal_processor.cpp \ - metal_processor.h \ - metal_instrument.cpp \ - metal_instrument.h \ - metal_instrument_view.cpp \ - metal_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libmetal_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libmetal_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/metal/artwork.png b/plugins/stk/voices/metal/artwork.png deleted file mode 100644 index bd99259ec..000000000 Binary files a/plugins/stk/voices/metal/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/metal/logo.png b/plugins/stk/voices/metal/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/metal/logo.png and /dev/null differ diff --git a/plugins/stk/voices/metal/metal_instrument.cpp b/plugins/stk/voices/metal/metal_instrument.cpp deleted file mode 100644 index a48025b27..000000000 --- a/plugins/stk/voices/metal/metal_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "metal_instrument.h" -#include "metal_instrument_view.h" -#include "metal_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor metal_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Metal", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Buzzy noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -metalInstrument::metalInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &metal_plugin_descriptor ) -{ - model()->index()->setTrack( _channel_track ); - model()->crossfade()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -metalInstrument::~metalInstrument() -{ -} - - - - -QString metalInstrument::nodeName( void ) const -{ - return( metal_plugin_descriptor.name ); -} - - - - -pluginView * metalInstrument::instantiateView( QWidget * _parent ) -{ - return( new metalInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new metalInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/metal/metal_instrument.h b/plugins/stk/voices/metal/metal_instrument.h deleted file mode 100644 index 73b9bcb90..000000000 --- a/plugins/stk/voices/metal/metal_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _METAL_INSTRUMENT_H -#define _METAL_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "metal_processor.h" -#include "metal_model.h" - - -class metalInstrument : public stkInstrument -{ -public: - metalInstrument( instrumentTrack * _channel_track ); - virtual ~metalInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/metal/metal_instrument_view.cpp b/plugins/stk/voices/metal/metal_instrument_view.cpp deleted file mode 100644 index 06ab9fba4..000000000 --- a/plugins/stk/voices/metal/metal_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "metal_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -metalInstrumentView::metalInstrumentView( metalInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_index = new knob( knobSmall_17, m_topView, tr( "Index" ) ); - m_index->setLabel( tr( "Modulator Index" ) ); - m_index->setHintText( tr( "Index:" ) + " ", "" ); - - m_crossfade = new knob( knobSmall_17, m_topView, tr( "Crossfade" ) ); - m_crossfade->setLabel( tr( "Modulator Crossfade" ) ); - m_crossfade->setHintText( tr( "Crossfade:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_index ); - h1->addWidget( m_crossfade ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -metalInstrumentView::~metalInstrumentView() -{ -} - - - - -void metalInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - metalInstrument * inst = castModel(); - m_index->setModel( inst->model()->index() ); - m_crossfade->setModel( inst->model()->crossfade() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/metal/metal_instrument_view.h b/plugins/stk/voices/metal/metal_instrument_view.h deleted file mode 100644 index 751dd1200..000000000 --- a/plugins/stk/voices/metal/metal_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _METAL_INSTRUMENT_VIEW_H -#define _METAL_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "metal_instrument.h" - - -class metalInstrumentView: public stkInstrumentView -{ -public: - metalInstrumentView( metalInstrument * _instrument, QWidget * _parent ); - virtual ~metalInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_index; - knob * m_crossfade; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/metal/metal_model.cpp b/plugins/stk/voices/metal/metal_model.cpp deleted file mode 100644 index 3bbcf712f..000000000 --- a/plugins/stk/voices/metal/metal_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "metal_model.h" - - -metalModel::metalModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _index, - StkFloat _crossfade, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_index( new floatModel( _index, 0.0f, 128.0f, 0.1f, this ) ), - m_crossfade( new floatModel( _crossfade, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -metalModel::~metalModel() -{ - delete m_index; - delete m_crossfade; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void metalModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_index->saveSettings( _doc, _parent, "index" ); - m_crossfade->saveSettings( _doc, _parent, "crossfade" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void metalModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_index->loadSettings( _this, "index" ); - m_crossfade->loadSettings( _this, "crossfade" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/metal/metal_model.h b/plugins/stk/voices/metal/metal_model.h deleted file mode 100644 index db3e3028f..000000000 --- a/plugins/stk/voices/metal/metal_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _METAL_MODEL_H -#define _METAL_MODEL_H - -#include "stk_model.h" - - -class metalModel: public stkModel -{ -public: - metalModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _index = 64.0f, - StkFloat _crossfade = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~metalModel(); - - inline floatModel * index( void ) const - { - return( m_index ); - } - - inline floatModel * crossfade( void ) const - { - return( m_crossfade ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_index; - floatModel * m_crossfade; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/metal/metal_processor.cpp b/plugins/stk/voices/metal/metal_processor.cpp deleted file mode 100644 index 178f4584a..000000000 --- a/plugins/stk/voices/metal/metal_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "metal_processor.h" -#include "config_mgr.h" - - -metalProcessor::metalProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -metalProcessor::~metalProcessor() -{ -} - - - - -void metalProcessor::setControls( metalModel * _model ) -{ - voice()->controlChange( 2, _model->index()->value() ); - voice()->controlChange( 4, _model->crossfade()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/metal/metal_processor.h b/plugins/stk/voices/metal/metal_processor.h deleted file mode 100644 index 07e846283..000000000 --- a/plugins/stk/voices/metal/metal_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _METAL_PROCESSOR_H -#define _METAL_PROCESSOR_H - -#include "HevyMetl.h" - -#include "stk_processor.h" - -#include "metal_model.h" - -class metalProcessor: public stkProcessor -{ -public: - metalProcessor( sample_rate_t _sample_rate ); - ~metalProcessor( void ); - - void setControls( metalModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/moog/Makefile.am b/plugins/stk/voices/moog/Makefile.am deleted file mode 100644 index 634c5b9eb..000000000 --- a/plugins/stk/voices/moog/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="moog" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./moog_model.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 = libmoog.la - -libmoog_la_SOURCES = moog_model.cpp \ - moog_model.h \ - moog_processor.cpp \ - moog_processor.h \ - moog_instrument.cpp \ - moog_instrument.h \ - moog_instrument_view.cpp \ - moog_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libmoog_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libmoog_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/moog/artwork.png b/plugins/stk/voices/moog/artwork.png deleted file mode 100644 index 51be582c4..000000000 Binary files a/plugins/stk/voices/moog/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/moog/logo.png b/plugins/stk/voices/moog/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/moog/logo.png and /dev/null differ diff --git a/plugins/stk/voices/moog/moog_instrument.cpp b/plugins/stk/voices/moog/moog_instrument.cpp deleted file mode 100644 index f707b633d..000000000 --- a/plugins/stk/voices/moog/moog_instrument.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "moog_instrument.h" -#include "moog_instrument_view.h" -#include "moog_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor moog_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Moog", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Moogy sounds" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -moogInstrument::moogInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &moog_plugin_descriptor ) -{ - model()->filterQ()->setTrack( _channel_track ); - model()->filterSweepRate()->setTrack( _channel_track ); - model()->vibratoFrequency()->setTrack( _channel_track ); - model()->vibratoGain()->setTrack( _channel_track ); -} - - - - -moogInstrument::~moogInstrument() -{ -} - - - - -QString moogInstrument::nodeName( void ) const -{ - return( moog_plugin_descriptor.name ); -} - - - - -pluginView * moogInstrument::instantiateView( QWidget * _parent ) -{ - return( new moogInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new moogInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/moog/moog_instrument.h b/plugins/stk/voices/moog/moog_instrument.h deleted file mode 100644 index 4b7ffe876..000000000 --- a/plugins/stk/voices/moog/moog_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _MOOG_INSTRUMENT_H -#define _MOOG_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "moog_processor.h" -#include "moog_model.h" - - -class moogInstrument : public stkInstrument -{ -public: - moogInstrument( instrumentTrack * _channel_track ); - virtual ~moogInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/moog/moog_instrument_view.cpp b/plugins/stk/voices/moog/moog_instrument_view.cpp deleted file mode 100644 index 719f3a55e..000000000 --- a/plugins/stk/voices/moog/moog_instrument_view.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "moog_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -moogInstrumentView::moogInstrumentView( moogInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout; - QHBoxLayout * h2 = new QHBoxLayout; - - m_filterQ = new knob( knobSmall_17, m_topView, tr( "Filter Q" ) ); - m_filterQ->setLabel( tr( "Filter Q" ) ); - m_filterQ->setHintText( tr( "Q:" ) + " ", "" ); - - m_filterSweepRate = new knob( knobSmall_17, m_topView, tr( "Sweep Rate" ) ); - m_filterSweepRate->setLabel( tr( "Sweep Rate" ) ); - m_filterSweepRate->setHintText( tr( "Rate:" ) + " ", "" ); - - m_vibratoFrequency = new knob( knobSmall_17, m_topView, tr( "Vib Freq" ) ); - m_vibratoFrequency->setLabel( tr( "Vibrato Frequency" ) ); - m_vibratoFrequency->setHintText( tr( "Vib Freq:" ) + " ", "" ); - - m_vibratoGain = new knob( knobSmall_17, m_topView, tr( "Vib Gain" ) ); - m_vibratoGain->setLabel( tr( "Vibrato Gain" ) ); - m_vibratoGain->setHintText( tr( "Vib Gain:" ) + " ", "" ); - - h1->addWidget( m_filterQ ); - h1->addWidget( m_filterSweepRate ); - - h2->addWidget( m_vibratoFrequency ); - h2->addWidget( m_vibratoGain ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -moogInstrumentView::~moogInstrumentView() -{ -} - - - - -void moogInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - moogInstrument * inst = castModel(); - m_filterQ->setModel( inst->model()->filterQ() ); - m_filterSweepRate->setModel( inst->model()->filterSweepRate() ); - m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() ); - m_vibratoGain->setModel( inst->model()->vibratoGain() ); -} - - - diff --git a/plugins/stk/voices/moog/moog_instrument_view.h b/plugins/stk/voices/moog/moog_instrument_view.h deleted file mode 100644 index ee3365381..000000000 --- a/plugins/stk/voices/moog/moog_instrument_view.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _MOOG_INSTRUMENT_VIEW_H -#define _MOOG_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "moog_instrument.h" - - -class moogInstrumentView: public stkInstrumentView -{ -public: - moogInstrumentView( moogInstrument * _instrument, QWidget * _parent ); - virtual ~moogInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_filterQ; - knob * m_filterSweepRate; - knob * m_vibratoFrequency; - knob * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/moog/moog_model.cpp b/plugins/stk/voices/moog/moog_model.cpp deleted file mode 100644 index 152cd179e..000000000 --- a/plugins/stk/voices/moog/moog_model.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "moog_model.h" - - -moogModel::moogModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _filter_q, - StkFloat _filter_sweep_rate, - StkFloat _vibrato_frequency, - StkFloat _vibrato_gain ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_filterQ( new floatModel( _filter_q, 0.0f, 128.0f, 0.1f, this ) ), - m_filterSweepRate( new floatModel( _filter_sweep_rate, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoFrequency( new floatModel( _vibrato_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_vibratoGain( new floatModel( _vibrato_gain, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -moogModel::~moogModel() -{ - delete m_filterQ; - delete m_filterSweepRate; - delete m_vibratoFrequency; - delete m_vibratoGain; -} - - - - -void moogModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_filterQ->saveSettings( _doc, _parent, "filterq" ); - m_filterSweepRate->saveSettings( _doc, _parent, "filtersweeprate" ); - m_vibratoFrequency->saveSettings( _doc, _parent, "vibratofrequency" ); - m_vibratoGain->saveSettings( _doc, _parent, "vibratogain" ); -} - - - - -void moogModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_filterQ->loadSettings( _this, "filterq" ); - m_filterSweepRate->loadSettings( _this, "filtersweeprate" ); - m_vibratoFrequency->loadSettings( _this, "vibratofrequency" ); - m_vibratoGain->loadSettings( _this, "vibratogain" ); -} - diff --git a/plugins/stk/voices/moog/moog_model.h b/plugins/stk/voices/moog/moog_model.h deleted file mode 100644 index b1a2897f7..000000000 --- a/plugins/stk/voices/moog/moog_model.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _MOOG_MODEL_H -#define _MOOG_MODEL_H - -#include "stk_model.h" - - -class moogModel: public stkModel -{ -public: - moogModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _filter_q = 64.0f, - StkFloat _filter_sweep_rate = 64.0f, - StkFloat _vibrato_frequency = 64.0f, - StkFloat _vibrato_gain = 64.0f ); - ~moogModel(); - - inline floatModel * filterQ( void ) const - { - return( m_filterQ ); - } - - inline floatModel * filterSweepRate( void ) const - { - return( m_filterSweepRate ); - } - - inline floatModel * vibratoFrequency( void ) const - { - return( m_vibratoFrequency ); - } - - inline floatModel * vibratoGain( void ) const - { - return( m_vibratoGain ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_filterQ; - floatModel * m_filterSweepRate; - floatModel * m_vibratoFrequency; - floatModel * m_vibratoGain; -}; - -#endif diff --git a/plugins/stk/voices/moog/moog_processor.cpp b/plugins/stk/voices/moog/moog_processor.cpp deleted file mode 100644 index 958c1ca4f..000000000 --- a/plugins/stk/voices/moog/moog_processor.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "moog_processor.h" -#include "config_mgr.h" - - -moogProcessor::moogProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -moogProcessor::~moogProcessor() -{ -} - - - - -void moogProcessor::setControls( moogModel * _model ) -{ - voice()->controlChange( 2, _model->filterQ()->value() ); - voice()->controlChange( 4, _model->filterSweepRate()->value() ); - voice()->controlChange( 11, _model->vibratoFrequency()->value() ); - voice()->controlChange( 1, _model->vibratoGain()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/moog/moog_processor.h b/plugins/stk/voices/moog/moog_processor.h deleted file mode 100644 index 6bbc01ed3..000000000 --- a/plugins/stk/voices/moog/moog_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _MOOG_PROCESSOR_H -#define _MOOG_PROCESSOR_H - -#include "Moog.h" - -#include "stk_processor.h" - -#include "moog_model.h" - -class moogProcessor: public stkProcessor -{ -public: - moogProcessor( sample_rate_t _sample_rate ); - ~moogProcessor( void ); - - void setControls( moogModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/percflute/Makefile.am b/plugins/stk/voices/percflute/Makefile.am deleted file mode 100644 index bdacf3b80..000000000 --- a/plugins/stk/voices/percflute/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="percflute" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./percflute_model.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 = libpercflute.la - -libpercflute_la_SOURCES = percflute_model.cpp \ - percflute_model.h \ - percflute_processor.cpp \ - percflute_processor.h \ - percflute_instrument.cpp \ - percflute_instrument.h \ - percflute_instrument_view.cpp \ - percflute_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libpercflute_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libpercflute_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/percflute/artwork.png b/plugins/stk/voices/percflute/artwork.png deleted file mode 100644 index 5099bbcde..000000000 Binary files a/plugins/stk/voices/percflute/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/percflute/logo.png b/plugins/stk/voices/percflute/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/percflute/logo.png and /dev/null differ diff --git a/plugins/stk/voices/percflute/percflute_instrument.cpp b/plugins/stk/voices/percflute/percflute_instrument.cpp deleted file mode 100644 index 752420d23..000000000 --- a/plugins/stk/voices/percflute/percflute_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "percflute_instrument.h" -#include "percflute_instrument_view.h" -#include "percflute_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor percflute_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Perc Flute", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Flute noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -percfluteInstrument::percfluteInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &percflute_plugin_descriptor ) -{ - model()->index()->setTrack( _channel_track ); - model()->crossfade()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -percfluteInstrument::~percfluteInstrument() -{ -} - - - - -QString percfluteInstrument::nodeName( void ) const -{ - return( percflute_plugin_descriptor.name ); -} - - - - -pluginView * percfluteInstrument::instantiateView( QWidget * _parent ) -{ - return( new percfluteInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new percfluteInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/percflute/percflute_instrument.h b/plugins/stk/voices/percflute/percflute_instrument.h deleted file mode 100644 index 2db4e5e3a..000000000 --- a/plugins/stk/voices/percflute/percflute_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _PERCFLUTE_INSTRUMENT_H -#define _PERCFLUTE_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "percflute_processor.h" -#include "percflute_model.h" - - -class percfluteInstrument : public stkInstrument -{ -public: - percfluteInstrument( instrumentTrack * _channel_track ); - virtual ~percfluteInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/percflute/percflute_instrument_view.cpp b/plugins/stk/voices/percflute/percflute_instrument_view.cpp deleted file mode 100644 index 0d03c66b2..000000000 --- a/plugins/stk/voices/percflute/percflute_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "percflute_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -percfluteInstrumentView::percfluteInstrumentView( percfluteInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_index = new knob( knobSmall_17, m_topView, tr( "Index" ) ); - m_index->setLabel( tr( "Modulator Index" ) ); - m_index->setHintText( tr( "Index:" ) + " ", "" ); - - m_crossfade = new knob( knobSmall_17, m_topView, tr( "Crossfade" ) ); - m_crossfade->setLabel( tr( "Modulator Crossfade" ) ); - m_crossfade->setHintText( tr( "Crossfade:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_index ); - h1->addWidget( m_crossfade ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -percfluteInstrumentView::~percfluteInstrumentView() -{ -} - - - - -void percfluteInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - percfluteInstrument * inst = castModel(); - m_index->setModel( inst->model()->index() ); - m_crossfade->setModel( inst->model()->crossfade() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/percflute/percflute_instrument_view.h b/plugins/stk/voices/percflute/percflute_instrument_view.h deleted file mode 100644 index c4bdc6194..000000000 --- a/plugins/stk/voices/percflute/percflute_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _PERCFLUTE_INSTRUMENT_VIEW_H -#define _PERCFLUTE_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "percflute_instrument.h" - - -class percfluteInstrumentView: public stkInstrumentView -{ -public: - percfluteInstrumentView( percfluteInstrument * _instrument, QWidget * _parent ); - virtual ~percfluteInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_index; - knob * m_crossfade; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/percflute/percflute_model.cpp b/plugins/stk/voices/percflute/percflute_model.cpp deleted file mode 100644 index 648298a84..000000000 --- a/plugins/stk/voices/percflute/percflute_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "percflute_model.h" - - -percfluteModel::percfluteModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _index, - StkFloat _crossfade, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_index( new floatModel( _index, 0.0f, 128.0f, 0.1f, this ) ), - m_crossfade( new floatModel( _crossfade, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -percfluteModel::~percfluteModel() -{ - delete m_index; - delete m_crossfade; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void percfluteModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_index->saveSettings( _doc, _parent, "index" ); - m_crossfade->saveSettings( _doc, _parent, "crossfade" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void percfluteModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_index->loadSettings( _this, "index" ); - m_crossfade->loadSettings( _this, "crossfade" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/percflute/percflute_model.h b/plugins/stk/voices/percflute/percflute_model.h deleted file mode 100644 index 9643dea98..000000000 --- a/plugins/stk/voices/percflute/percflute_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _PERCFLUTE_MODEL_H -#define _PERCFLUTE_MODEL_H - -#include "stk_model.h" - - -class percfluteModel: public stkModel -{ -public: - percfluteModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _index = 64.0f, - StkFloat _crossfade = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~percfluteModel(); - - inline floatModel * index( void ) const - { - return( m_index ); - } - - inline floatModel * crossfade( void ) const - { - return( m_crossfade ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_index; - floatModel * m_crossfade; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/percflute/percflute_processor.cpp b/plugins/stk/voices/percflute/percflute_processor.cpp deleted file mode 100644 index 74bae72fe..000000000 --- a/plugins/stk/voices/percflute/percflute_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "percflute_processor.h" -#include "config_mgr.h" - - -percfluteProcessor::percfluteProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -percfluteProcessor::~percfluteProcessor() -{ -} - - - - -void percfluteProcessor::setControls( percfluteModel * _model ) -{ - voice()->controlChange( 2, _model->index()->value() ); - voice()->controlChange( 4, _model->crossfade()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/percflute/percflute_processor.h b/plugins/stk/voices/percflute/percflute_processor.h deleted file mode 100644 index 19e5ab507..000000000 --- a/plugins/stk/voices/percflute/percflute_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _PERCFLUTE_PROCESSOR_H -#define _PERCFLUTE_PROCESSOR_H - -#include "PercFlut.h" - -#include "stk_processor.h" - -#include "percflute_model.h" - -class percfluteProcessor: public stkProcessor -{ -public: - percfluteProcessor( sample_rate_t _sample_rate ); - ~percfluteProcessor( void ); - - void setControls( percfluteModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/resonate/Makefile.am b/plugins/stk/voices/resonate/Makefile.am deleted file mode 100644 index 58fe47db2..000000000 --- a/plugins/stk/voices/resonate/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="resonate" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./resonate_model.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 = libresonate.la - -libresonate_la_SOURCES = resonate_model.cpp \ - resonate_model.h \ - resonate_processor.cpp \ - resonate_processor.h \ - resonate_instrument.cpp \ - resonate_instrument.h \ - resonate_instrument_view.cpp \ - resonate_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libresonate_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libresonate_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/resonate/artwork.png b/plugins/stk/voices/resonate/artwork.png deleted file mode 100644 index c821efc69..000000000 Binary files a/plugins/stk/voices/resonate/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/resonate/logo.png b/plugins/stk/voices/resonate/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/resonate/logo.png and /dev/null differ diff --git a/plugins/stk/voices/resonate/resonate_instrument.cpp b/plugins/stk/voices/resonate/resonate_instrument.cpp deleted file mode 100644 index 39e81ef0f..000000000 --- a/plugins/stk/voices/resonate/resonate_instrument.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "resonate_instrument.h" -#include "resonate_instrument_view.h" -#include "resonate_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor resonate_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Resonate", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Filered noise" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -resonateInstrument::resonateInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &resonate_plugin_descriptor ) -{ - model()->resonanceFrequency()->setTrack( _channel_track ); - model()->poleRadii()->setTrack( _channel_track ); - model()->notchFrequency()->setTrack( _channel_track ); - model()->zeroRadii()->setTrack( _channel_track ); -} - - - - -resonateInstrument::~resonateInstrument() -{ -} - - - - -QString resonateInstrument::nodeName( void ) const -{ - return( resonate_plugin_descriptor.name ); -} - - - - -pluginView * resonateInstrument::instantiateView( QWidget * _parent ) -{ - return( new resonateInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new resonateInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/resonate/resonate_instrument.h b/plugins/stk/voices/resonate/resonate_instrument.h deleted file mode 100644 index 5024241bd..000000000 --- a/plugins/stk/voices/resonate/resonate_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RESONATE_INSTRUMENT_H -#define _RESONATE_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "resonate_processor.h" -#include "resonate_model.h" - - -class resonateInstrument : public stkInstrument -{ -public: - resonateInstrument( instrumentTrack * _channel_track ); - virtual ~resonateInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/resonate/resonate_instrument_view.cpp b/plugins/stk/voices/resonate/resonate_instrument_view.cpp deleted file mode 100644 index ca31572e8..000000000 --- a/plugins/stk/voices/resonate/resonate_instrument_view.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "resonate_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -resonateInstrumentView::resonateInstrumentView( resonateInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout; - QHBoxLayout * h2 = new QHBoxLayout; - - m_resonanceFrequency = new knob( knobSmall_17, m_topView, tr( "Resonance" ) ); - m_resonanceFrequency->setLabel( tr( "Resonance Frequency" ) ); - m_resonanceFrequency->setHintText( tr( "Frequency:" ) + " ", "" ); - - m_poleRadii = new knob( knobSmall_17, m_topView, tr( "Pole Radii" ) ); - m_poleRadii->setLabel( tr( "Pole Radii" ) ); - m_poleRadii->setHintText( tr( "Radii:" ) + " ", "" ); - - m_notchFrequency = new knob( knobSmall_17, m_topView, tr( "Notch" ) ); - m_notchFrequency->setLabel( tr( "Notch Frequency" ) ); - m_notchFrequency->setHintText( tr( "Frequency:" ) + " ", "" ); - - m_zeroRadii = new knob( knobSmall_17, m_topView, tr( "Zero Radii" ) ); - m_zeroRadii->setLabel( tr( "Zero Radii" ) ); - m_zeroRadii->setHintText( tr( "Radii:" ) + " ", "" ); - - h1->addWidget( m_resonanceFrequency ); - h1->addWidget( m_poleRadii ); - - h2->addWidget( m_notchFrequency ); - h2->addWidget( m_zeroRadii ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -resonateInstrumentView::~resonateInstrumentView() -{ -} - - - - -void resonateInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - resonateInstrument * inst = castModel(); - m_resonanceFrequency->setModel( inst->model()->resonanceFrequency() ); - m_poleRadii->setModel( inst->model()->poleRadii() ); - m_notchFrequency->setModel( inst->model()->notchFrequency() ); - m_zeroRadii->setModel( inst->model()->zeroRadii() ); -} - - - diff --git a/plugins/stk/voices/resonate/resonate_instrument_view.h b/plugins/stk/voices/resonate/resonate_instrument_view.h deleted file mode 100644 index 811455283..000000000 --- a/plugins/stk/voices/resonate/resonate_instrument_view.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RESONATE_INSTRUMENT_VIEW_H -#define _RESONATE_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "resonate_instrument.h" - - -class resonateInstrumentView: public stkInstrumentView -{ -public: - resonateInstrumentView( resonateInstrument * _instrument, QWidget * _parent ); - virtual ~resonateInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_resonanceFrequency; - knob * m_poleRadii; - knob * m_notchFrequency; - knob * m_zeroRadii; -}; - -#endif diff --git a/plugins/stk/voices/resonate/resonate_model.cpp b/plugins/stk/voices/resonate/resonate_model.cpp deleted file mode 100644 index c7c47b1e4..000000000 --- a/plugins/stk/voices/resonate/resonate_model.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "resonate_model.h" - - -resonateModel::resonateModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _resonance_frequency, - StkFloat _pole_radii, - StkFloat _notch_frequency, - StkFloat _zero_radii ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_resonanceFrequency( new floatModel( _resonance_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_poleRadii( new floatModel( _pole_radii, 0.0f, 128.0f, 0.1f, this ) ), - m_notchFrequency( new floatModel( _notch_frequency, 0.0f, 128.0f, 0.1f, this ) ), - m_zeroRadii( new floatModel( _zero_radii, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -resonateModel::~resonateModel() -{ - delete m_resonanceFrequency; - delete m_poleRadii; - delete m_notchFrequency; - delete m_zeroRadii; -} - - - - -void resonateModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_resonanceFrequency->saveSettings( _doc, _parent, "resonancefrequency" ); - m_poleRadii->saveSettings( _doc, _parent, "poleradii" ); - m_notchFrequency->saveSettings( _doc, _parent, "notchfrequency" ); - m_zeroRadii->saveSettings( _doc, _parent, "zeroradii" ); -} - - - - -void resonateModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_resonanceFrequency->loadSettings( _this, "resonancefrequency" ); - m_poleRadii->loadSettings( _this, "poleradii" ); - m_notchFrequency->loadSettings( _this, "notchfrequency" ); - m_zeroRadii->loadSettings( _this, "zeroradii" ); -} - diff --git a/plugins/stk/voices/resonate/resonate_model.h b/plugins/stk/voices/resonate/resonate_model.h deleted file mode 100644 index 2318f41f7..000000000 --- a/plugins/stk/voices/resonate/resonate_model.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RESONATE_MODEL_H -#define _RESONATE_MODEL_H - -#include "stk_model.h" - - -class resonateModel: public stkModel -{ -public: - resonateModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _resonance_frequency = 64.0f, - StkFloat _pole_radii = 64.0f, - StkFloat _notch_frequency = 64.0f, - StkFloat _zero_radii = 64.0f ); - ~resonateModel(); - - inline floatModel * resonanceFrequency( void ) const - { - return( m_resonanceFrequency ); - } - - inline floatModel * poleRadii( void ) const - { - return( m_poleRadii ); - } - - inline floatModel * notchFrequency( void ) const - { - return( m_notchFrequency ); - } - - inline floatModel * zeroRadii( void ) const - { - return( m_zeroRadii ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_resonanceFrequency; - floatModel * m_poleRadii; - floatModel * m_notchFrequency; - floatModel * m_zeroRadii; -}; - -#endif diff --git a/plugins/stk/voices/resonate/resonate_processor.cpp b/plugins/stk/voices/resonate/resonate_processor.cpp deleted file mode 100644 index 6a1e86fe8..000000000 --- a/plugins/stk/voices/resonate/resonate_processor.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "resonate_processor.h" -#include "config_mgr.h" - - -resonateProcessor::resonateProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -resonateProcessor::~resonateProcessor() -{ -} - - - - -void resonateProcessor::setControls( resonateModel * _model ) -{ - voice()->controlChange( 2, _model->resonanceFrequency()->value() ); - voice()->controlChange( 4, _model->poleRadii()->value() ); - voice()->controlChange( 11, _model->notchFrequency()->value() ); - voice()->controlChange( 1, _model->zeroRadii()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/resonate/resonate_processor.h b/plugins/stk/voices/resonate/resonate_processor.h deleted file mode 100644 index 1ad005825..000000000 --- a/plugins/stk/voices/resonate/resonate_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RESONATE_PROCESSOR_H -#define _RESONATE_PROCESSOR_H - -#include "Resonate.h" - -#include "stk_processor.h" - -#include "resonate_model.h" - -class resonateProcessor: public stkProcessor -{ -public: - resonateProcessor( sample_rate_t _sample_rate ); - ~resonateProcessor( void ); - - void setControls( resonateModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/rhodey/Makefile.am b/plugins/stk/voices/rhodey/Makefile.am deleted file mode 100644 index b00bba26a..000000000 --- a/plugins/stk/voices/rhodey/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="rhodey" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./rhodey_model.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 = librhodey.la - -librhodey_la_SOURCES = rhodey_model.cpp \ - rhodey_model.h \ - rhodey_processor.cpp \ - rhodey_processor.h \ - rhodey_instrument.cpp \ - rhodey_instrument.h \ - rhodey_instrument_view.cpp \ - rhodey_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -librhodey_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(librhodey_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/rhodey/artwork.png b/plugins/stk/voices/rhodey/artwork.png deleted file mode 100644 index 8c7581ba2..000000000 Binary files a/plugins/stk/voices/rhodey/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/rhodey/logo.png b/plugins/stk/voices/rhodey/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/rhodey/logo.png and /dev/null differ diff --git a/plugins/stk/voices/rhodey/rhodey_instrument.cpp b/plugins/stk/voices/rhodey/rhodey_instrument.cpp deleted file mode 100644 index f73635970..000000000 --- a/plugins/stk/voices/rhodey/rhodey_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "rhodey_instrument.h" -#include "rhodey_instrument_view.h" -#include "rhodey_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor rhodey_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Rhodey", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Rhodes noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -rhodeyInstrument::rhodeyInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &rhodey_plugin_descriptor ) -{ - model()->index()->setTrack( _channel_track ); - model()->crossfade()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -rhodeyInstrument::~rhodeyInstrument() -{ -} - - - - -QString rhodeyInstrument::nodeName( void ) const -{ - return( rhodey_plugin_descriptor.name ); -} - - - - -pluginView * rhodeyInstrument::instantiateView( QWidget * _parent ) -{ - return( new rhodeyInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new rhodeyInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/rhodey/rhodey_instrument.h b/plugins/stk/voices/rhodey/rhodey_instrument.h deleted file mode 100644 index 4fdfa7b8d..000000000 --- a/plugins/stk/voices/rhodey/rhodey_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RHODEY_INSTRUMENT_H -#define _RHODEY_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "rhodey_processor.h" -#include "rhodey_model.h" - - -class rhodeyInstrument : public stkInstrument -{ -public: - rhodeyInstrument( instrumentTrack * _channel_track ); - virtual ~rhodeyInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/rhodey/rhodey_instrument_view.cpp b/plugins/stk/voices/rhodey/rhodey_instrument_view.cpp deleted file mode 100644 index 34a204cd7..000000000 --- a/plugins/stk/voices/rhodey/rhodey_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "rhodey_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -rhodeyInstrumentView::rhodeyInstrumentView( rhodeyInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_index = new knob( knobSmall_17, m_topView, tr( "Index" ) ); - m_index->setLabel( tr( "Modulator Index" ) ); - m_index->setHintText( tr( "Index:" ) + " ", "" ); - - m_crossfade = new knob( knobSmall_17, m_topView, tr( "Crossfade" ) ); - m_crossfade->setLabel( tr( "Modulator Crossfade" ) ); - m_crossfade->setHintText( tr( "Crossfade:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_index ); - h1->addWidget( m_crossfade ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -rhodeyInstrumentView::~rhodeyInstrumentView() -{ -} - - - - -void rhodeyInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - rhodeyInstrument * inst = castModel(); - m_index->setModel( inst->model()->index() ); - m_crossfade->setModel( inst->model()->crossfade() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/rhodey/rhodey_instrument_view.h b/plugins/stk/voices/rhodey/rhodey_instrument_view.h deleted file mode 100644 index 607c3697b..000000000 --- a/plugins/stk/voices/rhodey/rhodey_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RHODEY_INSTRUMENT_VIEW_H -#define _RHODEY_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "rhodey_instrument.h" - - -class rhodeyInstrumentView: public stkInstrumentView -{ -public: - rhodeyInstrumentView( rhodeyInstrument * _instrument, QWidget * _parent ); - virtual ~rhodeyInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_index; - knob * m_crossfade; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/rhodey/rhodey_model.cpp b/plugins/stk/voices/rhodey/rhodey_model.cpp deleted file mode 100644 index a03afb8d6..000000000 --- a/plugins/stk/voices/rhodey/rhodey_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "rhodey_model.h" - - -rhodeyModel::rhodeyModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _index, - StkFloat _crossfade, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_index( new floatModel( _index, 0.0f, 128.0f, 0.1f, this ) ), - m_crossfade( new floatModel( _crossfade, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -rhodeyModel::~rhodeyModel() -{ - delete m_index; - delete m_crossfade; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void rhodeyModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_index->saveSettings( _doc, _parent, "index" ); - m_crossfade->saveSettings( _doc, _parent, "crossfade" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void rhodeyModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_index->loadSettings( _this, "index" ); - m_crossfade->loadSettings( _this, "crossfade" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/rhodey/rhodey_model.h b/plugins/stk/voices/rhodey/rhodey_model.h deleted file mode 100644 index a8201305d..000000000 --- a/plugins/stk/voices/rhodey/rhodey_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RHODEY_MODEL_H -#define _RHODEY_MODEL_H - -#include "stk_model.h" - - -class rhodeyModel: public stkModel -{ -public: - rhodeyModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _index = 64.0f, - StkFloat _crossfade = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~rhodeyModel(); - - inline floatModel * index( void ) const - { - return( m_index ); - } - - inline floatModel * crossfade( void ) const - { - return( m_crossfade ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_index; - floatModel * m_crossfade; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/rhodey/rhodey_processor.cpp b/plugins/stk/voices/rhodey/rhodey_processor.cpp deleted file mode 100644 index 64a220ccf..000000000 --- a/plugins/stk/voices/rhodey/rhodey_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "rhodey_processor.h" -#include "config_mgr.h" - - -rhodeyProcessor::rhodeyProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -rhodeyProcessor::~rhodeyProcessor() -{ -} - - - - -void rhodeyProcessor::setControls( rhodeyModel * _model ) -{ - voice()->controlChange( 2, _model->index()->value() ); - voice()->controlChange( 4, _model->crossfade()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/rhodey/rhodey_processor.h b/plugins/stk/voices/rhodey/rhodey_processor.h deleted file mode 100644 index 77dc26069..000000000 --- a/plugins/stk/voices/rhodey/rhodey_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _RHODEY_PROCESSOR_H -#define _RHODEY_PROCESSOR_H - -#include "Rhodey.h" - -#include "stk_processor.h" - -#include "rhodey_model.h" - -class rhodeyProcessor: public stkProcessor -{ -public: - rhodeyProcessor( sample_rate_t _sample_rate ); - ~rhodeyProcessor( void ); - - void setControls( rhodeyModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/src/stk_model.cpp b/plugins/stk/voices/src/stk_model.cpp deleted file mode 100644 index 6ccdd211e..000000000 --- a/plugins/stk/voices/src/stk_model.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * stk_model.cpp - base class for stk instrument models - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 "stk_model.h" - - -stkModel::stkModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - bool _release_triggered, - bool _randomize_attack, - StkFloat _randomize_length, - StkFloat _randomize_velocity_amount, - StkFloat _randomize_frequency_amount, - StkFloat _spread ): - model( NULL ), - m_monophonic( new boolModel( _monophonic, this ) ), - m_portamento( new floatModel( _portamento, 0.0f, 1000.0f, 1.0f, this ) ), - m_bend( new floatModel( _bend, -4096.0f, 4096.0f, 8.192f, this ) ), - m_bendRange( new floatModel( _bend_range, 0.0f, 24.0f, 0.24f, this ) ), - m_velocitySensitiveLPF( new boolModel( _velocity_sensitive_lpf, this ) ), - m_velocitySensitiveQ( new floatModel( _velocity_sensitive_q, basicFilters<>::minQ(), 10.0f, 0.01f, this ) ), - m_volume( new floatModel( _volume, 0.0f, 1.0f, 0.01f, this ) ), - m_pan( new floatModel( _pan, -1.0f, 1.0f, 0.02f, this ) ), - m_releaseTriggered( new boolModel( _release_triggered, this ) ), - m_randomizeAttack( new boolModel( _randomize_attack, this ) ), - m_randomizeLength( new floatModel( _randomize_length, 0.0f, 1000.0f, 1.0f, this ) ), - m_randomizeVelocityAmount( new floatModel( _randomize_velocity_amount, 0.0f, 1.0f, 0.01f, this ) ), - m_randomizeFrequencyAmount( new floatModel( _randomize_frequency_amount, 0.0f, 4.0f, 0.04f, this ) ), - m_spread( new floatModel( _spread, 0.0f, 255.0f, 1.0f, this ) ) -{ -} - - - - -stkModel::~stkModel() -{ - delete m_portamento; - delete m_bend; - delete m_bendRange; - delete m_velocitySensitiveLPF; - delete m_velocitySensitiveQ; - delete m_volume; - delete m_pan; - delete m_releaseTriggered; - delete m_randomizeAttack; - delete m_randomizeVelocityAmount; - delete m_randomizeFrequencyAmount; - delete m_spread; -} - - - - -void stkModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - m_monophonic->saveSettings( _doc, _parent, "monophonic" ); - m_portamento->saveSettings( _doc, _parent, "portamento" ); - m_bend->saveSettings( _doc, _parent, "bend" ); - m_bendRange->saveSettings( _doc, _parent, "bendrange" ); - m_velocitySensitiveLPF->saveSettings( _doc, _parent, "velocitysensitivelpf" ); - m_velocitySensitiveQ->saveSettings( _doc, _parent, "velocitysensitiveq" ); - m_volume->saveSettings( _doc, _parent, "volume" ); - m_pan->saveSettings( _doc, _parent, "pan" ); - m_releaseTriggered->saveSettings( _doc, _parent, "releasetriggered" ); - m_randomizeAttack->saveSettings( _doc, _parent, "randomizeattack" ); - m_randomizeLength->saveSettings( _doc, _parent, "randomizelength" ); - m_randomizeVelocityAmount->saveSettings( _doc, _parent, "randomizevelocityamount" ); - m_randomizeFrequencyAmount->saveSettings( _doc, _parent, "randomizefrequencyamount" ); - m_spread->saveSettings( _doc, _parent, "spread" ); -} - - - - -void stkModel::loadSettings( const QDomElement & _this ) -{ - m_monophonic->loadSettings( _this, "monophonic" ); - m_portamento->loadSettings( _this, "portamento" ); - m_bend->loadSettings( _this, "bend" ); - m_bendRange->loadSettings( _this, "bendrange" ); - m_velocitySensitiveLPF->loadSettings( _this, "velocitysensitivelpf" ); - m_velocitySensitiveQ->loadSettings( _this, "velocitysensitiveq" ); - m_volume->loadSettings( _this, "volume" ); - m_pan->loadSettings( _this, "pan" ); - m_releaseTriggered->loadSettings( _this, "releasetriggered" ); - m_randomizeAttack->loadSettings( _this, "randomizeattack" ); - m_randomizeLength->loadSettings( _this, "randomizelength" ); - m_randomizeVelocityAmount->loadSettings( _this, "randomizevelocityamount" ); - m_randomizeFrequencyAmount->loadSettings( _this, "randomizefrequencyamount" ); - m_spread->loadSettings( _this, "spread" ); -} - - diff --git a/plugins/stk/voices/tubebell/Makefile.am b/plugins/stk/voices/tubebell/Makefile.am deleted file mode 100644 index cb68f3b4b..000000000 --- a/plugins/stk/voices/tubebell/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="tubebell" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./tubebell_model.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 = libtubebell.la - -libtubebell_la_SOURCES = tubebell_model.cpp \ - tubebell_model.h \ - tubebell_processor.cpp \ - tubebell_processor.h \ - tubebell_instrument.cpp \ - tubebell_instrument.h \ - tubebell_instrument_view.cpp \ - tubebell_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libtubebell_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libtubebell_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/tubebell/artwork.png b/plugins/stk/voices/tubebell/artwork.png deleted file mode 100644 index 0035320c3..000000000 Binary files a/plugins/stk/voices/tubebell/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/tubebell/logo.png b/plugins/stk/voices/tubebell/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/tubebell/logo.png and /dev/null differ diff --git a/plugins/stk/voices/tubebell/tubebell_instrument.cpp b/plugins/stk/voices/tubebell/tubebell_instrument.cpp deleted file mode 100644 index 94e439d97..000000000 --- a/plugins/stk/voices/tubebell/tubebell_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "tubebell_instrument.h" -#include "tubebell_instrument_view.h" -#include "tubebell_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor tubebell_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Tube Bell", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Bell noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -tubebellInstrument::tubebellInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &tubebell_plugin_descriptor ) -{ - model()->index()->setTrack( _channel_track ); - model()->crossfade()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -tubebellInstrument::~tubebellInstrument() -{ -} - - - - -QString tubebellInstrument::nodeName( void ) const -{ - return( tubebell_plugin_descriptor.name ); -} - - - - -pluginView * tubebellInstrument::instantiateView( QWidget * _parent ) -{ - return( new tubebellInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new tubebellInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/tubebell/tubebell_instrument.h b/plugins/stk/voices/tubebell/tubebell_instrument.h deleted file mode 100644 index c79aff760..000000000 --- a/plugins/stk/voices/tubebell/tubebell_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _TUBEBELL_INSTRUMENT_H -#define _TUBEBELL_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "tubebell_processor.h" -#include "tubebell_model.h" - - -class tubebellInstrument : public stkInstrument -{ -public: - tubebellInstrument( instrumentTrack * _channel_track ); - virtual ~tubebellInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/tubebell/tubebell_instrument_view.cpp b/plugins/stk/voices/tubebell/tubebell_instrument_view.cpp deleted file mode 100644 index 03e5489d6..000000000 --- a/plugins/stk/voices/tubebell/tubebell_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "tubebell_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -tubebellInstrumentView::tubebellInstrumentView( tubebellInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_index = new knob( knobSmall_17, m_topView, tr( "Index" ) ); - m_index->setLabel( tr( "Modulator Index" ) ); - m_index->setHintText( tr( "Index:" ) + " ", "" ); - - m_crossfade = new knob( knobSmall_17, m_topView, tr( "Crossfade" ) ); - m_crossfade->setLabel( tr( "Modulator Crossfade" ) ); - m_crossfade->setHintText( tr( "Crossfade:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_index ); - h1->addWidget( m_crossfade ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -tubebellInstrumentView::~tubebellInstrumentView() -{ -} - - - - -void tubebellInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - tubebellInstrument * inst = castModel(); - m_index->setModel( inst->model()->index() ); - m_crossfade->setModel( inst->model()->crossfade() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/tubebell/tubebell_instrument_view.h b/plugins/stk/voices/tubebell/tubebell_instrument_view.h deleted file mode 100644 index c3e8ae03a..000000000 --- a/plugins/stk/voices/tubebell/tubebell_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _TUBEBELL_INSTRUMENT_VIEW_H -#define _TUBEBELL_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "tubebell_instrument.h" - - -class tubebellInstrumentView: public stkInstrumentView -{ -public: - tubebellInstrumentView( tubebellInstrument * _instrument, QWidget * _parent ); - virtual ~tubebellInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_index; - knob * m_crossfade; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/tubebell/tubebell_model.cpp b/plugins/stk/voices/tubebell/tubebell_model.cpp deleted file mode 100644 index 05bbf54b3..000000000 --- a/plugins/stk/voices/tubebell/tubebell_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "tubebell_model.h" - - -tubebellModel::tubebellModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _index, - StkFloat _crossfade, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_index( new floatModel( _index, 0.0f, 128.0f, 0.1f, this ) ), - m_crossfade( new floatModel( _crossfade, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -tubebellModel::~tubebellModel() -{ - delete m_index; - delete m_crossfade; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void tubebellModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_index->saveSettings( _doc, _parent, "index" ); - m_crossfade->saveSettings( _doc, _parent, "crossfade" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void tubebellModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_index->loadSettings( _this, "index" ); - m_crossfade->loadSettings( _this, "crossfade" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/tubebell/tubebell_model.h b/plugins/stk/voices/tubebell/tubebell_model.h deleted file mode 100644 index ec7919ebd..000000000 --- a/plugins/stk/voices/tubebell/tubebell_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _TUBEBELL_MODEL_H -#define _TUBEBELL_MODEL_H - -#include "stk_model.h" - - -class tubebellModel: public stkModel -{ -public: - tubebellModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _index = 64.0f, - StkFloat _crossfade = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~tubebellModel(); - - inline floatModel * index( void ) const - { - return( m_index ); - } - - inline floatModel * crossfade( void ) const - { - return( m_crossfade ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_index; - floatModel * m_crossfade; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/tubebell/tubebell_processor.cpp b/plugins/stk/voices/tubebell/tubebell_processor.cpp deleted file mode 100644 index 8c39a717c..000000000 --- a/plugins/stk/voices/tubebell/tubebell_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "tubebell_processor.h" -#include "config_mgr.h" - - -tubebellProcessor::tubebellProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -tubebellProcessor::~tubebellProcessor() -{ -} - - - - -void tubebellProcessor::setControls( tubebellModel * _model ) -{ - voice()->controlChange( 2, _model->index()->value() ); - voice()->controlChange( 4, _model->crossfade()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/tubebell/tubebell_processor.h b/plugins/stk/voices/tubebell/tubebell_processor.h deleted file mode 100644 index 7cff391d1..000000000 --- a/plugins/stk/voices/tubebell/tubebell_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _TUBEBELL_PROCESSOR_H -#define _TUBEBELL_PROCESSOR_H - -#include "TubeBell.h" - -#include "stk_processor.h" - -#include "tubebell_model.h" - -class tubebellProcessor: public stkProcessor -{ -public: - tubebellProcessor( sample_rate_t _sample_rate ); - ~tubebellProcessor( void ); - - void setControls( tubebellModel * _model ); -}; - -#endif diff --git a/plugins/stk/voices/wurley/Makefile.am b/plugins/stk/voices/wurley/Makefile.am deleted file mode 100644 index d7c5cdeec..000000000 --- a/plugins/stk/voices/wurley/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 - - -INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I$(top_srcdir)/plugins/stk/voices/include - - -AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="wurley" - - -%.moc: ./%.h - $(MOC) -o $@ $< - - -MOC_FILES = ./wurley_model.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 = libwurley.la - -libwurley_la_SOURCES = wurley_model.cpp \ - wurley_model.h \ - wurley_processor.cpp \ - wurley_processor.h \ - wurley_instrument.cpp \ - wurley_instrument.h \ - wurley_instrument_view.cpp \ - wurley_instrument_view.h \ - $(top_srcdir)/plugins/stk/voices/src/stk_model.cpp \ - stk_model.h - - - -libwurley_la_LDFLAGS = -L@stk_lib@ -lstk -Wl,-export-dynamic - -$(libwurley_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/voices/wurley/artwork.png b/plugins/stk/voices/wurley/artwork.png deleted file mode 100644 index b1b72c5af..000000000 Binary files a/plugins/stk/voices/wurley/artwork.png and /dev/null differ diff --git a/plugins/stk/voices/wurley/logo.png b/plugins/stk/voices/wurley/logo.png deleted file mode 100644 index 93fcd1746..000000000 Binary files a/plugins/stk/voices/wurley/logo.png and /dev/null differ diff --git a/plugins/stk/voices/wurley/wurley_instrument.cpp b/plugins/stk/voices/wurley/wurley_instrument.cpp deleted file mode 100644 index 508850ee3..000000000 --- a/plugins/stk/voices/wurley/wurley_instrument.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "engine.h" -#include "note_play_handle.h" - -#include "wurley_instrument.h" -#include "wurley_instrument_view.h" -#include "wurley_processor.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embedded_resources.h" - - -extern "C" -{ - -plugin::descriptor wurley_plugin_descriptor = -{ - STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), - "Wurley", - QT_TRANSLATE_NOOP( "pluginBrowser", - "Wurlitzer noises" ), - "Danny McRae ", - 0x0100, - plugin::Instrument, - new pluginPixmapLoader( "logo" ), - NULL -} ; - -} - - -wurleyInstrument::wurleyInstrument( instrumentTrack * _channel_track ): - stkInstrument( _channel_track, &wurley_plugin_descriptor ) -{ - model()->index()->setTrack( _channel_track ); - model()->crossfade()->setTrack( _channel_track ); - model()->lfoSpeed()->setTrack( _channel_track ); - model()->lfoDepth()->setTrack( _channel_track ); - model()->adsrTarget()->setTrack( _channel_track ); -} - - - - -wurleyInstrument::~wurleyInstrument() -{ -} - - - - -QString wurleyInstrument::nodeName( void ) const -{ - return( wurley_plugin_descriptor.name ); -} - - - - -pluginView * wurleyInstrument::instantiateView( QWidget * _parent ) -{ - return( new wurleyInstrumentView( this, _parent ) ); -} - - - - -extern "C" -{ - -// neccessary for getting instance out of shared lib -plugin * lmms_plugin_main( model * _model, void * _data ) -{ - return( new wurleyInstrument( static_cast( _data ) ) ); -} - - -} - - diff --git a/plugins/stk/voices/wurley/wurley_instrument.h b/plugins/stk/voices/wurley/wurley_instrument.h deleted file mode 100644 index fd654ba79..000000000 --- a/plugins/stk/voices/wurley/wurley_instrument.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _WURLEY_INSTRUMENT_H -#define _WURLEY_INSTRUMENT_H - -#include "stk_instrument.h" - -#include "wurley_processor.h" -#include "wurley_model.h" - - -class wurleyInstrument : public stkInstrument -{ -public: - wurleyInstrument( instrumentTrack * _channel_track ); - virtual ~wurleyInstrument( void ); - - QString nodeName( void ) const; - - pluginView * instantiateView( QWidget * _parent ); -}; - -#endif diff --git a/plugins/stk/voices/wurley/wurley_instrument_view.cpp b/plugins/stk/voices/wurley/wurley_instrument_view.cpp deleted file mode 100644 index 12cd275db..000000000 --- a/plugins/stk/voices/wurley/wurley_instrument_view.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 -#include -#include - -#include "wurley_instrument_view.h" - -#include -#include - -#include "engine.h" -#include "gui_templates.h" - -#undef SINGLE_SOURCE_COMPILE -#include "embed.cpp" - - -wurleyInstrumentView::wurleyInstrumentView( wurleyInstrument * _instrument, QWidget * _parent ) : - stkInstrumentView( _instrument, _parent ) -{ - QVBoxLayout * vl = new QVBoxLayout( m_topView ); - QHBoxLayout * h1 = new QHBoxLayout(); - QHBoxLayout * h2 = new QHBoxLayout(); - QHBoxLayout * h3 = new QHBoxLayout(); - - - m_index = new knob( knobSmall_17, m_topView, tr( "Index" ) ); - m_index->setLabel( tr( "Modulator Index" ) ); - m_index->setHintText( tr( "Index:" ) + " ", "" ); - - m_crossfade = new knob( knobSmall_17, m_topView, tr( "Crossfade" ) ); - m_crossfade->setLabel( tr( "Modulator Crossfade" ) ); - m_crossfade->setHintText( tr( "Crossfade:" ) + " ", "" ); - - m_lfoSpeed = new knob( knobSmall_17, m_topView, tr( "LFO Speed" ) ); - m_lfoSpeed->setLabel( tr( "LFO Speed" ) ); - m_lfoSpeed->setHintText( tr( "LFO Speed:" ) + " ", "" ); - - m_lfoDepth = new knob( knobSmall_17, m_topView, tr( "LFO Depth" ) ); - m_lfoDepth->setLabel( tr( "LFO Depth" ) ); - m_lfoDepth->setHintText( tr( "LFO Depth:" ) + " ", "" ); - - m_adsrTarget = new knob( knobSmall_17, m_topView, tr( "ADSR Target" ) ); - m_adsrTarget->setLabel( tr( "ADSR Target" ) ); - m_adsrTarget->setHintText( tr( "ADSR Target:" ) + " ", "" ); - - h1->addWidget( m_index ); - h1->addWidget( m_crossfade ); - - h2->addWidget( m_lfoSpeed ); - h2->addWidget( m_lfoDepth ); - - h3->addWidget( m_adsrTarget ); - - vl->addLayout( h1 ); - vl->addLayout( h2 ); - vl->addLayout( h3 ); - - setAutoFillBackground( TRUE ); - QPalette pal; - pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); - setPalette( pal ); -} - - - - -wurleyInstrumentView::~wurleyInstrumentView() -{ -} - - - - -void wurleyInstrumentView::modelChanged( void ) -{ - stkInstrumentView::modelChanged(); - - wurleyInstrument * inst = castModel(); - m_index->setModel( inst->model()->index() ); - m_crossfade->setModel( inst->model()->crossfade() ); - m_lfoSpeed->setModel( inst->model()->lfoSpeed() ); - m_lfoDepth->setModel( inst->model()->lfoDepth() ); - m_adsrTarget->setModel( inst->model()->adsrTarget() ); -} - - - diff --git a/plugins/stk/voices/wurley/wurley_instrument_view.h b/plugins/stk/voices/wurley/wurley_instrument_view.h deleted file mode 100644 index a021833f4..000000000 --- a/plugins/stk/voices/wurley/wurley_instrument_view.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _WURLEY_INSTRUMENT_VIEW_H -#define _WURLEY_INSTRUMENT_VIEW_H - -#include "knob.h" - -#include "stk_instrument_view.h" -#include "wurley_instrument.h" - - -class wurleyInstrumentView: public stkInstrumentView -{ -public: - wurleyInstrumentView( wurleyInstrument * _instrument, QWidget * _parent ); - virtual ~wurleyInstrumentView( void ); - -private: - virtual void modelChanged( void ); - - knob * m_index; - knob * m_crossfade; - knob * m_lfoSpeed; - knob * m_lfoDepth; - knob * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/wurley/wurley_model.cpp b/plugins/stk/voices/wurley/wurley_model.cpp deleted file mode 100644 index e220c9116..000000000 --- a/plugins/stk/voices/wurley/wurley_model.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "wurley_model.h" - - -wurleyModel::wurleyModel( bool _monophonic, - StkFloat _portamento, - StkFloat _bend, - StkFloat _bend_range, - bool _velocity_sensitive_lpf, - StkFloat _velocity_sensitive_q, - StkFloat _volume, - StkFloat _pan, - StkFloat _spread, - StkFloat _index, - StkFloat _crossfade, - StkFloat _lfo_speed, - StkFloat _lfo_depth, - StkFloat _adsr_target ): - stkModel( _monophonic, _portamento, _bend, _bend_range, _velocity_sensitive_lpf, _velocity_sensitive_q, _volume, _pan, _spread ), - m_index( new floatModel( _index, 0.0f, 128.0f, 0.1f, this ) ), - m_crossfade( new floatModel( _crossfade, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoSpeed( new floatModel( _lfo_speed, 0.0f, 128.0f, 0.1f, this ) ), - m_lfoDepth( new floatModel( _lfo_depth, 0.0f, 128.0f, 0.1f, this ) ), - m_adsrTarget( new floatModel( _adsr_target, 0.0f, 128.0f, 0.1f, this ) ) -{ -} - - - - -wurleyModel::~wurleyModel() -{ - delete m_index; - delete m_crossfade; - delete m_lfoSpeed; - delete m_lfoDepth; - delete m_adsrTarget; -} - - - - -void wurleyModel::saveSettings( QDomDocument & _doc, QDomElement & _parent ) -{ - stkModel::saveSettings( _doc, _parent ); - m_index->saveSettings( _doc, _parent, "index" ); - m_crossfade->saveSettings( _doc, _parent, "crossfade" ); - m_lfoSpeed->saveSettings( _doc, _parent, "lfospeed" ); - m_lfoDepth->saveSettings( _doc, _parent, "lfodepth" ); - m_adsrTarget->saveSettings( _doc, _parent, "adsrtarget" ); -} - - - - -void wurleyModel::loadSettings( const QDomElement & _this ) -{ - stkModel::loadSettings( _this ); - m_index->loadSettings( _this, "index" ); - m_crossfade->loadSettings( _this, "crossfade" ); - m_lfoSpeed->loadSettings( _this, "lfospeed" ); - m_lfoDepth->loadSettings( _this, "lfodepth" ); - m_adsrTarget->loadSettings( _this, "adsrtarget" ); -} - diff --git a/plugins/stk/voices/wurley/wurley_model.h b/plugins/stk/voices/wurley/wurley_model.h deleted file mode 100644 index 9928e5c3b..000000000 --- a/plugins/stk/voices/wurley/wurley_model.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _WURLEY_MODEL_H -#define _WURLEY_MODEL_H - -#include "stk_model.h" - - -class wurleyModel: public stkModel -{ -public: - wurleyModel( bool _monophonic = FALSE, - StkFloat _portamento = 0.0f, - StkFloat _bend = 0.0f, - StkFloat _bend_range = 2.0f, - bool _velocity_sensitive_lpf = TRUE, - StkFloat _velocity_sensitive_q = 0.5f, - StkFloat _volume = 1.0f, - StkFloat _pan = 0.0f, - StkFloat _spread = 0.0f, - StkFloat _index = 64.0f, - StkFloat _crossfade = 64.0f, - StkFloat _lfo_speed = 64.0f, - StkFloat _lfo_depth = 64.0f, - StkFloat _adsr_target = 64.0f ); - ~wurleyModel(); - - inline floatModel * index( void ) const - { - return( m_index ); - } - - inline floatModel * crossfade( void ) const - { - return( m_crossfade ); - } - - inline floatModel * lfoSpeed( void ) - { - return( m_lfoSpeed ); - } - - inline floatModel * lfoDepth( void ) const - { - return( m_lfoDepth ); - } - - inline floatModel * adsrTarget( void ) const - { - return( m_adsrTarget ); - } - - void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - - void loadSettings( const QDomElement & _this ); - -private: - floatModel * m_index; - floatModel * m_crossfade; - floatModel * m_lfoSpeed; - floatModel * m_lfoDepth; - floatModel * m_adsrTarget; -}; - -#endif diff --git a/plugins/stk/voices/wurley/wurley_processor.cpp b/plugins/stk/voices/wurley/wurley_processor.cpp deleted file mode 100644 index 7d989e880..000000000 --- a/plugins/stk/voices/wurley/wurley_processor.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * 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 "wurley_processor.h" -#include "config_mgr.h" - - -wurleyProcessor::wurleyProcessor( sample_rate_t _sample_rate ): - stkProcessor( _sample_rate ) -{ -} - - - - -wurleyProcessor::~wurleyProcessor() -{ -} - - - - -void wurleyProcessor::setControls( wurleyModel * _model ) -{ - voice()->controlChange( 2, _model->index()->value() ); - voice()->controlChange( 4, _model->crossfade()->value() ); - voice()->controlChange( 11, _model->lfoSpeed()->value() ); - voice()->controlChange( 1, _model->lfoDepth()->value() ); - voice()->controlChange( 128, _model->adsrTarget()->value() ); - m_delayRead = m_delayWrite - static_cast( _model->spread()->value() ); -} diff --git a/plugins/stk/voices/wurley/wurley_processor.h b/plugins/stk/voices/wurley/wurley_processor.h deleted file mode 100644 index e84a8ac46..000000000 --- a/plugins/stk/voices/wurley/wurley_processor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2008 Danny McRae - * - * - * 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 _WURLEY_PROCESSOR_H -#define _WURLEY_PROCESSOR_H - -#include "Wurley.h" - -#include "stk_processor.h" - -#include "wurley_model.h" - -class wurleyProcessor: public stkProcessor -{ -public: - wurleyProcessor( sample_rate_t _sample_rate ); - ~wurleyProcessor( void ); - - void setControls( wurleyModel * _model ); -}; - -#endif