Merge branch 'stable-1.2' into master (@liushuyu)
36
plugins/Bitcrush/BitcrushControlDialog.cpp
Normal file → Executable file
@@ -41,73 +41,73 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 215, 120 );
|
||||
setFixedSize( 181, 128 );
|
||||
|
||||
// labels
|
||||
QLabel * inLabel = new QLabel( tr( "IN" ), this );
|
||||
inLabel->move( 12, 10);
|
||||
inLabel->move( 24, 15 );
|
||||
|
||||
QLabel * outLabel = new QLabel( tr( "OUT" ), this );
|
||||
outLabel->move( 176, 10 );
|
||||
outLabel->move( 139, 15 );
|
||||
|
||||
// input knobs
|
||||
Knob * inGain = new Knob( knobBright_26, this );
|
||||
inGain->move( 12, 25 );
|
||||
inGain->move( 16, 32 );
|
||||
inGain->setModel( & controls->m_inGain );
|
||||
inGain->setLabel( tr( "GAIN" ) );
|
||||
inGain->setHintText( tr( "Input Gain:" ) + " ", " dBFS" );
|
||||
|
||||
Knob * inNoise = new Knob( knobBright_26, this );
|
||||
inNoise->move( 12, 70 );
|
||||
inNoise->move( 14, 76 );
|
||||
inNoise->setModel( & controls->m_inNoise );
|
||||
inNoise->setLabel( tr( "NOIS" ) );
|
||||
inNoise->setLabel( tr( "NOISE" ) );
|
||||
inNoise->setHintText( tr( "Input Noise:" ) + " ", "%" );
|
||||
|
||||
|
||||
// output knobs
|
||||
Knob * outGain = new Knob( knobBright_26, this );
|
||||
outGain->move( 176, 25 );
|
||||
outGain->move( 138, 32 );
|
||||
outGain->setModel( & controls->m_outGain );
|
||||
outGain->setLabel( tr( "GAIN" ) );
|
||||
outGain->setHintText( tr( "Output Gain:" ) + " ", " dBFS" );
|
||||
|
||||
Knob * outClip = new Knob( knobBright_26, this );
|
||||
outClip->move( 176, 70 );
|
||||
outClip->move( 138, 76 );
|
||||
outClip->setModel( & controls->m_outClip );
|
||||
outClip->setLabel( tr( "CLIP" ) );
|
||||
outClip->setHintText( tr( "Output Clip:" ) + " ", "%" );
|
||||
|
||||
|
||||
// leds
|
||||
LedCheckBox * rateEnabled = new LedCheckBox( tr( "Rate" ), this, tr( "Rate Enabled" ), LedCheckBox::Green );
|
||||
rateEnabled->move( 50, 30 );
|
||||
LedCheckBox * rateEnabled = new LedCheckBox( "", this, tr( "Rate Enabled" ), LedCheckBox::Green );
|
||||
rateEnabled->move( 64, 14 );
|
||||
rateEnabled->setModel( & controls->m_rateEnabled );
|
||||
ToolTip::add( rateEnabled, tr( "Enable samplerate-crushing" ) );
|
||||
|
||||
LedCheckBox * depthEnabled = new LedCheckBox( tr( "Depth" ), this, tr( "Depth Enabled" ), LedCheckBox::Green );
|
||||
depthEnabled->move( 50, 80 );
|
||||
LedCheckBox * depthEnabled = new LedCheckBox( "", this, tr( "Depth Enabled" ), LedCheckBox::Green );
|
||||
depthEnabled->move( 101, 14 );
|
||||
depthEnabled->setModel( & controls->m_depthEnabled );
|
||||
ToolTip::add( depthEnabled, tr( "Enable bitdepth-crushing" ) );
|
||||
|
||||
|
||||
// rate crushing knobs
|
||||
Knob * rate = new Knob( knobBright_26, this );
|
||||
rate->move( 100, 20 );
|
||||
rate->move( 59, 32 );
|
||||
rate->setModel( & controls->m_rate );
|
||||
rate->setLabel( tr( "Rate" ) );
|
||||
rate->setLabel( tr( "FREQ" ) );
|
||||
rate->setHintText( tr( "Sample rate:" ) + " ", " Hz" );
|
||||
|
||||
Knob * stereoDiff = new Knob( knobBright_26, this );
|
||||
stereoDiff->move( 140, 20 );
|
||||
stereoDiff->move( 72, 76 );
|
||||
stereoDiff->setModel( & controls->m_stereoDiff );
|
||||
stereoDiff->setLabel( tr( "STD" ) );
|
||||
stereoDiff->setLabel( tr( "STEREO" ) );
|
||||
stereoDiff->setHintText( tr( "Stereo difference:" ) + " ", "%" );
|
||||
|
||||
|
||||
// depth crushing knob
|
||||
Knob * levels = new Knob( knobBright_26, this );
|
||||
levels->move( 140, 70 );
|
||||
levels->move( 92, 32 );
|
||||
levels->setModel( & controls->m_levels );
|
||||
levels->setLabel( tr( "Levels" ) );
|
||||
levels->setLabel( tr( "QUANT" ) );
|
||||
levels->setHintText( tr( "Levels:" ) + " ", "" );
|
||||
}
|
||||
|
||||
BIN
plugins/Bitcrush/artwork.png
Normal file → Executable file
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -32,7 +32,7 @@
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
EffectControls( effect ),
|
||||
m_effect ( effect ),
|
||||
m_delayTimeModel( 0.5, 0.01, 5.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
|
||||
m_delayTimeModel( 0.5, 0.01, 5.0, 0.0001, 5000.0, this, tr( "Delay Samples" )) ,
|
||||
m_feedbackModel(0.0f,0.0f,1.0f,0.01f,this,tr( "Feedback" ) ),
|
||||
m_lfoTimeModel(2.0, 0.01, 5.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoAmountModel(0.0, 0.0, 0.5, 0.0001, 2000.0, this, tr ( "Lfo Amount" ) ),
|
||||
|
||||
@@ -36,7 +36,7 @@ StereoDelay::StereoDelay( int maxTime, int sampleRate )
|
||||
m_maxLength = maxTime * sampleRate;
|
||||
m_length = m_maxLength;
|
||||
|
||||
m_index = 0;
|
||||
m_writeIndex = 0;
|
||||
m_feedback = 0.0f;
|
||||
setSampleRate( sampleRate );
|
||||
}
|
||||
@@ -57,13 +57,13 @@ StereoDelay::~StereoDelay()
|
||||
|
||||
void StereoDelay::tick( sampleFrame frame )
|
||||
{
|
||||
m_index = ( int )m_length > 0
|
||||
? ( m_index + 1 ) % ( int ) m_length
|
||||
: m_index;
|
||||
float lOut = m_buffer[ m_index ][ 0 ];
|
||||
float rOut = m_buffer[ m_index ] [1 ];
|
||||
m_buffer[ m_index ][ 0 ] = frame[ 0 ] + ( lOut * m_feedback );
|
||||
m_buffer[ m_index ][ 1 ] = frame[ 1 ] + ( rOut * m_feedback );
|
||||
m_writeIndex = ( m_writeIndex + 1 ) % ( int )m_maxLength;
|
||||
int readIndex = m_writeIndex - m_length;
|
||||
if (readIndex < 0 ) { readIndex += m_maxLength; }
|
||||
float lOut = m_buffer[ readIndex ][ 0 ];
|
||||
float rOut = m_buffer[ readIndex ] [1 ];
|
||||
m_buffer[ m_writeIndex ][ 0 ] = frame[ 0 ] + ( lOut * m_feedback );
|
||||
m_buffer[ m_writeIndex ][ 1 ] = frame[ 1 ] + ( rOut * m_feedback );
|
||||
frame[ 0 ] = lOut;
|
||||
frame[ 1 ] = rOut;
|
||||
}
|
||||
@@ -71,6 +71,8 @@ void StereoDelay::tick( sampleFrame frame )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void StereoDelay::setSampleRate( int sampleRate )
|
||||
{
|
||||
if( m_buffer )
|
||||
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
sampleFrame* m_buffer;
|
||||
int m_maxLength;
|
||||
float m_length;
|
||||
int m_index;
|
||||
int m_writeIndex;
|
||||
float m_feedback;
|
||||
float m_maxTime;
|
||||
};
|
||||
|
||||
24
plugins/DualFilter/DualFilterControlDialog.cpp
Normal file → Executable file
@@ -49,15 +49,15 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 150, 220 );
|
||||
setFixedSize( 373, 109 );
|
||||
|
||||
makeknob( cut1Knob, 33, 30, m_cut1Model, tr( "FREQ" ), tr( "Cutoff frequency" ), "Hz" )
|
||||
makeknob( res1Knob, 75, 30, m_res1Model, tr( "RESO" ), tr( "Resonance" ), "" )
|
||||
makeknob( gain1Knob, 117, 30, m_gain1Model, tr( "GAIN" ), tr( "Gain" ), "%" )
|
||||
makeknob( mixKnob, 62, 100, m_mixModel, tr( "MIX" ), tr( "Mix" ), "" )
|
||||
makeknob( cut2Knob, 33, 145, m_cut2Model, tr( "FREQ" ), tr( "Cutoff frequency" ), "Hz" )
|
||||
makeknob( res2Knob, 75, 145, m_res2Model, tr( "RESO" ), tr( "Resonance" ), "" )
|
||||
makeknob( gain2Knob, 117, 145, m_gain2Model, tr( "GAIN" ), tr( "Gain" ), "%" )
|
||||
makeknob( cut1Knob, 24, 26, m_cut1Model, tr( "FREQ" ), tr( "Cutoff frequency" ), "Hz" )
|
||||
makeknob( res1Knob, 74, 26, m_res1Model, tr( "RESO" ), tr( "Resonance" ), "" )
|
||||
makeknob( gain1Knob, 124, 26, m_gain1Model, tr( "GAIN" ), tr( "Gain" ), "%" )
|
||||
makeknob( mixKnob, 173, 37, m_mixModel, tr( "MIX" ), tr( "Mix" ), "" )
|
||||
makeknob( cut2Knob, 222, 26, m_cut2Model, tr( "FREQ" ), tr( "Cutoff frequency" ), "Hz" )
|
||||
makeknob( res2Knob, 272, 26, m_res2Model, tr( "RESO" ), tr( "Resonance" ), "" )
|
||||
makeknob( gain2Knob, 322, 26, m_gain2Model, tr( "GAIN" ), tr( "Gain" ), "%" )
|
||||
|
||||
gain1Knob-> setVolumeKnob( true );
|
||||
gain2Knob-> setVolumeKnob( true );
|
||||
@@ -67,20 +67,20 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
LedCheckBox * enabled2Toggle = new LedCheckBox( "", this,
|
||||
tr( "Filter 2 enabled" ), LedCheckBox::Green );
|
||||
|
||||
enabled1Toggle -> move( 5, 30 );
|
||||
enabled1Toggle -> move( 12, 11 );
|
||||
enabled1Toggle -> setModel( &controls -> m_enabled1Model );
|
||||
ToolTip::add( enabled1Toggle, tr( "Click to enable/disable Filter 1" ) );
|
||||
enabled2Toggle -> move( 5, 145 );
|
||||
enabled2Toggle -> move( 210, 11 );
|
||||
enabled2Toggle -> setModel( &controls -> m_enabled2Model );
|
||||
ToolTip::add( enabled2Toggle, tr( "Click to enable/disable Filter 2" ) );
|
||||
|
||||
ComboBox * m_filter1ComboBox = new ComboBox( this );
|
||||
m_filter1ComboBox->setGeometry( 5, 70, 140, 22 );
|
||||
m_filter1ComboBox->setGeometry( 19, 70, 137, 22 );
|
||||
m_filter1ComboBox->setFont( pointSize<8>( m_filter1ComboBox->font() ) );
|
||||
m_filter1ComboBox->setModel( &controls->m_filter1Model );
|
||||
|
||||
ComboBox * m_filter2ComboBox = new ComboBox( this );
|
||||
m_filter2ComboBox->setGeometry( 5, 185, 140, 22 );
|
||||
m_filter2ComboBox->setGeometry( 217, 70, 137, 22 );
|
||||
m_filter2ComboBox->setFont( pointSize<8>( m_filter2ComboBox->font() ) );
|
||||
m_filter2ComboBox->setModel( &controls->m_filter2Model );
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 934 B |
@@ -70,6 +70,10 @@ EqEffect::~EqEffect()
|
||||
|
||||
bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
|
||||
{
|
||||
//wet/dry controls
|
||||
const float dry = dryLevel();
|
||||
const float wet = wetLevel();
|
||||
sample_t dryS[2];
|
||||
// setup sample exact controls
|
||||
float hpRes = m_eqControls.m_hpResModel.value();
|
||||
float lowShelfRes = m_eqControls.m_lowShelfResModel.value();
|
||||
@@ -205,6 +209,9 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
|
||||
|
||||
for( fpp_t f = 0; f < frames; f++)
|
||||
{
|
||||
//wet dry buffer
|
||||
dryS[0] = buf[f][0];
|
||||
dryS[1] = buf[f][1];
|
||||
if( hpActive )
|
||||
{
|
||||
m_hp12.setParameters( sampleRate, *hpFreqPtr, *hpResPtr, 1 );
|
||||
@@ -296,6 +303,10 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
|
||||
}
|
||||
}
|
||||
|
||||
//apply wet / dry levels
|
||||
buf[f][1] = ( dry * dryS[1] ) + ( wet * buf[f][1] );
|
||||
buf[f][0] = ( dry * dryS[0] ) + ( wet * buf[f][0] );
|
||||
|
||||
//increment pointers if needed
|
||||
hpResPtr += hpResInc;
|
||||
lowShelfResPtr += lowShelfResInc;
|
||||
|
||||
@@ -35,7 +35,7 @@ FlangerControls::FlangerControls( FlangerEffect *effect ) :
|
||||
EffectControls ( effect ),
|
||||
m_effect ( effect ),
|
||||
m_delayTimeModel(0.001, 0.0001, 0.050, 0.0001, this, tr( "Delay Samples" ) ) ,
|
||||
m_lfoFrequencyModel( 0.25, 0.01, 5, 0.0001, 20000.0 ,this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoFrequencyModel( 0.25, 0.01, 60, 0.0001, 60000.0 ,this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoAmountModel( 0.0, 0.0, 0.0025 , 0.0001 , this , tr( "Seconds" ) ),
|
||||
m_feedbackModel( 0.0 , 0.0 , 1.0 , 0.0001, this, tr( "Regen" ) ),
|
||||
m_whiteNoiseAmountModel( 0.0 , 0.0 , 0.05 , 0.0001, this, tr( "Noise" ) ),
|
||||
|
||||
@@ -52,7 +52,7 @@ FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoFrequencyModel );
|
||||
lfoFreqKnob->setLabel( tr( "RATE" ) );
|
||||
lfoFreqKnob->setHintText( tr ( "Rate:" ) , "Hz" );
|
||||
lfoFreqKnob->setHintText( tr ( "Period:" ) , " Sec" );
|
||||
|
||||
Knob * lfoAmtKnob = new Knob( knobBright_26, this );
|
||||
lfoAmtKnob->move( 85,10 );
|
||||
|
||||
@@ -94,7 +94,7 @@ bool FlangerEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
|
||||
const float noise = m_flangerControls.m_whiteNoiseAmountModel.value();
|
||||
float amplitude = m_flangerControls.m_lfoAmountModel.value() * Engine::mixer()->processingSampleRate();
|
||||
bool invertFeedback = m_flangerControls.m_invertFeedbackModel.value();
|
||||
m_lfo->setFrequency( m_flangerControls.m_lfoFrequencyModel.value() );
|
||||
m_lfo->setFrequency( 1.0/m_flangerControls.m_lfoFrequencyModel.value() );
|
||||
m_lDelay->setFeedback( m_flangerControls.m_feedbackModel.value() );
|
||||
m_rDelay->setFeedback( m_flangerControls.m_feedbackModel.value() );
|
||||
sample_t dryS[2];
|
||||
@@ -107,8 +107,8 @@ bool FlangerEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
|
||||
dryS[0] = buf[f][0];
|
||||
dryS[1] = buf[f][1];
|
||||
m_lfo->tick(&leftLfo, &rightLfo);
|
||||
m_lDelay->setLength( ( float )length + ( amplitude * leftLfo ) );
|
||||
m_rDelay->setLength( ( float )length+ ( amplitude * rightLfo ) );
|
||||
m_lDelay->setLength( ( float )length + amplitude * (leftLfo+1.0) );
|
||||
m_rDelay->setLength( ( float )length + amplitude * (rightLfo+1.0) );
|
||||
if(invertFeedback)
|
||||
{
|
||||
m_lDelay->tick( &buf[f][1] );
|
||||
|
||||
@@ -34,7 +34,7 @@ MonoDelay::MonoDelay( int maxTime , int sampleRate )
|
||||
m_maxLength = maxTime * sampleRate;
|
||||
m_length = m_maxLength;
|
||||
|
||||
m_index = 0;
|
||||
m_writeIndex = 0;
|
||||
m_feedback = 0.0f;
|
||||
setSampleRate( sampleRate );
|
||||
}
|
||||
@@ -54,11 +54,11 @@ MonoDelay::~MonoDelay()
|
||||
|
||||
void MonoDelay::tick( sample_t* sample )
|
||||
{
|
||||
m_index = ( int )m_length > 0
|
||||
? ( m_index + 1 ) % ( int )m_length
|
||||
: m_index;
|
||||
float out = m_buffer[ m_index ];
|
||||
m_buffer[ m_index ] = *sample + ( out * m_feedback );
|
||||
m_writeIndex = ( m_writeIndex + 1 ) % ( int )m_maxLength;
|
||||
int readIndex = m_writeIndex - m_length;
|
||||
if (readIndex < 0 ) { readIndex += m_maxLength; }
|
||||
float out = m_buffer[ readIndex ];
|
||||
m_buffer[ m_writeIndex ] = *sample + ( out * m_feedback );
|
||||
*sample = out;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
sample_t* m_buffer;
|
||||
int m_maxLength;
|
||||
float m_length;
|
||||
int m_index;
|
||||
int m_writeIndex;
|
||||
float m_feedback;
|
||||
float m_maxTime;
|
||||
};
|
||||
|
||||
@@ -2,6 +2,11 @@ if(LMMS_HAVE_GIG)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${GIG_INCLUDE_DIRS})
|
||||
|
||||
# Disable C++11 on Clang until gig.h is patched
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
ENDIF()
|
||||
|
||||
# Required for not crashing loading files with libgig
|
||||
SET(GCC_COVERAGE_COMPILE_FLAGS "-fexceptions")
|
||||
add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})
|
||||
|
||||
@@ -1066,7 +1066,6 @@ void GigInstrumentView::showFileDialog()
|
||||
types << tr( "GIG Files (*.gig)" );
|
||||
ofd.setNameFilters( types );
|
||||
|
||||
QString dir;
|
||||
if( k->m_filename != "" )
|
||||
{
|
||||
QString f = SampleBuffer::tryToMakeAbsolute( k->m_filename );
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "LcdSpinBox.h"
|
||||
#include "GigPlayer.h"
|
||||
|
||||
#include <fluidsynth.h>
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
|
||||
BUILD_PLUGIN(
|
||||
reverbsc
|
||||
ReverbSC.cpp
|
||||
ReverbSCControls.cpp
|
||||
ReverbSCControlDialog.cpp
|
||||
ReverbSC.cpp
|
||||
ReverbSCControls.cpp
|
||||
ReverbSCControlDialog.cpp
|
||||
base.c
|
||||
revsc.c
|
||||
dcblock.c
|
||||
MOCFILES
|
||||
ReverbSC.h
|
||||
ReverbSCControls.h
|
||||
ReverbSCControlDialog.h
|
||||
base.h
|
||||
revsc.h
|
||||
dcblock.h
|
||||
dcblock.c
|
||||
ReverbSC.h
|
||||
MOCFILES
|
||||
ReverbSCControls.h
|
||||
ReverbSCControlDialog.h
|
||||
EMBEDDED_RESOURCES artwork.png logo.png
|
||||
)
|
||||
|
||||
@@ -58,8 +58,8 @@ ReverbSCEffect::ReverbSCEffect( Model* parent, const Descriptor::SubPluginFeatur
|
||||
sp_dcblock_create(&dcblk[0]);
|
||||
sp_dcblock_create(&dcblk[1]);
|
||||
|
||||
sp_dcblock_init(sp, dcblk[0]);
|
||||
sp_dcblock_init(sp, dcblk[1]);
|
||||
sp_dcblock_init(sp, dcblk[0], Engine::mixer()->currentQualitySettings().sampleRateMultiplier() );
|
||||
sp_dcblock_init(sp, dcblk[1], Engine::mixer()->currentQualitySettings().sampleRateMultiplier() );
|
||||
}
|
||||
|
||||
ReverbSCEffect::~ReverbSCEffect()
|
||||
@@ -125,6 +125,27 @@ bool ReverbSCEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
void ReverbSCEffect::changeSampleRate()
|
||||
{
|
||||
// Change sr variable in Soundpipe. does not need to be destroyed
|
||||
sp->sr = Engine::mixer()->processingSampleRate();
|
||||
|
||||
mutex.lock();
|
||||
sp_revsc_destroy(&revsc);
|
||||
sp_dcblock_destroy(&dcblk[0]);
|
||||
sp_dcblock_destroy(&dcblk[1]);
|
||||
|
||||
sp_revsc_create(&revsc);
|
||||
sp_revsc_init(sp, revsc);
|
||||
|
||||
sp_dcblock_create(&dcblk[0]);
|
||||
sp_dcblock_create(&dcblk[1]);
|
||||
|
||||
sp_dcblock_init(sp, dcblk[0], Engine::mixer()->currentQualitySettings().sampleRateMultiplier() );
|
||||
sp_dcblock_init(sp, dcblk[1], Engine::mixer()->currentQualitySettings().sampleRateMultiplier() );
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -48,12 +48,14 @@ public:
|
||||
return &m_reverbSCControls;
|
||||
}
|
||||
|
||||
void changeSampleRate();
|
||||
|
||||
private:
|
||||
ReverbSCControls m_reverbSCControls;
|
||||
sp_data *sp;
|
||||
sp_revsc *revsc;
|
||||
sp_dcblock *dcblk[2];
|
||||
QMutex mutex;
|
||||
friend class ReverbSCControls;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ ReverbSCControls::ReverbSCControls( ReverbSCEffect* effect ) :
|
||||
m_colorModel( 10000.0f, 100.0f, 15000.0f, 0.1f, this, tr( "Color" ) ),
|
||||
m_outputGainModel( 0.0f, -60.0f, 15, 0.1f, this, tr( "Output Gain" ) )
|
||||
{
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ));
|
||||
}
|
||||
|
||||
void ReverbSCControls::changeControl()
|
||||
@@ -60,3 +61,7 @@ void ReverbSCControls::saveSettings( QDomDocument& doc, QDomElement& _this )
|
||||
m_outputGainModel.saveSettings( doc, _this, "output_gain" );
|
||||
}
|
||||
|
||||
void ReverbSCControls::changeSampleRate()
|
||||
{
|
||||
m_effect->changeSampleRate();
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void changeControl();
|
||||
void changeSampleRate();
|
||||
|
||||
private:
|
||||
ReverbSCEffect* m_effect;
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef struct sp_auxdata {
|
||||
|
||||
typedef struct sp_data {
|
||||
SPFLOAT *out;
|
||||
int sr;
|
||||
uint32_t sr;
|
||||
int nchan;
|
||||
unsigned long len;
|
||||
unsigned long pos;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include "base.h"
|
||||
#include "dcblock.h"
|
||||
@@ -26,11 +27,11 @@ int sp_dcblock_destroy(sp_dcblock **p)
|
||||
return SP_OK;
|
||||
}
|
||||
|
||||
int sp_dcblock_init(sp_data *sp, sp_dcblock *p)
|
||||
int sp_dcblock_init(sp_data *sp, sp_dcblock *p, int oversampling )
|
||||
{
|
||||
p->outputs = 0.0;
|
||||
p->inputs = 0.0;
|
||||
p->gain = 0.99;
|
||||
p->gain = pow( 0.99, 1.0f / oversampling );
|
||||
if (p->gain == 0.0 || p->gain>=1.0 || p->gain<=-1.0)
|
||||
p->gain = 0.99;
|
||||
return SP_OK;
|
||||
|
||||
@@ -7,5 +7,5 @@ typedef struct {
|
||||
|
||||
int sp_dcblock_create(sp_dcblock **p);
|
||||
int sp_dcblock_destroy(sp_dcblock **p);
|
||||
int sp_dcblock_init(sp_data *sp, sp_dcblock *p);
|
||||
int sp_dcblock_init(sp_data *sp, sp_dcblock *p, int oversampling );
|
||||
int sp_dcblock_compute(sp_data *sp, sp_dcblock *p, SPFLOAT *in, SPFLOAT *out);
|
||||
|
||||
@@ -87,10 +87,10 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
m_managePluginButton = new PixmapButton( this, "" );
|
||||
m_managePluginButton->setCheckable( false );
|
||||
m_managePluginButton->setCursor( Qt::PointingHandCursor );
|
||||
m_managePluginButton->setActiveGraphic( embed::getIconPixmap(
|
||||
"track_op_menu_active" ) );
|
||||
m_managePluginButton->setInactiveGraphic( embed::getIconPixmap(
|
||||
"track_op_menu" ) );
|
||||
m_managePluginButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"controls_active" ) );
|
||||
m_managePluginButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"controls" ) );
|
||||
connect( m_managePluginButton, SIGNAL( clicked() ), _ctl,
|
||||
SLOT( managePlugin() ) );
|
||||
ToolTip::add( m_managePluginButton, tr( "Control VST-plugin from LMMS host" ) );
|
||||
@@ -98,8 +98,8 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
m_managePluginButton->setWhatsThis(
|
||||
tr( "Click here, if you want to control VST-plugin from host." ) );
|
||||
|
||||
m_managePluginButton->setMinimumWidth( 21 );
|
||||
m_managePluginButton->setMaximumWidth( 21 );
|
||||
m_managePluginButton->setMinimumWidth( 26 );
|
||||
m_managePluginButton->setMaximumWidth( 26 );
|
||||
m_managePluginButton->setMinimumHeight( 21 );
|
||||
m_managePluginButton->setMaximumHeight( 21 );
|
||||
|
||||
|
||||
BIN
plugins/VstEffect/controls.png
Normal file
|
After Width: | Height: | Size: 841 B |
BIN
plugins/VstEffect/controls_active.png
Normal file
|
After Width: | Height: | Size: 824 B |
@@ -1081,7 +1081,6 @@ void sf2InstrumentView::showFileDialog()
|
||||
types << tr( "SoundFont2 Files (*.sf2)" );
|
||||
ofd.setNameFilters( types );
|
||||
|
||||
QString dir;
|
||||
if( k->m_filename != "" )
|
||||
{
|
||||
QString f = SampleBuffer::tryToMakeAbsolute( k->m_filename );
|
||||
|
||||
BIN
plugins/vestige/controls.png
Normal file
|
After Width: | Height: | Size: 841 B |
BIN
plugins/vestige/controls_active.png
Normal file
|
After Width: | Height: | Size: 824 B |
@@ -42,6 +42,7 @@
|
||||
#include "Mixer.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "StringPairDrag.h"
|
||||
#include "TextFloat.h"
|
||||
#include "ToolTip.h"
|
||||
@@ -174,17 +175,6 @@ void vestigeInstrument::setParameter( void )
|
||||
|
||||
void vestigeInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( QFileInfo( m_pluginDLL ).isAbsolute() )
|
||||
{
|
||||
QString f = QString( m_pluginDLL ).replace( QDir::separator(), '/' );
|
||||
QString vd = QString( ConfigManager::inst()->vstDir() ).replace( QDir::separator(), '/' );
|
||||
QString relativePath;
|
||||
if( !( relativePath = f.section( vd, 1, 1 ) ).isEmpty() )
|
||||
{
|
||||
m_pluginDLL = relativePath;
|
||||
}
|
||||
}
|
||||
|
||||
_this.setAttribute( "plugin", m_pluginDLL );
|
||||
m_pluginMutex.lock();
|
||||
if( m_plugin != NULL )
|
||||
@@ -254,8 +244,7 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
{
|
||||
closePlugin();
|
||||
}
|
||||
|
||||
m_pluginDLL = _file;
|
||||
m_pluginDLL = SampleBuffer::tryToMakeRelative( _file );
|
||||
TextFloat * tf = TextFloat::displayMessage(
|
||||
tr( "Loading plugin" ),
|
||||
tr( "Please wait while loading VST-plugin..." ),
|
||||
@@ -269,6 +258,7 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
closePlugin();
|
||||
delete tf;
|
||||
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( m_pluginDLL ) );
|
||||
m_pluginDLL = "";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -425,10 +415,10 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
|
||||
m_managePluginButton->setCheckable( false );
|
||||
m_managePluginButton->setCursor( Qt::PointingHandCursor );
|
||||
m_managePluginButton->move( 216, 101 );
|
||||
m_managePluginButton->setActiveGraphic( embed::getIconPixmap(
|
||||
"track_op_menu_active" ) );
|
||||
m_managePluginButton->setInactiveGraphic( embed::getIconPixmap(
|
||||
"track_op_menu" ) );
|
||||
m_managePluginButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"controls_active" ) );
|
||||
m_managePluginButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"controls" ) );
|
||||
connect( m_managePluginButton, SIGNAL( clicked() ), this,
|
||||
SLOT( managePlugin() ) );
|
||||
ToolTip::add( m_managePluginButton, tr( "Control VST-plugin from LMMS host" ) );
|
||||
@@ -614,29 +604,22 @@ void VestigeInstrumentView::openPlugin()
|
||||
{
|
||||
FileDialog ofd( NULL, tr( "Open VST-plugin" ) );
|
||||
|
||||
QString dir;
|
||||
if( m_vi->m_pluginDLL != "" )
|
||||
{
|
||||
dir = QFileInfo( m_vi->m_pluginDLL ).absolutePath();
|
||||
}
|
||||
else
|
||||
{
|
||||
dir = ConfigManager::inst()->vstDir();
|
||||
}
|
||||
// change dir to position of previously opened file
|
||||
ofd.setDirectory( dir );
|
||||
ofd.setFileMode( FileDialog::ExistingFiles );
|
||||
|
||||
// set filters
|
||||
QStringList types;
|
||||
types << tr( "DLL-files (*.dll)" )
|
||||
<< tr( "EXE-files (*.exe)" )
|
||||
;
|
||||
ofd.setNameFilters( types );
|
||||
|
||||
if( m_vi->m_pluginDLL != "" )
|
||||
{
|
||||
// select previously opened file
|
||||
ofd.selectFile( QFileInfo( m_vi->m_pluginDLL ).fileName() );
|
||||
QString f = SampleBuffer::tryToMakeAbsolute( m_vi->m_pluginDLL );
|
||||
ofd.setDirectory( QFileInfo( f ).absolutePath() );
|
||||
ofd.selectFile( QFileInfo( f ).fileName() );
|
||||
}
|
||||
else
|
||||
{
|
||||
ofd.setDirectory( ConfigManager::inst()->vstDir() );
|
||||
}
|
||||
|
||||
if ( ofd.exec () == QDialog::Accepted )
|
||||
|
||||
@@ -34,20 +34,20 @@ IF(LMMS_BUILD_LINUX AND NOT WANT_VST_NOWINE)
|
||||
IF(LMMS_HOST_X86_64)
|
||||
SET(EXTRA_FLAGS -m32)
|
||||
|
||||
# workaround for broken wineg++ in WINE 1.4 (shipped e.g. with Ubuntu Precise)
|
||||
EXEC_PROGRAM( ${WINE_CXX} ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT)
|
||||
# workaround for broken wineg++ in WINE 1.4 (shipped e.g. with Ubuntu Precise)
|
||||
IF("${WINEBUILD_OUTPUT}" MATCHES ".*x86_64-linux-gnu/wine/libwinecrt0.a.*")
|
||||
SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /usr/lib/i386-linux-gnu/wine/libwinecrt0.a -luser32 -lkernel32 -lgdi32)
|
||||
SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /usr/lib/i386-linux-gnu/wine/libwinecrt0.a -L/usr/lib/i386-linux-gnu/wine/ -luser32 -lkernel32 -lgdi32)
|
||||
ENDIF()
|
||||
# The following check works on Fedora systems
|
||||
IF("${WINEBUILD_OUTPUT}" MATCHES "/usr/lib/lib64/wine/libwinecrt0.a.*")
|
||||
SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /usr/lib/i386/wine/libwinecrt0.a -luser32 -lkernel32 -lgdi32)
|
||||
ENDIF()
|
||||
# Development
|
||||
# Wine development
|
||||
IF("${WINEBUILD_OUTPUT}" MATCHES "/opt/wine-devel/lib64/wine/libwinecrt0.a.*")
|
||||
SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /opt/wine-devel/lib/wine/libwinecrt0.a -luser32 -lkernel32 -lgdi32)
|
||||
ENDIF()
|
||||
# Staging
|
||||
# Wine staging
|
||||
IF("${WINEBUILD_OUTPUT}" MATCHES "/opt/wine-staging/lib64/wine/libwinecrt0.a.*")
|
||||
SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /opt/wine-staging/lib/wine/libwinecrt0.a -luser32 -lkernel32 -lgdi32)
|
||||
ENDIF()
|
||||
@@ -61,16 +61,15 @@ STRING(REPLACE " " ";" WINE_BUILD_FLAGS ${CMAKE_CXX_FLAGS} " " ${CMAKE_EXE_LINKE
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp"
|
||||
COMMAND ${WINE_CXX}
|
||||
ARGS "-I\"${CMAKE_BINARY_DIR}\""
|
||||
"-I\"${CMAKE_SOURCE_DIR}/include\""
|
||||
"-I\"${CMAKE_INSTALL_PREFIX}/include/wine/windows\""
|
||||
"-I\"${CMAKE_INSTALL_PREFIX}/include\""
|
||||
"-I\"${WINE_INCLUDE_BASE_DIR}\""
|
||||
"-L\"${WINE_LIBRARY_DIR}\""
|
||||
"\"${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp\""
|
||||
ARGS -I${CMAKE_BINARY_DIR}
|
||||
-I${CMAKE_SOURCE_DIR}/include
|
||||
-I${WINE_INCLUDE_BASE_DIR}
|
||||
-L${WINE_LIBRARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp
|
||||
-ansi -mwindows -lpthread ${EXTRA_FLAGS} -fno-omit-frame-pointer
|
||||
${WINE_BUILD_FLAGS}
|
||||
-o ../RemoteVstPlugin
|
||||
# Ensure correct file extension
|
||||
COMMAND sh -c "mv ../RemoteVstPlugin.exe ../RemoteVstPlugin || true"
|
||||
TARGET vstbase
|
||||
OUTPUTS ../RemoteVstPlugin
|
||||
|
||||