added "Thru/Masterchn - Dump" function
parent
2ae4eb1509
commit
029f719b3b
|
|
@ -110,6 +110,23 @@ void mainWindow::openSettingsWindow()
|
||||||
_settingsWindow->show();
|
_settingsWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mainWindow::updateDeviceConfig(){
|
||||||
|
if(!_midiOut->isPortOpen()) return;
|
||||||
|
|
||||||
|
std::bitset<3> *thru = _settingsWindow->_thruBitset;
|
||||||
|
int mastChn = _settingsWindow->_masterChannelSpinBox->value() - 1;
|
||||||
|
|
||||||
|
std::vector<unsigned char> rawRequest;
|
||||||
|
rawRequest = _prefixPocketC;
|
||||||
|
rawRequest.push_back(0x50);
|
||||||
|
rawRequest.push_back(thru->to_ulong());
|
||||||
|
rawRequest.push_back(mastChn);
|
||||||
|
rawRequest.push_back(0xF7);
|
||||||
|
|
||||||
|
_midiOut->sendRawMessage(rawRequest);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void mainWindow::openMidiPorts(){
|
void mainWindow::openMidiPorts(){
|
||||||
_midiIn->closePort();
|
_midiIn->closePort();
|
||||||
_midiOut->closePort();
|
_midiOut->closePort();
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
void onMidiMessageReceive(QMidiMessage* message);
|
void onMidiMessageReceive(QMidiMessage* message);
|
||||||
void openSettingsWindow();
|
void openSettingsWindow();
|
||||||
//void updateDeviceConfig(std::bitset<3> thru, int mastChn);
|
void updateDeviceConfig();
|
||||||
//void updatePresetSettings(std::vector<unsigned int>* presetSettings);
|
//void updatePresetSettings(std::vector<unsigned int>* presetSettings);
|
||||||
private slots:
|
private slots:
|
||||||
void openMidiPorts();
|
void openMidiPorts();
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ settingsWindow::settingsWindow(QWidget *parent) :
|
||||||
setConfigButton->setText("Set configuration");
|
setConfigButton->setText("Set configuration");
|
||||||
|
|
||||||
connect(getConfigButton, SIGNAL(clicked(bool)),parent,SLOT(sendThruMasterChnRequest()));
|
connect(getConfigButton, SIGNAL(clicked(bool)),parent,SLOT(sendThruMasterChnRequest()));
|
||||||
|
connect(setConfigButton, SIGNAL(clicked(bool)),parent, SLOT(updateDeviceConfig()));
|
||||||
|
|
||||||
QVBoxLayout *vbox = new QVBoxLayout;
|
QVBoxLayout *vbox = new QVBoxLayout;
|
||||||
vbox->addWidget(_channelThruCheckBox);
|
vbox->addWidget(_channelThruCheckBox);
|
||||||
|
|
@ -105,8 +106,3 @@ void settingsWindow::updateConfig(QMidiMessage* message){
|
||||||
_sysexThruCheckBox->setChecked(thruVal.test(1));
|
_sysexThruCheckBox->setChecked(thruVal.test(1));
|
||||||
_realtimeThruCheckBox->setChecked(thruVal.test(2));
|
_realtimeThruCheckBox->setChecked(thruVal.test(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void settingsWindow::onSetConfig(){
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
void onThruCheckboxChange();
|
void onThruCheckboxChange();
|
||||||
void updateConfig(QMidiMessage* message);
|
void updateConfig(QMidiMessage* message);
|
||||||
void onSetConfig();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SETTINGSWINDOW_H
|
#endif // SETTINGSWINDOW_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue