parent
38e4245ee0
commit
6d7a354531
|
@ -577,7 +577,7 @@ class DivEngine {
|
||||||
DivWorkPool* renderPool;
|
DivWorkPool* renderPool;
|
||||||
|
|
||||||
// MIDI stuff
|
// MIDI stuff
|
||||||
std::function<int(const TAMidiMessage&)> midiCallback=[](const TAMidiMessage&) -> int {return -2;};
|
std::function<int(const TAMidiMessage&)> midiCallback=[](const TAMidiMessage&) -> int {return -3;};
|
||||||
|
|
||||||
void processRowPre(int i);
|
void processRowPre(int i);
|
||||||
void processRow(int i, bool afterDelay);
|
void processRow(int i, bool afterDelay);
|
||||||
|
@ -1338,7 +1338,7 @@ class DivEngine {
|
||||||
void setMidiVolExp(float value);
|
void setMidiVolExp(float value);
|
||||||
|
|
||||||
// set MIDI input callback
|
// set MIDI input callback
|
||||||
// if the specified function returns -2, note feedback will be inhibited.
|
// if the specified function returns -3, note feedback will be inhibited.
|
||||||
void setMidiCallback(std::function<int(const TAMidiMessage&)> what);
|
void setMidiCallback(std::function<int(const TAMidiMessage&)> what);
|
||||||
|
|
||||||
// send MIDI message
|
// send MIDI message
|
||||||
|
|
|
@ -2252,7 +2252,7 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int ins=-1;
|
int ins=-1;
|
||||||
if ((ins=midiCallback(msg))!=-2) {
|
if ((ins=midiCallback(msg))!=-3) {
|
||||||
int chan=msg.type&15;
|
int chan=msg.type&15;
|
||||||
switch (msg.type&0xf0) {
|
switch (msg.type&0xf0) {
|
||||||
case TA_MIDI_NOTE_OFF: {
|
case TA_MIDI_NOTE_OFF: {
|
||||||
|
|
|
@ -7905,7 +7905,7 @@ bool FurnaceGUI::init() {
|
||||||
userEvents=SDL_RegisterEvents(1);
|
userEvents=SDL_RegisterEvents(1);
|
||||||
|
|
||||||
e->setMidiCallback([this](const TAMidiMessage& msg) -> int {
|
e->setMidiCallback([this](const TAMidiMessage& msg) -> int {
|
||||||
if (introPos<11.0) return -2;
|
if (introPos<11.0) return -3;
|
||||||
midiLock.lock();
|
midiLock.lock();
|
||||||
midiQueue.push(msg);
|
midiQueue.push(msg);
|
||||||
if (userEvents!=0xffffffff && midiWakeUp) {
|
if (userEvents!=0xffffffff && midiWakeUp) {
|
||||||
|
@ -7918,11 +7918,11 @@ bool FurnaceGUI::init() {
|
||||||
}
|
}
|
||||||
midiLock.unlock();
|
midiLock.unlock();
|
||||||
e->setMidiBaseChan(cursor.xCoarse);
|
e->setMidiBaseChan(cursor.xCoarse);
|
||||||
if (msg.type==TA_MIDI_SYSEX) return -2;
|
if (msg.type==TA_MIDI_SYSEX) return -3;
|
||||||
if (midiMap.valueInputStyle!=0 && cursor.xFine!=0 && edit) return -2;
|
if (midiMap.valueInputStyle!=0 && cursor.xFine!=0 && edit) return -3;
|
||||||
if (!midiMap.noteInput) return -2;
|
if (!midiMap.noteInput) return -3;
|
||||||
if (learning!=-1) return -2;
|
if (learning!=-1) return -3;
|
||||||
if (midiMap.at(msg)) return -2;
|
if (midiMap.at(msg)) return -3;
|
||||||
|
|
||||||
if (curWindowThreadSafe==GUI_WINDOW_WAVE_EDIT || curWindowThreadSafe==GUI_WINDOW_WAVE_LIST) {
|
if (curWindowThreadSafe==GUI_WINDOW_WAVE_EDIT || curWindowThreadSafe==GUI_WINDOW_WAVE_LIST) {
|
||||||
if ((msg.type&0xf0)==TA_MIDI_NOTE_ON) {
|
if ((msg.type&0xf0)==TA_MIDI_NOTE_ON) {
|
||||||
|
@ -7933,7 +7933,7 @@ bool FurnaceGUI::init() {
|
||||||
e->stopWavePreviewNoLock();
|
e->stopWavePreviewNoLock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -2;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curWindowThreadSafe==GUI_WINDOW_SAMPLE_EDIT || curWindowThreadSafe==GUI_WINDOW_SAMPLE_LIST) {
|
if (curWindowThreadSafe==GUI_WINDOW_SAMPLE_EDIT || curWindowThreadSafe==GUI_WINDOW_SAMPLE_LIST) {
|
||||||
|
@ -7945,7 +7945,7 @@ bool FurnaceGUI::init() {
|
||||||
e->stopSamplePreviewNoLock();
|
e->stopSamplePreviewNoLock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -2;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (midiMap.directChannel && midiMap.directProgram) return -1;
|
if (midiMap.directChannel && midiMap.directProgram) return -1;
|
||||||
|
|
Loading…
Reference in a new issue