Skip to content

Commit

Permalink
configuration for default mod "velocity => filter cutoff"
Browse files Browse the repository at this point in the history
  • Loading branch information
davy7125 committed Sep 13, 2019
1 parent e3363e3 commit 1087b9a
Show file tree
Hide file tree
Showing 26 changed files with 1,305 additions and 920 deletions.
13 changes: 13 additions & 0 deletions sources/context/interface/configsectionsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "configsectionsound.h"
#include "ui_configsectionsound.h"
#include "contextmanager.h"
#include "modulatordata.h"

ConfigSectionSound::ConfigSectionSound(QWidget *parent) :
QWidget(parent),
Expand Down Expand Up @@ -76,6 +77,12 @@ void ConfigSectionSound::initialize()
ui->dialChoFrequence->blockSignals(true);
ui->dialChoFrequence->setValue(ContextManager::configuration()->getValue(ConfManager::SECTION_SOUND_ENGINE, "cho_frequency", 0).toInt());
ui->dialChoFrequence->blockSignals(false);

// Other
ui->comboVelToFilter->blockSignals(true);
ui->comboVelToFilter->setCurrentIndex(ContextManager::configuration()->getValue(ConfManager::SECTION_SOUND_ENGINE, "modulator_vel_to_filter", 1).toInt());
ModulatorData::MODULATOR_VEL_TO_FILTER_TYPE = ui->comboVelToFilter->currentIndex();
ui->comboVelToFilter->blockSignals(false);
}

void ConfigSectionSound::on_dialRevNiveau_valueChanged(int value)
Expand Down Expand Up @@ -118,3 +125,9 @@ void ConfigSectionSound::on_sliderGain_valueChanged(int value)
ContextManager::configuration()->setValue(ConfManager::SECTION_SOUND_ENGINE, "gain", value);
ui->labelGain->setText(QString::number(value));
}

void ConfigSectionSound::on_comboVelToFilter_currentIndexChanged(int index)
{
ContextManager::configuration()->setValue(ConfManager::SECTION_SOUND_ENGINE, "modulator_vel_to_filter", index);
ModulatorData::MODULATOR_VEL_TO_FILTER_TYPE = index;
}
1 change: 1 addition & 0 deletions sources/context/interface/configsectionsound.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private slots:
void on_dialChoAmplitude_valueChanged(int value);
void on_dialChoFrequence_valueChanged(int value);
void on_sliderGain_valueChanged(int value);
void on_comboVelToFilter_currentIndexChanged(int index);

private:
Ui::ConfigSectionSound *ui;
Expand Down
Loading

0 comments on commit 1087b9a

Please sign in to comment.