Skip to content

Commit

Permalink
- แก้ เล่นเพลงบางเพลงแล้วโปรแกรมปิดเอง
Browse files Browse the repository at this point in the history
เช่น เพลง รักจริงให้ติงนัง	รุ่ง สุริยา   เพลง วิญญาณ		แสตมป์ อภิวัชร์	
- เพิ่ม FX Label
  • Loading branch information
pie62 committed Apr 11, 2018
1 parent 68d0d7a commit 835f4e7
Show file tree
Hide file tree
Showing 41 changed files with 904 additions and 48 deletions.
16 changes: 9 additions & 7 deletions Dialogs/SynthMixerDialog.cpp
Expand Up @@ -7,13 +7,14 @@
#include "Dialogs/VSTDialog.h"
#include "Dialogs/BusDialog.h"

#include "FXDialog/AutoWahFXDialog.h".h"
#include "FXDialog/ChorusFXDialog.h"
#include "FXDialog/CompressorFXDialog.h"
#include "FXDialog/DistortionFXDialog.h"
#include "FXDialog/EQ15BandDialog.h"
#include "FXDialog/EQ31BandDialog.h"
#include "FXDialog/ReverbFXDialog.h".h"
#include "FXDialogs/AutoWahFXDialog.h".h"
#include "FXDialogs/ChorusFXDialog.h"
#include "FXDialogs/CompressorFXDialog.h"
#include "FXDialogs/DistortionFXDialog.h"
#include "FXDialogs/EchoFXDialog.h"
#include "FXDialogs/EQ15BandDialog.h"
#include "FXDialogs/EQ31BandDialog.h"
#include "FXDialogs/ReverbFXDialog.h".h"

#ifndef __linux
#include "Dialogs/VSTDirsDialog.h"
Expand Down Expand Up @@ -693,6 +694,7 @@ void SynthMixerDialog::showFxDialog(InstrumentType type, int fxIndex)
d = new DistortionFXDialog(this, dynamic_cast<DistortionFX*>(fx));
break;
case FXType::Echo:
d = new EchoFXDialog(this, dynamic_cast<EchoFX*>(fx));
break;
case FXType::EQ15Band:
d = new EQ15BandDialog(this, dynamic_cast<Equalizer15BandFX*>(fx));
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 13 additions & 1 deletion FXDialog/AutoWahFXDialog.ui → FXDialogs/AutoWahFXDialog.ui
Expand Up @@ -24,6 +24,16 @@
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/Icons/FXLabel/autowah.png</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down Expand Up @@ -421,6 +431,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>
File renamed without changes.
File renamed without changes.
14 changes: 13 additions & 1 deletion FXDialog/ChorusFXDialog.ui → FXDialogs/ChorusFXDialog.ui
Expand Up @@ -24,6 +24,16 @@
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/Icons/FXLabel/chorus.png</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down Expand Up @@ -522,6 +532,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>
File renamed without changes.
File renamed without changes.
16 changes: 14 additions & 2 deletions FXDialog/CompressorFXDialog.ui → FXDialogs/CompressorFXDialog.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>435</width>
<height>170</height>
<height>173</height>
</rect>
</property>
<property name="font">
Expand All @@ -24,6 +24,16 @@
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/Icons/FXLabel/compressor.png</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down Expand Up @@ -350,6 +360,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>
File renamed without changes.
File renamed without changes.
Expand Up @@ -24,6 +24,16 @@
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/Icons/FXLabel/distortion.png</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down Expand Up @@ -344,6 +354,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>
File renamed without changes.
File renamed without changes.
16 changes: 14 additions & 2 deletions FXDialog/EQ15BandDialog.ui → FXDialogs/EQ15BandDialog.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>515</width>
<height>235</height>
<height>239</height>
</rect>
</property>
<property name="font">
Expand All @@ -24,6 +24,16 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/Icons/FXLabel/eq15.png</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
Expand Down Expand Up @@ -1143,6 +1153,8 @@
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>
File renamed without changes.
File renamed without changes.
16 changes: 14 additions & 2 deletions FXDialog/EQ31BandDialog.ui → FXDialogs/EQ31BandDialog.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1043</width>
<height>235</height>
<height>239</height>
</rect>
</property>
<property name="font">
Expand All @@ -24,6 +24,16 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/Icons/FXLabel/eq31.png</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
Expand Down Expand Up @@ -2295,6 +2305,8 @@
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>
139 changes: 139 additions & 0 deletions FXDialogs/EchoFXDialog.cpp
@@ -0,0 +1,139 @@
#include "EchoFXDialog.h"
#include "ui_EchoFXDialog.h"

EchoFXDialog::EchoFXDialog(QWidget *parent, EchoFX *fx) :
QDialog(parent),
ui(new Ui::EchoFXDialog)
{
ui->setupUi(this);

this->fx = fx;

ui->dialWetDryMix->setValue(fx->wetDryMix());
ui->dialFeedback->setValue(fx->feedback());
ui->dialLeftDelay->setValue(fx->leftDelay());
ui->dialRightDelay->setValue(fx->rightDelay());

ui->spinWetDryMix->setValue(fx->wetDryMix());
ui->spinFeedback->setValue(fx->feedback());
ui->spinLeftDelay->setValue(fx->leftDelay());
ui->spinRightDelay->setValue(fx->rightDelay());

if (fx->isPanDelay())
ui->switchPan->on();
else
ui->switchPan->off();

connectAll();
connect(ui->switchPan, SIGNAL(switchChanged(bool)), this, SLOT(setPanDelay(bool)));
}

EchoFXDialog::~EchoFXDialog()
{
delete ui;
}

void EchoFXDialog::connectAll()
{
connect(ui->dialWetDryMix, SIGNAL(valueChanged(int)), this, SLOT(dialWetDryMixValueChanged(int)));
connect(ui->dialFeedback, SIGNAL(valueChanged(int)), this, SLOT(dialFeedbackValueChanged(int)));
connect(ui->dialLeftDelay, SIGNAL(valueChanged(int)), this,SLOT(dialLeftDelayValueChanged(int)));
connect(ui->dialRightDelay, SIGNAL(valueChanged(int)), this, SLOT(dialRightDelayValueChanged(int)));

connect(ui->spinWetDryMix, SIGNAL(valueChanged(int)), this, SLOT(setWetDryMix(int)));
connect(ui->spinFeedback, SIGNAL(valueChanged(int)), this, SLOT(setFeedback(int)));
connect(ui->spinLeftDelay, SIGNAL(valueChanged(int)), this,SLOT(setLeftDelay(int)));
connect(ui->spinRightDelay, SIGNAL(valueChanged(int)), this, SLOT(setRightDelay(int)));
}

void EchoFXDialog::disconnectAll()
{
disconnect(ui->dialWetDryMix, SIGNAL(valueChanged(int)), this, SLOT(dialWetDryMixValueChanged(int)));
disconnect(ui->dialFeedback, SIGNAL(valueChanged(int)), this, SLOT(dialFeedbackValueChanged(int)));
disconnect(ui->dialLeftDelay, SIGNAL(valueChanged(int)), this,SLOT(dialLeftDelayValueChanged(int)));
disconnect(ui->dialRightDelay, SIGNAL(valueChanged(int)), this, SLOT(dialRightDelayValueChanged(int)));

disconnect(ui->spinWetDryMix, SIGNAL(valueChanged(int)), this, SLOT(setWetDryMix(int)));
disconnect(ui->spinFeedback, SIGNAL(valueChanged(int)), this, SLOT(setFeedback(int)));
disconnect(ui->spinLeftDelay, SIGNAL(valueChanged(int)), this,SLOT(setLeftDelay(int)));
disconnect(ui->spinRightDelay, SIGNAL(valueChanged(int)), this, SLOT(setRightDelay(int)));
}

void EchoFXDialog::dialWetDryMixValueChanged(int value)
{
ui->spinWetDryMix->setValue(value);
}

void EchoFXDialog::dialFeedbackValueChanged(int value)
{
ui->spinFeedback->setValue(value);
}

void EchoFXDialog::dialLeftDelayValueChanged(int value)
{
ui->spinLeftDelay->setValue(value);
}

void EchoFXDialog::dialRightDelayValueChanged(int value)
{
ui->spinRightDelay->setValue(value);
}

void EchoFXDialog::setWetDryMix(int value)
{
disconnectAll();

fx->setWetDryMix(value);

ui->dialWetDryMix->setValue(value);

connectAll();
}

void EchoFXDialog::setFeedback(int value)
{
disconnectAll();

fx->setFeedback(value);

ui->dialFeedback->setValue(value);

connectAll();
}

void EchoFXDialog::setLeftDelay(int value)
{
disconnectAll();

fx->setLeftDelay(value);

ui->dialLeftDelay->setValue(value);

connectAll();
}

void EchoFXDialog::setRightDelay(int value)
{
disconnectAll();

fx->setRightDelay(value);

ui->dialRightDelay->setValue(value);

connectAll();
}

void EchoFXDialog::setPanDelay(bool pan)
{
fx->setPanDelay(pan);
}

void EchoFXDialog::on_btnReset_clicked()
{
ui->spinWetDryMix->setValue(50);
ui->spinFeedback->setValue(50);
ui->spinLeftDelay->setValue(500);
ui->spinRightDelay->setValue(500);

ui->switchPan->off();
}

0 comments on commit 835f4e7

Please sign in to comment.