MCPcopy Create free account
hub / github.com/LMMS/lmms / syncPlugin

Method syncPlugin

plugins/VstEffect/VstEffectControls.cpp:444–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442
443
444void manageVSTEffectView::syncPlugin( void )
445{
446 char paramStr[35];
447 QStringList s_dumpValues;
448 const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
449 float f_value;
450
451 for( int i = 0; i < m_vi2->paramCount; i++ )
452 {
453 // only not automated knobs are synced from VST
454 // those auto-setted values are not jurnaled, tracked for undo / redo
455 if( !( m_vi2->knobFModel[ i ]->isAutomated() ||
456 m_vi2->knobFModel[ i ]->controllerConnection() ) )
457 {
458 sprintf( paramStr, "param%d", i );
459 s_dumpValues = dump[ paramStr ].split( ":" );
460 f_value = LocaleHelper::toFloat(s_dumpValues.at(2));
461 m_vi2->knobFModel[ i ]->setAutomatedValue( f_value );
462 m_vi2->knobFModel[ i ]->setInitValue( f_value );
463 }
464 }
465}
466
467
468

Callers

nothing calls this directly

Calls 4

toFloatFunction · 0.85
setAutomatedValueMethod · 0.80
setInitValueMethod · 0.80
isAutomatedMethod · 0.45

Tested by

no test coverage detected