-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automation support for Carla. #4569
Conversation
Hi! Thanks for this PR. We're on feature freeze for 1.2 - sorry this isn't more obvious! Could you open a new PR with the same commits added to the master branch? |
floatModels[i]->loadSettings( settingsElem, idStr ); | ||
|
||
// Connect to signal dataChanged to knobChanged function. | ||
connect( floatModels[i], &FloatModel::dataChanged, [=]() { knobModelChanged(i); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connecting slots to functors is not supported in Qt4. You have two choices:
- Use normal
SIGNAL()
/SLOT()
and usesender()
to detect the sender(what we already do for VSTs) - Keep this syntax and switch to
master
branch which has dropped the support for Qt4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think you should use Qt::DirectConnection
because automated changes will be handled in the UI thread if you use the normal connection type. It may prevent automation working correctly when exporting.
#include <QHBoxLayout> | ||
#include <QSizePolicy> | ||
#include <QScrollArea> | ||
#include <QtDebug> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend you including <QDebug>
instead which does the same thing.
@@ -33,13 +33,20 @@ | |||
#include "InstrumentPlayHandle.h" | |||
#include "InstrumentTrack.h" | |||
#include "Mixer.h" | |||
#include "Knob.h" | |||
#include "EffectControls.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you will not need to include EffectControls.h
here as well as in carla.h
.
sizePolicy.setVerticalStretch(0); | ||
sizePolicy.setHeightForWidth(m_refreshParamsButton->sizePolicy().hasHeightForWidth()); | ||
m_refreshParamsButton->setSizePolicy(sizePolicy); | ||
m_refreshParamsButton->setCheckable( false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixing old and new coding styles doesn't look good. I suggest putting whitespaces either anywhere or nowhere.
|
||
private: | ||
virtual void modelChanged(); | ||
virtual void timerEvent(QTimerEvent*); | ||
|
||
void addKnob(FloatModel& knobModel); | ||
void clearKnobs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our coding convention says you should use tabs, but most part of this file uses spaces. I don't know which one will be better, but please don't mix them like this. You can change indentation after some discussions.
Thanks for the response guys. @SecondFlight ; Sure thing my fault. New pull request in master here: #4571 |
This will read Carla's slots and add knobs to the plugin widget.