File lmms-1.0.0-crippled_stk.patch of Package lmms
diff -urN lmms-1.0.0.old/plugins/stk/mallets/mallets.cpp lmms-1.0.0/plugins/stk/mallets/mallets.cpp
--- lmms-1.0.0.old/plugins/stk/mallets/mallets.cpp 2014-03-24 00:00:39.000000000 +0100
+++ lmms-1.0.0/plugins/stk/mallets/mallets.cpp 2014-03-24 08:28:45.557483536 +0100
@@ -30,7 +30,6 @@
#include "BandedWG.h"
#include "ModalBar.h"
-#include "TubeBell.h"
#include "engine.h"
#include "gui_templates.h"
@@ -111,10 +110,6 @@
m_presetsModel.addItem( tr( "Clump" ) );
m_scalers.append( 4.0 );
- // TubeBell
- m_presetsModel.addItem( tr( "Tubular Bells" ) );
- m_scalers.append( 1.8 );
-
// BandedWG
m_presetsModel.addItem( tr( "Uniform Bar" ) );
m_scalers.append( 25.0 );
@@ -145,13 +140,6 @@
m_vibratoFreqModel.saveSettings( _doc, _this, "vib_freq" );
m_stickModel.saveSettings( _doc, _this, "stick_mix" );
- // TubeBell
- m_modulatorModel.saveSettings( _doc, _this, "modulator" );
- m_crossfadeModel.saveSettings( _doc, _this, "crossfade" );
- m_lfoSpeedModel.saveSettings( _doc, _this, "lfo_speed" );
- m_lfoDepthModel.saveSettings( _doc, _this, "lfo_depth" );
- m_adsrModel.saveSettings( _doc, _this, "adsr" );
-
// BandedWG
m_pressureModel.saveSettings( _doc, _this, "pressure" );
m_motionModel.saveSettings( _doc, _this, "motion" );
@@ -175,13 +163,6 @@
m_vibratoFreqModel.loadSettings( _this, "vib_freq" );
m_stickModel.loadSettings( _this, "stick_mix" );
- // TubeBell
- m_modulatorModel.loadSettings( _this, "modulator" );
- m_crossfadeModel.loadSettings( _this, "crossfade" );
- m_lfoSpeedModel.loadSettings( _this, "lfo_speed" );
- m_lfoDepthModel.loadSettings( _this, "lfo_depth" );
- m_adsrModel.loadSettings( _this, "adsr" );
-
// BandedWG
m_pressureModel.loadSettings( _this, "pressure" );
m_motionModel.loadSettings( _this, "motion" );
@@ -235,19 +216,6 @@
(uint8_t) m_spreadModel.value(),
engine::mixer()->processingSampleRate() );
}
- else if( p == 9 )
- {
- _n->m_pluginData = new malletsSynth( freq,
- vel,
- p,
- m_lfoDepthModel.value(),
- m_modulatorModel.value(),
- m_crossfadeModel.value(),
- m_lfoSpeedModel.value(),
- m_adsrModel.value(),
- (uint8_t) m_spreadModel.value(),
- engine::mixer()->processingSampleRate() );
- }
else
{
_n->m_pluginData = new malletsSynth( freq,
@@ -313,11 +281,6 @@
m_modalBarWidget->show();
m_modalBarWidget->move( 0,0 );
- m_tubeBellWidget = setupTubeBellControls( this );
- setWidgetBackground( m_tubeBellWidget, "artwork" );
- m_tubeBellWidget->hide();
- m_tubeBellWidget->move( 0,0 );
-
m_bandedWGWidget = setupBandedWGControls( this );
setWidgetBackground( m_bandedWGWidget, "artwork" );
m_bandedWGWidget->hide();
@@ -393,40 +356,6 @@
-QWidget * malletsInstrumentView::setupTubeBellControls( QWidget * _parent )
-{
- QWidget * widget = new QWidget( _parent );
- widget->setFixedSize( 250, 250 );
-
- m_modulatorKnob = new knob( knobVintage_32, widget );
- m_modulatorKnob->setLabel( tr( "Modulator" ) );
- m_modulatorKnob->move( 30, 90 );
- m_modulatorKnob->setHintText( tr( "Modulator:" ) + " ", "" );
-
- m_crossfadeKnob = new knob( knobVintage_32, widget );
- m_crossfadeKnob->setLabel( tr( "Crossfade" ) );
- m_crossfadeKnob->move( 110, 90 );
- m_crossfadeKnob->setHintText( tr( "Crossfade:" ) + " ", "" );
-
- m_lfoSpeedKnob = new knob( knobVintage_32, widget );
- m_lfoSpeedKnob->setLabel( tr( "LFO Speed" ) );
- m_lfoSpeedKnob->move( 30, 140 );
- m_lfoSpeedKnob->setHintText( tr( "LFO Speed:" ) + " ", "" );
-
- m_lfoDepthKnob = new knob( knobVintage_32, widget );
- m_lfoDepthKnob->setLabel( tr( "LFO Depth" ) );
- m_lfoDepthKnob->move( 110, 140 );
- m_lfoDepthKnob->setHintText( tr( "LFO Depth:" ) + " ", "" );
-
- m_adsrKnob = new knob( knobVintage_32, widget );
- m_adsrKnob->setLabel( tr( "ADSR" ) );
- m_adsrKnob->move( 190, 90 );
- m_adsrKnob->setHintText( tr( "ADSR:" ) + " ", "" );
-
- return( widget );
-}
-
-
QWidget * malletsInstrumentView::setupBandedWGControls( QWidget * _parent )
@@ -472,11 +401,6 @@
m_vibratoGainKnob->setModel( &inst->m_vibratoGainModel );
m_vibratoFreqKnob->setModel( &inst->m_vibratoFreqModel );
m_stickKnob->setModel( &inst->m_stickModel );
- m_modulatorKnob->setModel( &inst->m_modulatorModel );
- m_crossfadeKnob->setModel( &inst->m_crossfadeModel );
- m_lfoSpeedKnob->setModel( &inst->m_lfoSpeedModel );
- m_lfoDepthKnob->setModel( &inst->m_lfoDepthModel );
- m_adsrKnob->setModel( &inst->m_adsrModel );
m_pressureKnob->setModel( &inst->m_pressureModel );
m_motionKnob->setModel( &inst->m_motionModel );
m_vibratoKnob->setModel( &inst->m_vibratoModel );
@@ -497,7 +421,6 @@
printf("malletsInstrumentView %d\n", _preset);
if( _preset < 9 )
{
- m_tubeBellWidget->hide();
m_bandedWGWidget->hide();
m_modalBarWidget->show();
}
@@ -505,12 +428,10 @@
{
m_modalBarWidget->hide();
m_bandedWGWidget->hide();
- m_tubeBellWidget->show();
}
else
{
m_modalBarWidget->hide();
- m_tubeBellWidget->hide();
m_bandedWGWidget->show();
}
}
@@ -564,50 +485,6 @@
-// TubeBell
-malletsSynth::malletsSynth( const StkFloat _pitch,
- const StkFloat _velocity,
- const int _preset,
- const StkFloat _control1,
- const StkFloat _control2,
- const StkFloat _control4,
- const StkFloat _control11,
- const StkFloat _control128,
- const uint8_t _delay,
- const sample_rate_t _sample_rate )
-{
- try
- {
- Stk::setSampleRate( _sample_rate );
- Stk::setRawwavePath( configManager::inst()->stkDir()
- .toAscii().constData() );
-
- m_voice = new TubeBell();
-
- m_voice->controlChange( 1, _control1 );
- m_voice->controlChange( 2, _control2 );
- m_voice->controlChange( 4, _control4 );
- m_voice->controlChange( 11, _control11 );
- m_voice->controlChange( 128, _control128 );
-
- m_voice->noteOn( _pitch, _velocity );
- }
- catch( ... )
- {
- m_voice = NULL;
- }
-
- m_delay = new StkFloat[256];
- m_delayRead = 0;
- m_delayWrite = _delay;
- for( int i = 0; i < 256; i++ )
- {
- m_delay[i] = 0.0;
- }
-}
-
-
-
// BandedWG
malletsSynth::malletsSynth( const StkFloat _pitch,
diff -urN lmms-1.0.0.old/plugins/stk/mallets/mallets.h lmms-1.0.0/plugins/stk/mallets/mallets.h
--- lmms-1.0.0.old/plugins/stk/mallets/mallets.h 2014-03-24 00:00:39.000000000 +0100
+++ lmms-1.0.0/plugins/stk/mallets/mallets.h 2014-03-24 08:29:33.317983335 +0100
@@ -58,18 +58,6 @@
const uint8_t _delay,
const sample_rate_t _sample_rate );
- // TubeBell
- malletsSynth( const StkFloat _pitch,
- const StkFloat _velocity,
- const int _preset,
- const StkFloat _control1,
- const StkFloat _control2,
- const StkFloat _control4,
- const StkFloat _control11,
- const StkFloat _control128,
- const uint8_t _delay,
- const sample_rate_t _sample_rate );
-
// BandedWG
malletsSynth( const StkFloat _pitch,
const StkFloat _velocity,
@@ -199,7 +187,6 @@
void setWidgetBackground( QWidget * _widget, const QString & _pic );
QWidget * setupModalBarControls( QWidget * _parent );
- QWidget * setupTubeBellControls( QWidget * _parent );
QWidget * setupBandedWGControls( QWidget * _parent );
QWidget * m_modalBarWidget;
@@ -209,13 +196,6 @@
knob * m_vibratoFreqKnob;
knob * m_stickKnob;
- QWidget * m_tubeBellWidget;
- knob * m_modulatorKnob;
- knob * m_crossfadeKnob;
- knob * m_lfoSpeedKnob;
- knob * m_lfoDepthKnob;
- knob * m_adsrKnob;
-
QWidget * m_bandedWGWidget;
knob * m_pressureKnob;
knob * m_motionKnob;