mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 06:32:57 +02:00
Corrected bitwise operators, Removed midiRaw signal.
This commit is contained in:
parent
f233c93aaa
commit
e9f8dafbc8
2 changed files with 2 additions and 12 deletions
|
@ -125,7 +125,6 @@ void CALLBACK MidiInProc(HMIDIIN hMidiIn, UINT wMsg, DWORD_PTR dwInstance, DWORD
|
|||
if (thruModeEnabled) {
|
||||
instance->sendNote(status, note, velocity); // relay the message on to all other midi devices.
|
||||
}
|
||||
instance->rawMidiReceived(device, raw); // notify the javascript
|
||||
instance->midiReceived(device, raw, channel, status, type, note, velocity, bend, program); // notify the javascript
|
||||
break;
|
||||
}
|
||||
|
@ -166,11 +165,11 @@ void Midi::sendMessage(int device, int channel, int type, int note, int velocity
|
|||
if (broadcastEnabled) {
|
||||
for (int i = 0; i < midihout.size(); i++) {
|
||||
if (midihout[i] != NULL) {
|
||||
midiOutShortMsg(midihout[i], message + (note << MIDI_SHIFT_NOTE) + (velocity << MIDI_SHIFT_VELOCITY));
|
||||
midiOutShortMsg(midihout[i], message | (note << MIDI_SHIFT_NOTE) | (velocity << MIDI_SHIFT_VELOCITY));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
midiOutShortMsg(midihout[device], message + (note << MIDI_SHIFT_NOTE) + (velocity << MIDI_SHIFT_VELOCITY));
|
||||
midiOutShortMsg(midihout[device], message | (note << MIDI_SHIFT_NOTE) | (velocity << MIDI_SHIFT_VELOCITY));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,13 +261,6 @@ void Midi::MidiCleanup() {
|
|||
}
|
||||
#endif
|
||||
|
||||
void Midi::rawMidiReceived(int device, int raw) {
|
||||
QVariantMap eventData;
|
||||
eventData["device"] = device;
|
||||
eventData["raw"] = raw;
|
||||
emit midiRaw(eventData);
|
||||
}
|
||||
|
||||
void Midi::midiReceived(int device, int raw, int channel, int status, int type, int note, int velocity, int bend, int program) {
|
||||
QVariantMap eventData;
|
||||
eventData["device"] = device;
|
||||
|
|
|
@ -25,7 +25,6 @@ class Midi : public QObject, public Dependency {
|
|||
SINGLETON_DEPENDENCY
|
||||
|
||||
public:
|
||||
void rawMidiReceived(int device, int raw); //relay raw midi data to Javascript
|
||||
void midiReceived(int device, int raw, int channel, int status, int type, int note, int velocity, int bend, int program); // relay a note to Javascript
|
||||
void midiHardwareChange(); // relay hardware change to Javascript
|
||||
void sendRawMessage(int device, int raw); // relay midi message to MIDI outputs
|
||||
|
@ -44,7 +43,6 @@ private:
|
|||
signals:
|
||||
void midiNote(QVariantMap eventData);
|
||||
void midiMessage(QVariantMap eventData);
|
||||
void midiRaw(QVariantMap eventData);
|
||||
void midiReset();
|
||||
|
||||
public slots:
|
||||
|
|
Loading…
Reference in a new issue