Merge branch 'master' into cmake_dist
# Conflicts: # include/ConfigManager.h # include/Engine.h # plugins/CMakeLists.txt # plugins/vst_base/CMakeLists.txt # plugins/vst_base/Win64/CMakeLists.txt # src/core/Engine.cpp
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${SAMPLERATE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
ADD_SUBDIRECTORY(Amplifier)
|
||||
ADD_SUBDIRECTORY(audio_file_processor)
|
||||
ADD_SUBDIRECTORY(BassBooster)
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
EffectControls( effect ),
|
||||
m_effect ( effect ),
|
||||
m_delayTimeModel( 0.5, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
|
||||
m_delayTimeModel( 0.5, 0.01, 5.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
|
||||
m_feedbackModel(0.0f,0.0f,1.0f,0.01f,this,tr( "Feedback" ) ),
|
||||
m_lfoTimeModel(2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoAmountModel(0.0, 0.0, 2.0, 0.0001, 2000.0, this, tr ( "Lfo Amount" ) ),
|
||||
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" ) ),
|
||||
m_outGainModel( 0.0, -60.0, 20.0, 0.01, this, tr( "Output gain" ) )
|
||||
{
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) );
|
||||
|
||||
@@ -118,7 +118,7 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
m_delay->setFeedback( *feedbackPtr );
|
||||
m_lfo->setFrequency( *lfoTimePtr );
|
||||
sampleLength = *lengthPtr * Engine::mixer()->processingSampleRate();
|
||||
m_currentLength = linearInterpolate( sampleLength, m_currentLength, 0.9999 );
|
||||
m_currentLength = sampleLength;
|
||||
m_delay->setLength( m_currentLength + ( *amplitudePtr * ( float )m_lfo->tick() ) );
|
||||
m_delay->tick( buf[f] );
|
||||
|
||||
|
||||
@@ -57,24 +57,15 @@ StereoDelay::~StereoDelay()
|
||||
|
||||
void StereoDelay::tick( sampleFrame frame )
|
||||
{
|
||||
m_buffer[m_index][0] = frame[0];
|
||||
m_buffer[m_index][1] = frame[1];
|
||||
|
||||
int readIndex = m_index - ( int )m_length - 1;
|
||||
if( readIndex < 0 )
|
||||
{
|
||||
readIndex += m_maxLength;
|
||||
}
|
||||
float fract = 1.0f - fraction( m_length );
|
||||
frame[0] = linearInterpolate( m_buffer[readIndex][0] ,
|
||||
m_buffer[( readIndex+1) % m_maxLength][0], fract );
|
||||
frame[1] = linearInterpolate( m_buffer[readIndex][1] ,
|
||||
m_buffer[( readIndex+1) % m_maxLength][1], fract );
|
||||
|
||||
m_buffer[m_index][0] += frame[0] * m_feedback;
|
||||
m_buffer[m_index][1] += frame[1] * m_feedback;
|
||||
|
||||
m_index = ( m_index + 1) % (int) m_maxLength;
|
||||
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 );
|
||||
frame[ 0 ] = lOut;
|
||||
frame[ 1 ] = rOut;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ bool DualFilterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
if( ( ( *cut1Ptr != m_currentCut1 ||
|
||||
*res1Ptr != m_currentRes1 ) ) || m_filter1changed )
|
||||
{
|
||||
m_filter1->calcFilterCoeffs( *cut1Ptr, *res2Ptr );
|
||||
m_filter1->calcFilterCoeffs( *cut1Ptr, *res1Ptr );
|
||||
m_filter1changed = false;
|
||||
m_currentCut1 = *cut1Ptr;
|
||||
m_currentRes1 = *res1Ptr;
|
||||
|
||||
@@ -56,14 +56,14 @@ EqControls::EqControls( EqEffect *effect ) :
|
||||
m_para4FreqModel( 4000.0, 27.0, 20000, 0.001, this , tr( "Peak 4 freq" ) ),
|
||||
m_highShelfFreqModel( 12000.0, 27.0, 20000, 0.001, this , tr( "High shelf freq" ) ),
|
||||
m_lpFreqModel( 18000.0, 27.0, 20000, 0.001, this , tr( "LP freq" ) ),
|
||||
m_hpActiveModel( false, this , tr( "HP active" ) ),
|
||||
m_lowShelfActiveModel( false, this , tr( "Low shelf active" ) ),
|
||||
m_para1ActiveModel(false, this , tr( "Peak 1 active" ) ),
|
||||
m_para2ActiveModel( false, this , tr( "Peak 2 active" ) ),
|
||||
m_para3ActiveModel( false, this , tr( "Peak 3 active" ) ),
|
||||
m_para4ActiveModel( false, this , tr( "Peak 4 active" ) ),
|
||||
m_highShelfActiveModel( false, this , tr( "High shelf active" ) ),
|
||||
m_lpActiveModel( false, this , tr( "LP active" ) ),
|
||||
m_hpActiveModel( true, this , tr( "HP active" ) ),
|
||||
m_lowShelfActiveModel( true, this , tr( "Low shelf active" ) ),
|
||||
m_para1ActiveModel(true, this , tr( "Peak 1 active" ) ),
|
||||
m_para2ActiveModel( true, this , tr( "Peak 2 active" ) ),
|
||||
m_para3ActiveModel( true, this , tr( "Peak 3 active" ) ),
|
||||
m_para4ActiveModel( true, this , tr( "Peak 4 active" ) ),
|
||||
m_highShelfActiveModel( true, this , tr( "High shelf active" ) ),
|
||||
m_lpActiveModel( true, this , tr( "LP active" ) ),
|
||||
m_lp12Model( false, this , tr( "LP 12" ) ),
|
||||
m_lp24Model( false, this , tr( "LP 24" ) ),
|
||||
m_lp48Model( false, this , tr( "LP 48" ) ),
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "MonoDelay.h"
|
||||
#include "interpolation.h"
|
||||
#include "lmms_math.h"
|
||||
#include "string.h"
|
||||
|
||||
MonoDelay::MonoDelay( int maxTime , int sampleRate )
|
||||
{
|
||||
@@ -51,27 +52,14 @@ MonoDelay::~MonoDelay()
|
||||
|
||||
|
||||
|
||||
|
||||
void MonoDelay::tick( sample_t* sample )
|
||||
{
|
||||
m_buffer[m_index] = *sample;
|
||||
int readIndex = m_index - ( int )m_length - 1;
|
||||
if(readIndex < 0)
|
||||
{
|
||||
readIndex += m_maxLength;
|
||||
}
|
||||
float fract = 1.0f - fraction( m_length );
|
||||
if(readIndex != m_maxLength-1 )
|
||||
{
|
||||
*sample = linearInterpolate(m_buffer[readIndex] ,
|
||||
m_buffer[readIndex+1], fract );
|
||||
} else
|
||||
{
|
||||
*sample = linearInterpolate(m_buffer[readIndex] ,
|
||||
m_buffer[0], fract );
|
||||
}
|
||||
m_buffer[m_index] += *sample * m_feedback;
|
||||
m_index = ( m_index +1 ) % m_maxLength;
|
||||
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 );
|
||||
*sample = out;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,5 +73,6 @@ void MonoDelay::setSampleRate( int sampleRate )
|
||||
}
|
||||
|
||||
|
||||
m_buffer = new sample_t[( int )( sampleRate * m_maxTime )];
|
||||
m_buffer = new sample_t[( int )( sampleRate * m_maxTime ) ];
|
||||
memset( m_buffer, 0, sizeof(float) * ( int )( sampleRate * m_maxTime ) );
|
||||
}
|
||||
|
||||
@@ -1069,7 +1069,7 @@ void GigInstrumentView::showFileDialog()
|
||||
|
||||
if( QFileInfo( f ).isRelative() )
|
||||
{
|
||||
f = ConfigManager::inst()->userSamplesDir() + f;
|
||||
f = ConfigManager::inst()->gigDir() + f;
|
||||
|
||||
if( QFileInfo( f ).exists() == false )
|
||||
{
|
||||
@@ -1082,7 +1082,7 @@ void GigInstrumentView::showFileDialog()
|
||||
}
|
||||
else
|
||||
{
|
||||
ofd.setDirectory( ConfigManager::inst()->userSamplesDir() );
|
||||
ofd.setDirectory( ConfigManager::inst()->gigDir() );
|
||||
}
|
||||
|
||||
m_fileDialogButton->setEnabled( false );
|
||||
|
||||
@@ -286,11 +286,10 @@ static LADSPA_Handle instantiateMbeq(
|
||||
|
||||
// Create raised cosine window table
|
||||
for (i=0; i < FFT_LENGTH; i++) {
|
||||
window[i] = -0.5f*cos(2.0f*M_PI*(double)i/(double)FFT_LENGTH)+0.5f;
|
||||
window[i] *= 2.0f;
|
||||
window[i] = -0.5f * cos(2.0f*M_PI*(double)i/(double)FFT_LENGTH) + 0.5f;
|
||||
}
|
||||
|
||||
// Create db->coeffiecnt lookup table
|
||||
// Create db->coefficient lookup table
|
||||
db_table = malloc(1000 * sizeof(float));
|
||||
for (i=0; i < 1000; i++) {
|
||||
db = ((float)i/10) - 70;
|
||||
@@ -472,8 +471,12 @@ static void runMbeq(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
// Window into the output accumulator
|
||||
for (i = 0; i < FFT_LENGTH; i++) {
|
||||
out_accum[i] += 0.9186162f * window[i] * real[i]/(FFT_LENGTH * OVER_SAMP);
|
||||
// correction factor for window measured from white noise
|
||||
// reduce intermediate output by (number of coefficients) * OVER_SAMP
|
||||
out_accum[i] += real[i] * window[i] * 1.27519f /
|
||||
((FFT_LENGTH/2) * OVER_SAMP);
|
||||
}
|
||||
|
||||
for (i = 0; i < step_size; i++) {
|
||||
out_fifo[i] = out_accum[i];
|
||||
}
|
||||
|
||||
@@ -215,8 +215,9 @@ public:
|
||||
bool isSF2;
|
||||
bool hasNotes;
|
||||
MidiTime lastEnd;
|
||||
QString trackName;
|
||||
|
||||
smfMidiChannel * create( TrackContainer* tc )
|
||||
smfMidiChannel * create( TrackContainer* tc, QString tn )
|
||||
{
|
||||
if( !it ) {
|
||||
it = dynamic_cast<InstrumentTrack *>( Track::create( Track::InstrumentTrack, tc ) );
|
||||
@@ -238,7 +239,10 @@ public:
|
||||
#else
|
||||
it_inst = it->loadInstrument( "patman" );
|
||||
#endif
|
||||
|
||||
trackName = tn;
|
||||
if( trackName != "") {
|
||||
it->setName( tn );
|
||||
}
|
||||
lastEnd = 0;
|
||||
}
|
||||
return this;
|
||||
@@ -353,6 +357,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
// Tracks
|
||||
for( int t = 0; t < seq->tracks(); ++t )
|
||||
{
|
||||
QString trackName = "";
|
||||
Alg_track_ptr trk = seq->track( t );
|
||||
pd.setValue( t + preTrackSteps );
|
||||
|
||||
@@ -368,15 +373,34 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
|
||||
if( evt->chan == -1 )
|
||||
{
|
||||
printf("MISSING GLOBAL THINGY\n");
|
||||
printf(" %d %d %f %s\n", (int) evt->chan,
|
||||
evt->get_type_code(), evt->time,
|
||||
evt->get_attribute() );
|
||||
// Global stuff
|
||||
bool handled = false;
|
||||
if( evt->is_update() )
|
||||
{
|
||||
QString attr = evt->get_attribute();
|
||||
if( attr == "tracknames" && evt->get_update_type() == 'a' ) {
|
||||
trackName = evt->get_atom_value();
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
if( !handled ) {
|
||||
// Write debug output
|
||||
printf("MISSING GLOBAL HANDLER\n");
|
||||
printf(" Chn: %d, Type Code: %d, Time: %f", (int) evt->chan,
|
||||
evt->get_type_code(), evt->time );
|
||||
if ( evt->is_update() )
|
||||
{
|
||||
printf( ", Update Type: %s", evt->get_attribute() );
|
||||
if ( evt->get_update_type() == 'a' )
|
||||
{
|
||||
printf( ", Atom: %s", evt->get_atom_value() );
|
||||
}
|
||||
}
|
||||
printf( "\n" );
|
||||
}
|
||||
}
|
||||
else if( evt->is_note() && evt->chan < 256 )
|
||||
{
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc );
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc, trackName );
|
||||
Alg_note_ptr noteEvt = dynamic_cast<Alg_note_ptr>( evt );
|
||||
|
||||
Note n( noteEvt->get_duration() * ticksPerBeat,
|
||||
@@ -389,7 +413,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
|
||||
else if( evt->is_update() )
|
||||
{
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc );
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc, trackName );
|
||||
|
||||
double time = evt->time*ticksPerBeat;
|
||||
QString update( evt->get_attribute() );
|
||||
@@ -415,12 +439,6 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( update == "tracknames" )
|
||||
{
|
||||
QString trackName( evt->get_string_value() );
|
||||
ch->it->setName( trackName );
|
||||
//ch.p->setName( trackName );
|
||||
}
|
||||
|
||||
else if( update.startsWith( "control" ) || update == "bendr" )
|
||||
{
|
||||
|
||||
@@ -716,7 +716,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
|
||||
void AudioFileProcessorView::sampleUpdated( void )
|
||||
{
|
||||
newWaveView();
|
||||
m_waveView->updateSampleRange();
|
||||
m_waveView->update();
|
||||
update();
|
||||
}
|
||||
@@ -733,7 +733,7 @@ void AudioFileProcessorView::openAudioFile( void )
|
||||
{
|
||||
castModel<audioFileProcessor>()->setAudioFile( af );
|
||||
Engine::getSong()->setModified();
|
||||
newWaveView();
|
||||
m_waveView->updateSampleRange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,6 +759,16 @@ void AudioFileProcessorView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::updateSampleRange()
|
||||
{
|
||||
if( m_sampleBuffer.frames() > 1 )
|
||||
{
|
||||
const f_cnt_t marging = ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * 0.1;
|
||||
m_from = qMax( 0, m_sampleBuffer.startFrame() - marging );
|
||||
m_to = qMin( m_sampleBuffer.endFrame() + marging, m_sampleBuffer.frames() );
|
||||
}
|
||||
}
|
||||
|
||||
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, SampleBuffer& buf ) :
|
||||
QWidget( _parent ),
|
||||
m_sampleBuffer( buf ),
|
||||
@@ -779,12 +789,7 @@ AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _
|
||||
setFixedSize( _w, _h );
|
||||
setMouseTracking( true );
|
||||
|
||||
if( m_sampleBuffer.frames() > 1 )
|
||||
{
|
||||
const f_cnt_t marging = ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * 0.1;
|
||||
m_from = qMax( 0, m_sampleBuffer.startFrame() - marging );
|
||||
m_to = qMin( m_sampleBuffer.endFrame() + marging, m_sampleBuffer.frames() );
|
||||
}
|
||||
updateSampleRange();
|
||||
|
||||
m_graph.fill( Qt::transparent );
|
||||
update();
|
||||
|
||||
@@ -261,6 +261,7 @@ public:
|
||||
void setKnobs(knob *_start, knob *_end, knob *_loop );
|
||||
|
||||
|
||||
void updateSampleRange();
|
||||
private:
|
||||
void zoom( const bool _out = false );
|
||||
void slide( int _px );
|
||||
|
||||
@@ -263,6 +263,9 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco
|
||||
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
|
||||
handleUiClosed();
|
||||
break;
|
||||
case NATIVE_HOST_OPCODE_HOST_IDLE:
|
||||
qApp->processEvents();
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -141,9 +141,6 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
vib_depth_mdl(false, this, tr( "Vibrato Depth" ) ),
|
||||
trem_depth_mdl(false, this, tr( "Tremolo Depth" ) )
|
||||
{
|
||||
// Connect the plugin to the mixer...
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
// Create an emulator - samplerate, 16 bit, mono
|
||||
emulatorMutex.lock();
|
||||
@@ -220,6 +217,10 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
MOD_CON( fm_mdl );
|
||||
MOD_CON( vib_depth_mdl );
|
||||
MOD_CON( trem_depth_mdl );
|
||||
|
||||
// Connect the plugin to the mixer...
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
opl2instrument::~opl2instrument() {
|
||||
|
||||
@@ -118,9 +118,6 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
// everytime we load a new soundfont.
|
||||
m_synth = new_fluid_synth( m_settings );
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
loadFile( ConfigManager::inst()->defaultSoundfont() );
|
||||
|
||||
updateSampleRate();
|
||||
@@ -152,6 +149,8 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
connect( &m_chorusSpeed, SIGNAL( dataChanged() ), this, SLOT( updateChorus() ) );
|
||||
connect( &m_chorusDepth, SIGNAL( dataChanged() ), this, SLOT( updateChorus() ) );
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
|
||||
@@ -928,7 +927,7 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
m_chorusButton->move( 14, 226 );
|
||||
m_chorusButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "chorus_on" ) );
|
||||
m_chorusButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "chorus_off" ) );
|
||||
ToolTip::add( m_reverbButton, tr( "Apply chorus (if supported)" ) );
|
||||
ToolTip::add( m_chorusButton, tr( "Apply chorus (if supported)" ) );
|
||||
m_chorusButton->setWhatsThis(
|
||||
tr( "This button enables the chorus effect. "
|
||||
"This is useful for cool echo effects, but only works on "
|
||||
@@ -1068,7 +1067,7 @@ void sf2InstrumentView::showFileDialog()
|
||||
QString f = k->m_filename;
|
||||
if( QFileInfo( f ).isRelative() )
|
||||
{
|
||||
f = ConfigManager::inst()->userSamplesDir() + f;
|
||||
f = ConfigManager::inst()->sf2Dir() + f;
|
||||
if( QFileInfo( f ).exists() == false )
|
||||
{
|
||||
f = ConfigManager::inst()->factorySamplesDir() + k->m_filename;
|
||||
@@ -1079,7 +1078,7 @@ void sf2InstrumentView::showFileDialog()
|
||||
}
|
||||
else
|
||||
{
|
||||
ofd.setDirectory( ConfigManager::inst()->userSamplesDir() );
|
||||
ofd.setDirectory( ConfigManager::inst()->sf2Dir() );
|
||||
}
|
||||
|
||||
m_fileDialogButton->setEnabled( false );
|
||||
|
||||
@@ -133,9 +133,10 @@ void SfxrSynth::resetSample( bool restart )
|
||||
env_vol=0.0f;
|
||||
env_stage=0;
|
||||
env_time=0;
|
||||
env_length[0]=(int)(s->m_attModel.value()*s->m_attModel.value()*100000.0f);
|
||||
env_length[1]=(int)(s->m_holdModel.value()*s->m_holdModel.value()*100000.0f);
|
||||
env_length[2]=(int)(s->m_decModel.value()*s->m_decModel.value()*100000.0f);
|
||||
|
||||
env_length[0]=(int)(s->m_attModel.value()*s->m_attModel.value()*99999.0f)+1;
|
||||
env_length[1]=(int)(s->m_holdModel.value()*s->m_holdModel.value()*99999.0f)+1;
|
||||
env_length[2]=(int)(s->m_decModel.value()*s->m_decModel.value()*99999.0f)+1;
|
||||
|
||||
fphase=pow(s->m_phaserOffsetModel.value(), 2.0f)*1020.0f;
|
||||
if(s->m_phaserOffsetModel.value()<0.0f) fphase=-fphase;
|
||||
@@ -337,8 +338,8 @@ sfxrInstrument::sfxrInstrument( InstrumentTrack * _instrument_track ) :
|
||||
m_changeAmtModel(0.0f, this, "Change Amount"),
|
||||
m_changeSpeedModel(0.0f, this, "Change Speed"),
|
||||
|
||||
m_sqrDutyModel(0.0f, this, "Squre Duty"),
|
||||
m_sqrSweepModel(0.0f, this, "Squre Sweep"),
|
||||
m_sqrDutyModel(0.0f, this, "Square Duty"),
|
||||
m_sqrSweepModel(0.0f, this, "Duty Sweep"),
|
||||
|
||||
m_repeatSpeedModel(0.0f, this, "Repeat Speed"),
|
||||
|
||||
@@ -633,8 +634,8 @@ sfxrInstrumentView::sfxrInstrumentView( Instrument * _instrument,
|
||||
m_changeAmtKnob ->setObjectName( "changeKnob" );
|
||||
m_changeSpeedKnob ->setObjectName( "changeKnob" );
|
||||
|
||||
createKnob(m_sqrDutyKnob, KNOBS_BASE_X+KNOB_BLOCK_SIZE_X*3, KNOBS_BASE_Y+KNOB_BLOCK_SIZE_Y*2, "Squre Duty(Square wave only)");
|
||||
createKnob(m_sqrSweepKnob, KNOBS_BASE_X+KNOB_BLOCK_SIZE_X*4, KNOBS_BASE_Y+KNOB_BLOCK_SIZE_Y*2, "Squre Sweep(Square wave only)");
|
||||
createKnob(m_sqrDutyKnob, KNOBS_BASE_X+KNOB_BLOCK_SIZE_X*3, KNOBS_BASE_Y+KNOB_BLOCK_SIZE_Y*2, "Square Duty (Square wave only)");
|
||||
createKnob(m_sqrSweepKnob, KNOBS_BASE_X+KNOB_BLOCK_SIZE_X*4, KNOBS_BASE_Y+KNOB_BLOCK_SIZE_Y*2, "Duty Sweep (Square wave only)");
|
||||
|
||||
m_sqrDutyKnob ->setObjectName( "sqrKnob" );
|
||||
m_sqrSweepKnob ->setObjectName( "sqrKnob" );
|
||||
|
||||
@@ -263,8 +263,8 @@ private:
|
||||
Knob * m_changeAmtKnob; //Change Amount
|
||||
Knob * m_changeSpeedKnob; //Change Speed
|
||||
|
||||
Knob * m_sqrDutyKnob; //Squre Duty
|
||||
Knob * m_sqrSweepKnob; //Squre Sweep
|
||||
Knob * m_sqrDutyKnob; //Square Wave Duty
|
||||
Knob * m_sqrSweepKnob; //Square Wave Duty Sweep
|
||||
|
||||
Knob * m_repeatSpeedKnob; //Repeat Speed
|
||||
|
||||
@@ -278,8 +278,8 @@ private:
|
||||
Knob * m_hpFilCutSweepKnob; //HP Filter Cutoff Sweep
|
||||
|
||||
automatableButtonGroup * m_waveBtnGroup;
|
||||
PixmapButton * m_sqrWaveBtn; //NOTE: This button has Squre Duty
|
||||
//and Squre Speed configurable
|
||||
PixmapButton * m_sqrWaveBtn; //NOTE: This button has Square Duty
|
||||
//and Square Speed configurable
|
||||
PixmapButton * m_sawWaveBtn;
|
||||
PixmapButton * m_sinWaveBtn;
|
||||
PixmapButton * m_noiseWaveBtn;
|
||||
|
||||
@@ -335,6 +335,16 @@ malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument,
|
||||
m_spreadKnob->setLabel( tr( "Spread" ) );
|
||||
m_spreadKnob->move( 190, 140 );
|
||||
m_spreadKnob->setHintText( tr( "Spread:" ), "" );
|
||||
|
||||
// try to inform user about missing Stk-installation
|
||||
if( _instrument->m_filesMissing && Engine::hasGUI() )
|
||||
{
|
||||
QMessageBox::information( 0, tr( "Missing files" ),
|
||||
tr( "Your Stk-installation seems to be "
|
||||
"incomplete. Please make sure "
|
||||
"the full Stk-package is installed!" ),
|
||||
QMessageBox::Ok );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,13 +5,14 @@ INCLUDE(BuildPlugin)
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
|
||||
ADD_EXECUTABLE(RemoteVstPlugin "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp")
|
||||
|
||||
IF(QT5)
|
||||
TARGET_LINK_LIBRARIES(RemoteVstPlugin Qt5::Core)
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(RemoteVstPlugin -lQtCore4)
|
||||
ENDIF()
|
||||
TARGET_LINK_LIBRARIES(RemoteVstPlugin -lpthread -lgdi32 -lws2_32)
|
||||
SET_TARGET_PROPERTIES(RemoteVstPlugin PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O3")
|
||||
SET_TARGET_PROPERTIES(RemoteVstPlugin PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O0")
|
||||
ADD_CUSTOM_COMMAND(TARGET RemoteVstPlugin POST_BUILD COMMAND "${STRIP}" "$<TARGET_FILE:RemoteVstPlugin>")
|
||||
INSTALL(TARGETS RemoteVstPlugin RUNTIME DESTINATION "${PLUGIN_DIR}")
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ ADD_EXECUTABLE(RemoteVstPlugin32 "${CMAKE_CURRENT_SOURCE_DIR}/../RemoteVstPlugin
|
||||
TARGET_LINK_LIBRARIES(RemoteVstPlugin32 -lQtCore4 -lpthread -lgdi32 -lws2_32)
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET RemoteVstPlugin32 POST_BUILD COMMAND "${STRIP}" "$<TARGET_FILE:RemoteVstPlugin32>")
|
||||
SET_TARGET_PROPERTIES(RemoteVstPlugin32 PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O3")
|
||||
SET_TARGET_PROPERTIES(RemoteVstPlugin32 PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O0")
|
||||
|
||||
INSTALL(TARGETS RemoteVstPlugin32 RUNTIME DESTINATION "${PLUGIN_DIR}/32")
|
||||
INSTALL(FILES "${MINGW_PREFIX32}/bin/QtCore4.dll" "${MINGW_PREFIX32}/bin/zlib1.dll" "${MINGW_PREFIX32}/${CMAKE_SYSTEM_PROCESSOR32}-w64-mingw32/bin/libwinpthread-1.dll"
|
||||
|
||||
@@ -147,7 +147,7 @@ ENDIF(LMMS_BUILD_WIN32)
|
||||
|
||||
# FLTK needs X
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -ldl)
|
||||
TARGET_LINK_LIBRARIES(RemoteZynAddSubFx ${CMAKE_DL_LIBS})
|
||||
ENDIF(LMMS_BUILD_LINUX)
|
||||
|
||||
|
||||
|
||||
@@ -350,14 +350,16 @@ bool ZynAddSubFxInstrument::handleMidiEvent( const MidiEvent& event, const MidiT
|
||||
return true;
|
||||
}
|
||||
|
||||
MidiEvent localEvent = event;
|
||||
localEvent.setChannel( 0 );
|
||||
m_pluginMutex.lock();
|
||||
if( m_remotePlugin )
|
||||
{
|
||||
m_remotePlugin->processMidiEvent( event, 0 );
|
||||
m_remotePlugin->processMidiEvent( localEvent, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plugin->processMidiEvent( event );
|
||||
m_plugin->processMidiEvent( localEvent );
|
||||
}
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user