Added objects eventWindow paramWindow
List of different assignable events in eventwindow.cppmaster
parent
09a09b2f2f
commit
8d01b5e4b7
|
|
@ -9,17 +9,21 @@ TEMPLATE = app
|
|||
SOURCES += \
|
||||
src/main.cpp \
|
||||
src/mainwindow.cpp \
|
||||
src/settingswindow.cpp
|
||||
src/settingswindow.cpp \
|
||||
src/eventwindow.cpp \
|
||||
src/paramwindow.cpp
|
||||
|
||||
include($$PWD/libs/QMidi/QMidi.pri)
|
||||
|
||||
HEADERS += \
|
||||
src/mainwindow.h \
|
||||
src/settingswindow.h
|
||||
src/settingswindow.h \
|
||||
src/eventwindow.h \
|
||||
src/paramwindow.h
|
||||
|
||||
macx {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
|
||||
QMAKE_MAC_SDK = macosx10.12
|
||||
_BOOST_PATH = /usr/local/Cellar/boost/1.62.0
|
||||
INCLUDEPATH += "$${_BOOST_PATH}/include/"
|
||||
LIBS += -L$${_BOOST_PATH}/lib
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
#include "eventwindow.h"
|
||||
#include <QHBoxLayout>
|
||||
|
||||
eventWindow::eventWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
//_eventsList(new QStringList),
|
||||
_eventsTable(new QTableWidget)
|
||||
{
|
||||
QWidget *mainWidget = new QWidget(this);
|
||||
QHBoxLayout *mainLayout = new QHBoxLayout(mainWidget);
|
||||
|
||||
_eventsList << "Controller" << "PitchBend" << "MonoAftertouch" << "Prg-Change" << "PolyAftertouch" << "Note-On" << "Note-Off" << "" << "RPN0_MSB" << "RPN0_LSB" << "RPN1_MSB" << "RPN1_LSB" << "" << "" << "RPN127_MSB" << "RPN127_LSB" << "NRPN0_MSB" << "NRPN0_LSB" << "NRPN1_MSB XG_Multi/GS" << "NRPN1_LSB XG_Multi/GS" << "NRPN8_MSB" << "NRPN8_LSB" << "NRPN9_MSB" << "NRPN9_LSB" << "NRPN10_MSB" << "NRPN10_LSB" << "NRPN20_MSB XG Drum Instr. Cutoff" << "NRPN20_LSB XG Drum Instr. Cutoff" << "NRPN21_MSB XG Drum Instr. Resonance" << "NRPN21_LSB XG Drum Instr. Resonance" << "NRPN22_MSB XG Drum Instr. EG Attack" << "NRPN22_LSB XG Drum Instr. EG Attack" << "NRPN23_MSB XG Drum Instr. EG Decay" << "NRPN23_LSB XG Drum Instr. EG Decay" << "NRPN24_MSB XG/GS Drum Instr. Pitch Coarse" << "NRPN24_LSB XG/GS Drum Instr. Pitch Coarse" << "NRPN25_MSB XG Drum Instr. Pitch Fine" << "NRPN25_LSB XG Drum Instr. Pitch Fine" << "NRPN26_MSB XG/GS Drum Instr. Level" << "NRPN26_LSB XG/GS Drum Instr. Coarse" << "NRPN28_MSB XG/GS Drum Instr. Panorama" << "NRPN28_LSB XG/GS Drum Instr. Panorama" << "NRPN29_MSB XG/GS Drum Instr. Reverb Send" << "NRPN29_LSB XG/GS Drum Instr. Reverb Send" << "NRPN30_MSB XG/GS Drum Instr. Chorus Send" << "NRPN30_LSB XG/GS Drum Instr. Chorus Send" << "NRPN31_MSB XG/GS Drum Instr.Variation/Delay Send" << "NRPN31_LSB XG/GS Drum Instr. Variation/Delay Send" << "NRPN32_MSB" << "NRPN32_LSB" << "NRPN33_MSB" << "NRPN33_LSB" << "NRPN99_MSB" << "NRPN99_LSB" << "NRPN100_MSB" << "NRPN100_LSB" << "NRPN102_MSB" << "NRPN102_LSB" << "NRPN120_MSB EMU ABS" << "NRPN120_LSB EMU ABS" << "NRPN127_MSB SB AWE 32/64" << "NRPN127_LSB SB AWE 32/64" << "" << "" << "XG-DRUM (SetupNr=Chn) Pitch Coarse" << "XG-DRUM (SetupNr=Chn) Pitch Fine" << "XG-DRUM (SetupNr=Chn) Level" << "XG-DRUM (SetupNr=Chn) Alternate Group" << "XG-DRUM (SetupNr=Chn) Panorama" << "XG-DRUM (SetupNr=Chn) Reverb Send" << "XG-DRUM (SetupNr=Chn) Chorus Send" << "XG-DRUM (SetupNr=Chn) Variation Send" << "XG-DRUM (SetupNr=Chn) Key Assign" << "XG-DRUM (SetupNr=Chn) Rcv Note off" << "XG-DRUM (SetupNr=Chn) Rcv Note On" << "XG-DRUM (SetupNr=Chn) Cutoff Freq." << "XG-DRUM (SetupNr=Chn) Resonance" << "XG-DRUM (SetupNr=Chn) EG Attack Rate" << "XG-DRUM (SetupNr=Chn) EG Decay1 Rate";
|
||||
_eventsList << "XG-DRUM (SetupNr=Chn) EG Decay2 Rate" << "XG Multipart" << "XG AD" << "XG-Effect" << "XG-Effect 2Byte" << "XG-Reverb Type" << "XG-Chorus Type";
|
||||
_eventsList << "XG-Variation Type" << "XG-EQ" << "XG-Insertion1" << "XG-Insertion2" << "XG-Insertion 1 Type" << "XG-Insertion 2 Type" << "" << "" << "" << "" << "GS - Effect" << "MC303_Global" << "MC303_Channel" << "" << "Strings" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "" << "No-Event";
|
||||
|
||||
|
||||
_eventsTable->setRowCount(32);
|
||||
_eventsTable->setColumnCount(4);
|
||||
_eventsTable->horizontalHeader()->setHidden(true);
|
||||
_eventsTable->verticalHeader()->setHidden(true);
|
||||
for(int r=0; r<32; r++){
|
||||
for(int c=0; c<4; c++){
|
||||
QString nom = _eventsList.at(32*c+r);
|
||||
_eventsTable->setItem(r,c,new QTableWidgetItem(nom));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mainLayout->addWidget(_eventsTable);
|
||||
|
||||
mainWidget->setLayout(mainLayout);
|
||||
this->setCentralWidget(mainWidget);
|
||||
}
|
||||
|
||||
eventWindow::~eventWindow()
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef EVENTWINDOW_H
|
||||
#define EVENTWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QtWidgets>
|
||||
#include <QTableWidget>
|
||||
|
||||
class eventWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit eventWindow(QWidget *parent = 0);
|
||||
~eventWindow();
|
||||
|
||||
QTableWidget* _eventsTable;
|
||||
QStringList _eventsList;
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // EVENTWINDOW_H
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
mainWindow::mainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
_eventWindow(new eventWindow(this)),
|
||||
_paramWindow(new paramWindow(this)),
|
||||
_settingsWindow(new settingsWindow(this)),
|
||||
_presetsList(new QListWidget),
|
||||
_presetSettingsTable(new QTableWidget),
|
||||
|
|
@ -22,10 +24,10 @@ mainWindow::mainWindow(QWidget *parent) :
|
|||
_prefixPocketC = {0xF0,0x00,0x20,0x20,0x14,0x00};
|
||||
_midiIn->setIgnoreTypes(false, false, false);
|
||||
|
||||
// Temporary default starting values (all parameters set to zero)
|
||||
// Temporary default starting values
|
||||
for(int i=0; i<128; i++){
|
||||
for(int j=0; j<48; j++){
|
||||
_preset[i][j] = 0;
|
||||
_preset[i][j] = ((j > 15 && j < 32) ? 127 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -74,6 +76,7 @@ mainWindow::mainWindow(QWidget *parent) :
|
|||
settingsList << "Channel" << "Type" << "Parameter" << "Description" ;
|
||||
_presetSettingsTable->setRowCount(16);
|
||||
_presetSettingsTable->setColumnCount(4);
|
||||
_presetSettingsTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
_presetSettingsTable->setHorizontalHeaderLabels(settingsList);
|
||||
|
||||
|
||||
|
|
@ -87,6 +90,7 @@ mainWindow::mainWindow(QWidget *parent) :
|
|||
|
||||
|
||||
connect(_midiIn, SIGNAL(midiMessageReceived(QMidiMessage*)), this, SLOT(onMidiMessageReceive(QMidiMessage*)));
|
||||
connect(_presetSettingsTable, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(presetCellClicked(int,int)));
|
||||
connect(settings, SIGNAL(triggered(bool)), this, SLOT(openSettingsWindow()));
|
||||
|
||||
_presetsList->setCurrentRow(0);
|
||||
|
|
@ -129,6 +133,17 @@ void mainWindow::onMidiMessageReceive(QMidiMessage *message)
|
|||
//qDebug() << "BYTE #7 : " << rawMessage.at(6) ; // DEBUG
|
||||
}
|
||||
|
||||
void mainWindow::presetCellClicked(int row, int column)
|
||||
{
|
||||
_paramWindow->setWindowModality(Qt::ApplicationModal);
|
||||
_paramWindow->setWindowTitle("Parameter");
|
||||
|
||||
_eventWindow->setWindowModality(Qt::ApplicationModal);
|
||||
_eventWindow->setWindowTitle("Event");
|
||||
if(column == 1) _eventWindow->show();
|
||||
if(column == 2) _paramWindow->show();
|
||||
}
|
||||
|
||||
void mainWindow::openSettingsWindow()
|
||||
{
|
||||
_settingsWindow->setWindowModality(Qt::ApplicationModal);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@
|
|||
#include <vector>
|
||||
#include <bitset>
|
||||
|
||||
#include "paramwindow.h"
|
||||
#include "eventwindow.h"
|
||||
#include "settingswindow.h"
|
||||
#include "eventwindow.h"
|
||||
#include "qmidimessage.h"
|
||||
#include "qmidiin.h"
|
||||
#include "qmidiout.h"
|
||||
|
|
@ -29,7 +32,8 @@ class mainWindow : public QMainWindow
|
|||
Q_OBJECT
|
||||
public:
|
||||
mainWindow(QWidget *parent = 0);
|
||||
|
||||
eventWindow* _eventWindow;
|
||||
paramWindow* _paramWindow;
|
||||
settingsWindow* _settingsWindow;
|
||||
QListWidget* _presetsList;
|
||||
QTableWidget* _presetSettingsTable;
|
||||
|
|
@ -55,6 +59,7 @@ signals:
|
|||
|
||||
public slots:
|
||||
void onMidiMessageReceive(QMidiMessage* message);
|
||||
void presetCellClicked(int row, int column);
|
||||
void openSettingsWindow();
|
||||
void updateDeviceConfig();
|
||||
void updatePreset(QMidiMessage* message);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
#include "paramwindow.h"
|
||||
|
||||
paramWindow::paramWindow(QWidget *parent) : QMainWindow(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef PARAMWINDOW_H
|
||||
#define PARAMWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QtWidgets>
|
||||
|
||||
class paramWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit paramWindow(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // PARAMWINDOW_H
|
||||
Loading…
Reference in New Issue