"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/VstEffect/VstEffectControls.cpp" between
lmms-1.2.0-rc7.tar.gz and lmms-1.2.0-rc8.tar.gz

About: LMMS (Linux MultiMedia Studio) is a sound generation system (creation of melodies and beats, synthesis and mixing of sounds, arranging of samples; full MIDI support). Release candidate.

VstEffectControls.cpp  (lmms-1.2.0-rc7):VstEffectControls.cpp  (lmms-1.2.0-rc8)
skipping to change at line 85 skipping to change at line 85
knobFModel[i] = new FloatModel( 0.0f, 0.0f, 1.0f, 0.01f, this, QString::number(i) ); knobFModel[i] = new FloatModel( 0.0f, 0.0f, 1.0f, 0.01f, this, QString::number(i) );
knobFModel[i]->loadSettings( _this, paramStr ); knobFModel[i]->loadSettings( _this, paramStr );
if( !( knobFModel[ i ]->isAutomated() || if( !( knobFModel[ i ]->isAutomated() ||
knobFModel[ i ]->controllerConnec tion() ) ) knobFModel[ i ]->controllerConnec tion() ) )
{ {
knobFModel[ i ]->setValue(LocaleHelper::toFloat(s _dumpValues.at(2))); knobFModel[ i ]->setValue(LocaleHelper::toFloat(s _dumpValues.at(2)));
knobFModel[ i ]->setInitValue(LocaleHelper::toFlo at(s_dumpValues.at(2))); knobFModel[ i ]->setInitValue(LocaleHelper::toFlo at(s_dumpValues.at(2)));
} }
connect( knobFModel[i], SIGNAL( dataChanged() ), this, SL #if QT_VERSION < 0x050000
OT( setParameter() ) ); connect( knobFModel[i], SIGNAL( dataChanged( Model * ) ),
this, SLOT( setParameter( Model * ) ), Qt::Direct
Connection );
#else
connect( knobFModel[i], &FloatModel::dataChanged, this,
[this, i]() { setParameter( knobFModel[i] ); }, Q
t::DirectConnection);
#endif
} }
} }
m_effect->m_pluginMutex.unlock(); m_effect->m_pluginMutex.unlock();
} }
void VstEffectControls::setParameter( void ) void VstEffectControls::setParameter( Model * action )
{ {
Model *action = qobject_cast<Model *>(sender());
int knobUNID = action->displayName().toInt(); int knobUNID = action->displayName().toInt();
if ( m_effect->m_plugin != NULL ) { if ( m_effect->m_plugin != NULL ) {
m_effect->m_plugin->setParam( knobUNID, knobFModel[knobUNID]->val ue() ); m_effect->m_plugin->setParam( knobUNID, knobFModel[knobUNID]->val ue() );
} }
} }
void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this ) void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
{ {
_this.setAttribute( "plugin", m_effect->m_key.attributes["file"] ); _this.setAttribute( "plugin", m_effect->m_key.attributes["file"] );
skipping to change at line 338 skipping to change at line 342
vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" ); vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) ); vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
if( !hasKnobModel ) if( !hasKnobModel )
{ {
sprintf( paramStr, "%d", i); sprintf( paramStr, "%d", i);
m_vi->knobFModel[ i ] = new FloatModel( LocaleHelper::toF loat(s_dumpValues.at(2)), m_vi->knobFModel[ i ] = new FloatModel( LocaleHelper::toF loat(s_dumpValues.at(2)),
0.0f, 1.0f, 0.01f, _eff, tr( paramStr ) ) ; 0.0f, 1.0f, 0.01f, _eff, tr( paramStr ) ) ;
} }
connect( m_vi->knobFModel[ i ], SIGNAL( dataChanged() ), this,
SLOT( setParamete FloatModel * model = m_vi->knobFModel[i];
r() ) ); #if QT_VERSION < 0x050000
vstKnobs[ i ] ->setModel( m_vi->knobFModel[ i ] ); connect( model, SIGNAL( dataChanged( Model * ) ), this,
SLOT( setParameter( Model * ) ), Qt::DirectConnection );
#else
connect( model, &FloatModel::dataChanged, this,
[this, model]() { setParameter( model ); }, Qt::DirectCon
nection);
#endif
vstKnobs[ i ] ->setModel( model );
} }
int i = 0; int i = 0;
for( int lrow = 1; lrow < ( int( m_vi->paramCount / 10 ) + 1 ) + 1; lrow+ + ) for( int lrow = 1; lrow < ( int( m_vi->paramCount / 10 ) + 1 ) + 1; lrow+ + )
{ {
for( int lcolumn = 0; lcolumn < 10; lcolumn++ ) for( int lcolumn = 0; lcolumn < 10; lcolumn++ )
{ {
if( i < m_vi->paramCount ) if( i < m_vi->paramCount )
{ {
l->addWidget( vstKnobs[i], lrow, lcolumn, Qt::Ali gnCenter ); l->addWidget( vstKnobs[i], lrow, lcolumn, Qt::Ali gnCenter );
skipping to change at line 422 skipping to change at line 433
vstKnobs[ i ]->hide(); vstKnobs[ i ]->hide();
m_displayAutomatedOnly->setText( "All" ); m_displayAutomatedOnly->setText( "All" );
} else { } else {
vstKnobs[ i ]->show(); vstKnobs[ i ]->show();
m_displayAutomatedOnly->setText( "Automated" ); m_displayAutomatedOnly->setText( "Automated" );
} }
} }
} }
} }
void manageVSTEffectView::setParameter( void ) void manageVSTEffectView::setParameter( Model * action )
{ {
Model *action = qobject_cast<Model *>(sender());
int knobUNID = action->displayName().toInt(); int knobUNID = action->displayName().toInt();
if ( m_effect->m_plugin != NULL ) { if ( m_effect->m_plugin != NULL ) {
m_effect->m_plugin->setParam( knobUNID, m_vi2->knobFModel[knobUNI D]->value() ); m_effect->m_plugin->setParam( knobUNID, m_vi2->knobFModel[knobUNI D]->value() );
} }
} }
manageVSTEffectView::~manageVSTEffectView() manageVSTEffectView::~manageVSTEffectView()
{ {
if( m_vi2->knobFModel != NULL ) if( m_vi2->knobFModel != NULL )
 End of changes. 6 change blocks. 
12 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)