Comment 9 for bug 1176184

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi Michael,

thank you for your work. And sorry for being not precise enough and putting additional work on you.

My request was much simpler, like this:

#define MIDI_SYS_RT_MSG_MASK 0xF8 // from MIDI Message Table http://www.midi.org/techspecs/midimessages.php

// Ignore all standard MIDI System Real-Time Messages because the are continuously send and
// preventing mapping of the pressed key
if ((mappingKey.key & MIDI_SYS_RT_MSG_MASK) == MIDI_SYS_RT_MSG_MASK) {
    return;
}

But I like your helper function Idea es well:

#define MIDI_SYS_RT_MSG_MASK 0xF8 // from MIDI Message Table http://www.midi.org/techspecs/midimessages.php

bool MidiController::isClockSignal(MidiKey &mappingKey) {
   if ((mappingKey.key & MIDI_SYS_RT_MSG_MASK) == MIDI_SYS_RT_MSG_MASK) {
        return true;
    }
    return false;
}

...

// Ignore all standard MIDI System Real-Time Messages because they are continuously send and
// preventing mapping of the pressed key
if (isClockSignal(mappingKey) {
    return;
}

isClockSignal(MidiKey &mappingKey) must be declared in midicontroller.h, than it should work.
And please not that there should be a blank between if and (

Please prepare a final patch based on this comment and do not forget to sign the Mixxx Contributor Agreement from comment #6.

Thank you,

Daniel