VST Automation: Filter for automated parameters
Filter to display only automated / all knobs (new button) on LMMS VST parametr control window. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
committed by
Tobias Doerffel
parent
ba03b70457
commit
5b6fa164e7
@@ -889,6 +889,19 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
|
||||
|
||||
l->addWidget( m_syncButton, 0, 0, 1, 2, Qt::AlignLeft );
|
||||
|
||||
m_displayAutomatedOnly = new QPushButton( tr( "Automated" ), this );
|
||||
connect( m_displayAutomatedOnly, SIGNAL( clicked() ), this,
|
||||
SLOT( displayAutomatedOnly() ) );
|
||||
m_displayAutomatedOnly->setWhatsThis(
|
||||
tr( "Click here if you want to display automated parameters only." ) );
|
||||
|
||||
l->addWidget( m_displayAutomatedOnly, 0, 1, 1, 2, Qt::AlignLeft );
|
||||
|
||||
for( int i = 0; i < 10; i++ )
|
||||
{
|
||||
l->addItem( new QSpacerItem( 68, 45, QSizePolicy::Fixed, QSizePolicy::Fixed ), 0, i );
|
||||
}
|
||||
|
||||
const QMap<QString, QString> & dump = m_vi->m_plugin->parameterDump();
|
||||
m_vi->paramCount = dump.size();
|
||||
|
||||
@@ -979,6 +992,31 @@ void manageVestigeInstrumentView::syncPlugin( void )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void manageVestigeInstrumentView::displayAutomatedOnly( void )
|
||||
{
|
||||
bool isAuto = QString::compare( m_displayAutomatedOnly->text(), tr( "Automated" ) ) == 0;
|
||||
|
||||
for( int i = 0; i< m_vi->paramCount; i++ )
|
||||
{
|
||||
|
||||
if( !( m_vi->knobFModel[ i ]->isAutomated() ||
|
||||
m_vi->knobFModel[ i ]->getControllerConnection() ) )
|
||||
{
|
||||
if( m_vi->vstKnobs[ i ]->isVisible() == true && isAuto )
|
||||
{
|
||||
m_vi->vstKnobs[ i ]->hide();
|
||||
m_displayAutomatedOnly->setText( "All" );
|
||||
} else {
|
||||
m_vi->vstKnobs[ i ]->show();
|
||||
m_displayAutomatedOnly->setText( "Automated" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
manageVestigeInstrumentView::~manageVestigeInstrumentView()
|
||||
{
|
||||
if( m_vi->knobFModel != NULL )
|
||||
|
||||
@@ -111,6 +111,7 @@ public:
|
||||
|
||||
protected slots:
|
||||
void syncPlugin( void );
|
||||
void displayAutomatedOnly( void );
|
||||
void setParameter( void );
|
||||
|
||||
|
||||
@@ -128,6 +129,7 @@ private:
|
||||
QWidget *widget;
|
||||
QGridLayout * l;
|
||||
QPushButton * m_syncButton;
|
||||
QPushButton * m_displayAutomatedOnly;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -331,6 +331,19 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
|
||||
l->addWidget( m_syncButton, 0, 0, 1, 2, Qt::AlignLeft );
|
||||
|
||||
m_displayAutomatedOnly = new QPushButton( tr( "Automated" ), widget );
|
||||
connect( m_displayAutomatedOnly, SIGNAL( clicked() ), this,
|
||||
SLOT( displayAutomatedOnly() ) );
|
||||
m_displayAutomatedOnly->setWhatsThis(
|
||||
tr( "Click here if you want to display automated parameters only." ) );
|
||||
|
||||
l->addWidget( m_displayAutomatedOnly, 0, 1, 1, 2, Qt::AlignLeft );
|
||||
|
||||
for( int i = 0; i < 10; i++ )
|
||||
{
|
||||
l->addItem( new QSpacerItem( 68, 45, QSizePolicy::Fixed, QSizePolicy::Fixed ), 0, i );
|
||||
}
|
||||
|
||||
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
|
||||
m_vi->paramCount = dump.size();
|
||||
|
||||
@@ -424,6 +437,30 @@ void manageVSTEffectView::syncPlugin( void )
|
||||
|
||||
|
||||
|
||||
void manageVSTEffectView::displayAutomatedOnly( void )
|
||||
{
|
||||
bool isAuto = QString::compare( m_displayAutomatedOnly->text(), tr( "Automated" ) ) == 0;
|
||||
|
||||
for( int i = 0; i< m_vi2->paramCount; i++ )
|
||||
{
|
||||
|
||||
if( !( m_vi2->knobFModel[ i ]->isAutomated() ||
|
||||
m_vi2->knobFModel[ i ]->getControllerConnection() ) )
|
||||
{
|
||||
if( m_vi2->vstKnobs[ i ]->isVisible() == true && isAuto )
|
||||
{
|
||||
m_vi2->vstKnobs[ i ]->hide();
|
||||
m_displayAutomatedOnly->setText( "All" );
|
||||
} else {
|
||||
m_vi2->vstKnobs[ i ]->show();
|
||||
m_displayAutomatedOnly->setText( "Automated" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void manageVSTEffectView::setParameter( void )
|
||||
{
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
|
||||
protected slots:
|
||||
void syncPlugin( void );
|
||||
void displayAutomatedOnly( void );
|
||||
void setParameter( void );
|
||||
|
||||
private:
|
||||
@@ -129,6 +130,7 @@ private:
|
||||
QGridLayout * l;
|
||||
|
||||
QPushButton * m_syncButton;
|
||||
QPushButton * m_displayAutomatedOnly;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user