File lmms-1.2.0-crippled_stk.patch of Package lmms
Index: b/plugins/stk/mallets/mallets.cpp
===================================================================
--- a/plugins/stk/mallets/mallets.cpp 2020-07-04 13:58:46.000000000 +0200
+++ b/plugins/stk/mallets/mallets.cpp 2020-07-18 09:28:00.592499234 +0200
@@ -31,7 +31,6 @@
#include "BandedWG.h"
#include "ModalBar.h"
-#include "TubeBell.h"
#include "ConfigManager.h"
#include "Engine.h"
@@ -107,10 +106,6 @@ malletsInstrument::malletsInstrument( In
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 );
@@ -141,13 +136,6 @@ void malletsInstrument::saveSettings( QD
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 @@ void malletsInstrument::loadSettings( co
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" );
@@ -311,19 +292,6 @@ void malletsInstrument::playNote( NotePl
(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,
@@ -392,10 +360,6 @@ malletsInstrumentView::malletsInstrument
setWidgetBackground( m_modalBarWidget, "artwork" );
m_modalBarWidget->move( 0,0 );
- m_tubeBellWidget = setupTubeBellControls( this );
- setWidgetBackground( m_tubeBellWidget, "artwork" );
- m_tubeBellWidget->move( 0,0 );
-
m_bandedWGWidget = setupBandedWGControls( this );
setWidgetBackground( m_bandedWGWidget, "artwork" );
m_bandedWGWidget->move( 0,0 );
@@ -482,42 +446,6 @@ QWidget * malletsInstrumentView::setupMo
-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 )
{
// BandedWG
@@ -561,11 +489,6 @@ void malletsInstrumentView::modelChanged
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 );
@@ -585,7 +508,6 @@ void malletsInstrumentView::changePreset
if( _preset < 9 )
{
- m_tubeBellWidget->hide();
m_bandedWGWidget->hide();
m_modalBarWidget->show();
}
@@ -593,12 +515,10 @@ void malletsInstrumentView::changePreset
{
m_modalBarWidget->hide();
m_bandedWGWidget->hide();
- m_tubeBellWidget->show();
}
else
{
m_modalBarWidget->hide();
- m_tubeBellWidget->hide();
m_bandedWGWidget->show();
}
}
@@ -640,55 +560,6 @@ malletsSynth::malletsSynth( const StkFlo
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;
- }
-}
-
-
-
-
-// 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 ) :
- m_presetIndex(0)
-{
- try
- {
- Stk::setSampleRate( _sample_rate );
- Stk::setRawwavePath( QDir( ConfigManager::inst()->stkDir() ).absolutePath()
- .toLocal8Bit().constData() );
-#ifndef LMMS_DEBUG
- Stk::showWarnings( false );
-#endif
-
- 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;
}