VST Automation: Sync button fix
Only not automated values are synced from VST plugin, no need to sync already automated values. Synced values are now not trackable with undo / redo, before all changes were tracked individualy, but user could lose ability to undo easily changes before sync buton was pressed. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
committed by
Tobias Doerffel
parent
c2e9918c8a
commit
e8bdc7b3c1
@@ -950,16 +950,23 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
|
||||
void manageVestigeInstrumentView::syncPlugin( void )
|
||||
{
|
||||
char paramStr[35];
|
||||
QStringList list1;
|
||||
QStringList s_dumpValues;
|
||||
const QMap<QString, QString> & dump = m_vi->m_plugin->parameterDump();
|
||||
float f;
|
||||
float f_value;
|
||||
|
||||
for (int i = 0; i<(dump).size(); i++) {
|
||||
sprintf( paramStr, "param%d", i);
|
||||
list1 = dump[paramStr].split(":");
|
||||
f = (list1.at(2)).toFloat();
|
||||
m_vi->knobFModel[i]->setValue(f);
|
||||
m_vi->knobFModel[i]->setInitValue(f);
|
||||
for( int i = 0; i < m_vi->paramCount; i++ )
|
||||
{
|
||||
// only not automated knobs are synced from VST
|
||||
// those auto-setted values are not jurnaled, tracked for undo / redo
|
||||
if( !( m_vi->knobFModel[ i ]->isAutomated() ||
|
||||
m_vi->knobFModel[ i ]->getControllerConnection() ) )
|
||||
{
|
||||
sprintf( paramStr, "param%d", i );
|
||||
s_dumpValues = dump[ paramStr ].split( ":" );
|
||||
f_value = ( s_dumpValues.at( 2 ) ).toFloat();
|
||||
m_vi->knobFModel[ i ]->setAutomatedValue( f_value );
|
||||
m_vi->knobFModel[ i ]->setInitValue( f_value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -394,16 +394,23 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
void manageVSTEffectView::syncPlugin( void )
|
||||
{
|
||||
char paramStr[35];
|
||||
QStringList list1;
|
||||
QStringList s_dumpValues;
|
||||
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
|
||||
float f;
|
||||
float f_value;
|
||||
|
||||
for (int i = 0; i<(dump).size(); i++) {
|
||||
sprintf( paramStr, "param%d", i);
|
||||
list1 = dump[paramStr].split(":");
|
||||
f = (list1.at(2)).toFloat();
|
||||
m_vi2->knobFModel[i]->setValue(f);
|
||||
m_vi2->knobFModel[i]->setInitValue(f);
|
||||
for( int i = 0; i < m_vi2->paramCount; i++ )
|
||||
{
|
||||
// only not automated knobs are synced from VST
|
||||
// those auto-setted values are not jurnaled, tracked for undo / redo
|
||||
if( !( m_vi2->knobFModel[ i ]->isAutomated() ||
|
||||
m_vi2->knobFModel[ i ]->getControllerConnection() ) )
|
||||
{
|
||||
sprintf( paramStr, "param%d", i );
|
||||
s_dumpValues = dump[ paramStr ].split( ":" );
|
||||
f_value = ( s_dumpValues.at( 2 ) ).toFloat();
|
||||
m_vi2->knobFModel[ i ]->setAutomatedValue( f_value );
|
||||
m_vi2->knobFModel[ i ]->setInitValue( f_value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user