parent
4deb0041f5
commit
91bddb8df6
|
@ -3412,6 +3412,10 @@ void DivEngine::setMidiCallback(std::function<int(const TAMidiMessage&)> what) {
|
||||||
midiCallback=what;
|
midiCallback=what;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DivEngine::setMidiDebug(bool enable) {
|
||||||
|
midiDebug=enable;
|
||||||
|
}
|
||||||
|
|
||||||
bool DivEngine::sendMidiMessage(TAMidiMessage& msg) {
|
bool DivEngine::sendMidiMessage(TAMidiMessage& msg) {
|
||||||
if (output==NULL) {
|
if (output==NULL) {
|
||||||
logW("output is NULL!");
|
logW("output is NULL!");
|
||||||
|
|
|
@ -497,6 +497,7 @@ class DivEngine {
|
||||||
short effectSlotMap[4096];
|
short effectSlotMap[4096];
|
||||||
int midiBaseChan;
|
int midiBaseChan;
|
||||||
bool midiPoly;
|
bool midiPoly;
|
||||||
|
bool midiDebug;
|
||||||
size_t midiAgeCounter;
|
size_t midiAgeCounter;
|
||||||
|
|
||||||
blip_buffer_t* samp_bb;
|
blip_buffer_t* samp_bb;
|
||||||
|
@ -1208,6 +1209,9 @@ class DivEngine {
|
||||||
// send MIDI message
|
// send MIDI message
|
||||||
bool sendMidiMessage(TAMidiMessage& msg);
|
bool sendMidiMessage(TAMidiMessage& msg);
|
||||||
|
|
||||||
|
// enable MIDI debug
|
||||||
|
void setMidiDebug(bool enable);
|
||||||
|
|
||||||
// perform secure/sync operation
|
// perform secure/sync operation
|
||||||
void synchronized(const std::function<void()>& what);
|
void synchronized(const std::function<void()>& what);
|
||||||
|
|
||||||
|
@ -1329,6 +1333,7 @@ class DivEngine {
|
||||||
cmdStreamInt(NULL),
|
cmdStreamInt(NULL),
|
||||||
midiBaseChan(0),
|
midiBaseChan(0),
|
||||||
midiPoly(true),
|
midiPoly(true),
|
||||||
|
midiDebug(false),
|
||||||
midiAgeCounter(0),
|
midiAgeCounter(0),
|
||||||
samp_bb(NULL),
|
samp_bb(NULL),
|
||||||
samp_bbInLen(0),
|
samp_bbInLen(0),
|
||||||
|
|
|
@ -1841,6 +1841,13 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
||||||
// process MIDI events (TODO: everything)
|
// process MIDI events (TODO: everything)
|
||||||
if (output) if (output->midiIn) while (!output->midiIn->queue.empty()) {
|
if (output) if (output->midiIn) while (!output->midiIn->queue.empty()) {
|
||||||
TAMidiMessage& msg=output->midiIn->queue.front();
|
TAMidiMessage& msg=output->midiIn->queue.front();
|
||||||
|
if (midiDebug) {
|
||||||
|
if (msg.type==TA_MIDI_SYSEX) {
|
||||||
|
logD("MIDI debug: %.2X SysEx",msg.type);
|
||||||
|
} else {
|
||||||
|
logD("MIDI debug: %.2X %.2X %.2X",msg.type,msg.data[0],msg.data[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
int ins=-1;
|
int ins=-1;
|
||||||
if ((ins=midiCallback(msg))!=-2) {
|
if ((ins=midiCallback(msg))!=-2) {
|
||||||
int chan=msg.type&15;
|
int chan=msg.type&15;
|
||||||
|
|
|
@ -432,6 +432,13 @@ void FurnaceGUI::drawDebug() {
|
||||||
|
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
if (ImGui::TreeNode("MIDI Debug")) {
|
||||||
|
if (ImGui::Button("Enable Debug (go to log viewer")) {
|
||||||
|
e->setMidiDebug(true);
|
||||||
|
nextWindow=GUI_WINDOW_LOG;
|
||||||
|
}
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
if (ImGui::TreeNode("Visualizer Debug")) {
|
if (ImGui::TreeNode("Visualizer Debug")) {
|
||||||
if (ImGui::BeginTable("visX",3,ImGuiTableFlags_Borders)) {
|
if (ImGui::BeginTable("visX",3,ImGuiTableFlags_Borders)) {
|
||||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
||||||
|
|
Loading…
Reference in a new issue