moved STK-voices plugins to lmms-extras

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1139 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-15 12:55:58 +00:00
parent 9f584e5612
commit 0b539d3218
183 changed files with 0 additions and 11237 deletions

View File

@@ -1,16 +0,0 @@
SUBDIRS = b3 \
bandedwg \
blow_bottle \
blow_hole \
bowed \
brass \
clarinet \
flute \
fmvoices \
metal \
moog \
percflute \
resonate \
rhodey \
tubebell \
wurley

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -1,103 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
b3Instrument::b3Instrument( instrumentTrack * _channel_track ):
stkInstrument<b3Processor, b3Model>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<b3Processor, b3Model>
{
public:
b3Instrument( instrumentTrack * _channel_track );
virtual ~b3Instrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,110 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "b3_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
b3InstrumentView::b3InstrumentView( b3Instrument * _instrument, QWidget * _parent ) :
stkInstrumentView<b3Instrument>( _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<b3Instrument>::modelChanged();
b3Instrument * inst = castModel<b3Instrument>();
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() );
}

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<b3Instrument>
{
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

View File

@@ -1,88 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,86 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<b3Model, BeeThree>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<b3Model, BeeThree>
{
public:
b3Processor( sample_rate_t _sample_rate );
~b3Processor( void );
void setControls( b3Model * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -1,105 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
bandedWGInstrument::bandedWGInstrument( instrumentTrack * _channel_track ):
stkInstrument<bandedWGProcessor, bandedWGModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<bandedWGProcessor, bandedWGModel>
{
public:
bandedWGInstrument( instrumentTrack * _channel_track );
virtual ~bandedWGInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,121 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "bandedwg_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
bandedWGInstrumentView::bandedWGInstrumentView( bandedWGInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<bandedWGInstrument>( _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<bandedWGInstrument>::modelChanged();
bandedWGInstrument * inst = castModel<bandedWGInstrument>();
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() );
}

View File

@@ -1,53 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<bandedWGInstrument>
{
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

View File

@@ -1,98 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,100 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,53 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<bandedWGModel, BandedWG>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<bandedWGModel, BandedWG>
{
public:
bandedWGProcessor( sample_rate_t _sample_rate );
~bandedWGProcessor( void );
void setControls( bandedWGModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,102 +0,0 @@
/*
* blow_bottle_instrument.cpp - interface to lmms for blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
blowBottleInstrument::blowBottleInstrument( instrumentTrack * _channel_track ):
stkInstrument<blowBottleProcessor, blowBottleModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,47 +0,0 @@
/*
* blow_bottle_instrument.h - interface to lmms for blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<blowBottleProcessor, blowBottleModel>
{
public:
blowBottleInstrument( instrumentTrack * _channel_track );
virtual ~blowBottleInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,89 +0,0 @@
/*
* blow_bottle_instrument_view.cpp - gui interface to blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "blow_bottle_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
blowBottleInstrumentView::blowBottleInstrumentView( blowBottleInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<blowBottleInstrument>( _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<blowBottleInstrument>::modelChanged();
blowBottleInstrument * inst = castModel<blowBottleInstrument>();
m_noiseGain->setModel( inst->model()->noiseGain() );
m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() );
m_vibratoGain->setModel( inst->model()->vibratoGain() );
}

View File

@@ -1,50 +0,0 @@
/*
* blow_bottle_instrument_view.h - gui interface to blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<blowBottleInstrument>
{
public:
blowBottleInstrumentView( blowBottleInstrument * _instrument, QWidget * _parent );
virtual ~blowBottleInstrumentView( void );
private:
virtual void modelChanged( void );
knob * m_noiseGain;
knob * m_vibratoFrequency;
knob * m_vibratoGain;
};
#endif

View File

@@ -1,79 +0,0 @@
/*
* blow_bottle_model.cpp - data storage for blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,63 +0,0 @@
/*
* blow_bottle_model.h - data storage for blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,53 +0,0 @@
/*
* blow_bottle_processor.cpp - sound generator for blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<blowBottleModel, BlowBotl>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,43 +0,0 @@
/*
* blow_bottle_processor.h - sound generator for blown bottle noises
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<blowBottleModel, BlowBotl>
{
public:
blowBottleProcessor( sample_rate_t _sample_rate );
~blowBottleProcessor( void );
void setControls( blowBottleModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,103 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
blowHoleInstrument::blowHoleInstrument( instrumentTrack * _channel_track ):
stkInstrument<blowHoleProcessor, blowHoleModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<blowHoleProcessor, blowHoleModel>
{
public:
blowHoleInstrument( instrumentTrack * _channel_track );
virtual ~blowHoleInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,110 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "blow_hole_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
blowHoleInstrumentView::blowHoleInstrumentView( blowHoleInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<blowHoleInstrument>( _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<blowHoleInstrument>::modelChanged();
blowHoleInstrument * inst = castModel<blowHoleInstrument>();
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() );
}

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<blowHoleInstrument>
{
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

View File

@@ -1,88 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,67 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<blowHoleModel, BlowHole>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<blowHoleModel, BlowHole>
{
public:
blowHoleProcessor( sample_rate_t _sample_rate );
~blowHoleProcessor( void );
void setControls( blowHoleModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,102 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
bowedInstrument::bowedInstrument( instrumentTrack * _channel_track ):
stkInstrument<bowedProcessor, bowedModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<bowedProcessor, bowedModel>
{
public:
bowedInstrument( instrumentTrack * _channel_track );
virtual ~bowedInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,100 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "bowed_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
bowedInstrumentView::bowedInstrumentView( bowedInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<bowedInstrument>( _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<bowedInstrument>::modelChanged();
bowedInstrument * inst = castModel<bowedInstrument>();
m_bowPressure->setModel( inst->model()->bowPressure() );
m_bowPosition->setModel( inst->model()->bowPosition() );
m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() );
m_vibratoGain->setModel( inst->model()->vibratoGain() );
}

View File

@@ -1,50 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<bowedInstrument>
{
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

View File

@@ -1,83 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,79 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,50 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<bowedModel, Bowed>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<bowedModel, Bowed>
{
public:
bowedProcessor( sample_rate_t _sample_rate );
~bowedProcessor( void );
void setControls( bowedModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,102 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
brassInstrument::brassInstrument( instrumentTrack * _channel_track ):
stkInstrument<brassProcessor, brassModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<brassProcessor, brassModel>
{
public:
brassInstrument( instrumentTrack * _channel_track );
virtual ~brassInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,100 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "brass_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
brassInstrumentView::brassInstrumentView( brassInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<brassInstrument>( _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<brassInstrument>::modelChanged();
brassInstrument * inst = castModel<brassInstrument>();
m_lipTension->setModel( inst->model()->lipTension() );
m_slideLength->setModel( inst->model()->slideLength() );
m_vibratoFrequency->setModel( inst->model()->vibratoFrequency() );
m_vibratoGain->setModel( inst->model()->vibratoGain() );
}

View File

@@ -1,50 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<brassInstrument>
{
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

View File

@@ -1,83 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,79 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,50 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<brassModel, Brass>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<brassModel, Brass>
{
public:
brassProcessor( sample_rate_t _sample_rate );
~brassProcessor( void );
void setControls( brassModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,103 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
clarinetInstrument::clarinetInstrument( instrumentTrack * _channel_track ):
stkInstrument<clarinetProcessor, clarinetModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<clarinetProcessor, clarinetModel>
{
public:
clarinetInstrument( instrumentTrack * _channel_track );
virtual ~clarinetInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,110 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "clarinet_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
clarinetInstrumentView::clarinetInstrumentView( clarinetInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<clarinetInstrument>( _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<clarinetInstrument>::modelChanged();
clarinetInstrument * inst = castModel<clarinetInstrument>();
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() );
}

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<clarinetInstrument>
{
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

View File

@@ -1,88 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,86 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<clarinetModel, Clarinet>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<clarinetModel, Clarinet>
{
public:
clarinetProcessor( sample_rate_t _sample_rate );
~clarinetProcessor( void );
void setControls( clarinetModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,103 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
fluteInstrument::fluteInstrument( instrumentTrack * _channel_track ):
stkInstrument<fluteProcessor, fluteModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<fluteProcessor, fluteModel>
{
public:
fluteInstrument( instrumentTrack * _channel_track );
virtual ~fluteInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,110 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "flute_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
fluteInstrumentView::fluteInstrumentView( fluteInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<fluteInstrument>( _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<fluteInstrument>::modelChanged();
fluteInstrument * inst = castModel<fluteInstrument>();
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() );
}

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<fluteInstrument>
{
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

View File

@@ -1,88 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,86 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<fluteModel, Flute>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<fluteModel, Flute>
{
public:
fluteProcessor( sample_rate_t _sample_rate );
~fluteProcessor( void );
void setControls( fluteModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,103 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <khjklujn/at/users.sf.net>",
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
NULL
} ;
}
fmvoicesInstrument::fmvoicesInstrument( instrumentTrack * _channel_track ):
stkInstrument<fmvoicesProcessor, fmvoicesModel>( _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<instrumentTrack *>( _data ) ) );
}
}

View File

@@ -1,46 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<fmvoicesProcessor, fmvoicesModel>
{
public:
fmvoicesInstrument( instrumentTrack * _channel_track );
virtual ~fmvoicesInstrument( void );
QString nodeName( void ) const;
pluginView * instantiateView( QWidget * _parent );
};
#endif

View File

@@ -1,110 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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 <QtCore/QDir>
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include "fmvoices_instrument_view.h"
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include "engine.h"
#include "gui_templates.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
fmvoicesInstrumentView::fmvoicesInstrumentView( fmvoicesInstrument * _instrument, QWidget * _parent ) :
stkInstrumentView<fmvoicesInstrument>( _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<fmvoicesInstrument>::modelChanged();
fmvoicesInstrument * inst = castModel<fmvoicesInstrument>();
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() );
}

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<fmvoicesInstrument>
{
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

View File

@@ -1,88 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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" );
}

View File

@@ -1,86 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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

View File

@@ -1,51 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* 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<fmvoicesModel, FMVoices>( _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<Uint8>( _model->spread()->value() );
}

View File

@@ -1,42 +0,0 @@
/*
*
* Copyright (c) 2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* 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<fmvoicesModel, FMVoices>
{
public:
fmvoicesProcessor( sample_rate_t _sample_rate );
~fmvoicesProcessor( void );
void setControls( fmvoicesModel * _model );
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

Some files were not shown because too many files have changed in this diff Show More