cleanup envelope parameter mappings
This commit is contained in:
@@ -11,16 +11,16 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
audio_(new AudioEngine()),
|
||||
keyboard_(audio_->noteQueue()) {
|
||||
|
||||
// Initialize UI
|
||||
// initialize ui
|
||||
ui_->setupUi(this);
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
|
||||
// connect scope
|
||||
ui_->scopeWidget->setScopeBuffer(&audioEngine_->scopeBuffer());
|
||||
|
||||
// Connect buttons to slots
|
||||
connect(ui_->buttonReset, &QPushButton::clicked, this, &MainWindow::onResetClicked);
|
||||
|
||||
// synth business
|
||||
audio_->start();
|
||||
|
||||
// connect envelopeGenerator
|
||||
ui_->envelopeOsc1Volume->init(EnvelopeId::Osc1Volume);
|
||||
connect(ui_->envelopeOsc1Volume, &EnvelopeGenerator::envelopeChanged,
|
||||
@@ -28,6 +28,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
audio_->parameters()->set(EnvelopeId::Osc1Volume, a, d, s, r);
|
||||
});
|
||||
// this should be easy enough to put into a for each envelopeGenerator loop
|
||||
|
||||
// synth business
|
||||
audio_->start();
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<height>800</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -51,6 +51,19 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Scope" name="scope" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>540</y>
|
||||
<width>400</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
@@ -60,6 +73,12 @@
|
||||
<header>EnvelopeGenerator/EnvelopeGenerator.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Scope</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Scope/Scope.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
explicit EnvelopeGenerator(QWidget* parent = nullptr);
|
||||
~EnvelopeGenerator();
|
||||
|
||||
// connects signals, sets parameters to the defaults defined in paramStore
|
||||
void init(EnvelopeId id);
|
||||
|
||||
// setters
|
||||
|
||||
Reference in New Issue
Block a user