Skip to content

Commit 1087b9a

Browse files
committed
configuration for default mod "velocity => filter cutoff"
1 parent e3363e3 commit 1087b9a

26 files changed

+1305
-920
lines changed

sources/context/interface/configsectionsound.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "configsectionsound.h"
2626
#include "ui_configsectionsound.h"
2727
#include "contextmanager.h"
28+
#include "modulatordata.h"
2829

2930
ConfigSectionSound::ConfigSectionSound(QWidget *parent) :
3031
QWidget(parent),
@@ -76,6 +77,12 @@ void ConfigSectionSound::initialize()
7677
ui->dialChoFrequence->blockSignals(true);
7778
ui->dialChoFrequence->setValue(ContextManager::configuration()->getValue(ConfManager::SECTION_SOUND_ENGINE, "cho_frequency", 0).toInt());
7879
ui->dialChoFrequence->blockSignals(false);
80+
81+
// Other
82+
ui->comboVelToFilter->blockSignals(true);
83+
ui->comboVelToFilter->setCurrentIndex(ContextManager::configuration()->getValue(ConfManager::SECTION_SOUND_ENGINE, "modulator_vel_to_filter", 1).toInt());
84+
ModulatorData::MODULATOR_VEL_TO_FILTER_TYPE = ui->comboVelToFilter->currentIndex();
85+
ui->comboVelToFilter->blockSignals(false);
7986
}
8087

8188
void ConfigSectionSound::on_dialRevNiveau_valueChanged(int value)
@@ -118,3 +125,9 @@ void ConfigSectionSound::on_sliderGain_valueChanged(int value)
118125
ContextManager::configuration()->setValue(ConfManager::SECTION_SOUND_ENGINE, "gain", value);
119126
ui->labelGain->setText(QString::number(value));
120127
}
128+
129+
void ConfigSectionSound::on_comboVelToFilter_currentIndexChanged(int index)
130+
{
131+
ContextManager::configuration()->setValue(ConfManager::SECTION_SOUND_ENGINE, "modulator_vel_to_filter", index);
132+
ModulatorData::MODULATOR_VEL_TO_FILTER_TYPE = index;
133+
}

sources/context/interface/configsectionsound.h

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ private slots:
4949
void on_dialChoAmplitude_valueChanged(int value);
5050
void on_dialChoFrequence_valueChanged(int value);
5151
void on_sliderGain_valueChanged(int value);
52+
void on_comboVelToFilter_currentIndexChanged(int index);
5253

5354
private:
5455
Ui::ConfigSectionSound *ui;

0 commit comments

Comments
 (0)