diff options
author | Florian Jung <flo@windfisch.org> | 2011-10-10 13:21:55 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-10-10 13:21:55 +0000 |
commit | 068ed02a48ffb6b06d87d858ee04022da5062914 (patch) | |
tree | 83f3b5a5c2fe506615ae530e29155c598e91b8f5 /muse2/muse/midi.cpp | |
parent | e4bedb86763c85a637921d566cd445cfa2c07444 (diff) |
not recording muted/hidden instruments works
Diffstat (limited to 'muse2/muse/midi.cpp')
-rw-r--r-- | muse2/muse/midi.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/muse2/muse/midi.cpp b/muse2/muse/midi.cpp index 0138f1d8..52d6e4f8 100644 --- a/muse2/muse/midi.cpp +++ b/muse2/muse/midi.cpp @@ -257,7 +257,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track, case ME_NOTEON: e.setType(Note); - if (track->type() == Track::DRUM) { //FINDMICHJETZT + if (track->type() == Track::DRUM) { int instr = MusEGlobal::drumInmap[ev.dataA()]; e.setPitch(instr); } @@ -269,7 +269,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track, break; case ME_NOTEOFF: e.setType(Note); - if (track->type() == Track::DRUM) { //FINDMICHJETZT + if (track->type() == Track::DRUM) { int instr = MusEGlobal::drumInmap[ev.dataA()]; e.setPitch(instr); } @@ -980,7 +980,7 @@ void Audio::processMidi() // //Apply drum inkey: - if (track->type() == Track::DRUM) //FINDMICHJETZT does this work? + if (track->type() == Track::DRUM) { int pitch = event.dataA(); //Map note that is played according to MusEGlobal::drumInmap @@ -991,9 +991,17 @@ void Audio::processMidi() event.setA(MusEGlobal::drumMap[(unsigned int)MusEGlobal::drumInmap[pitch]].anote); event.setChannel(channel); } - else if (track->type() == Track::NEW_DRUM) + else if (track->type() == Track::NEW_DRUM) //FINDMICH DOES THAT WORK? { event.setA(track->map_drum_in(event.dataA())); + + if (MusEGlobal::config.newDrumRecordCondition & MusECore::DONT_REC_HIDDEN && + track->drummap_hidden()[event.dataA()] ) + continue; // skip that event, proceed with the next + + if (MusEGlobal::config.newDrumRecordCondition & MusECore::DONT_REC_MUTED && + track->drummap()[event.dataA()].mute ) + continue; // skip that event, proceed with the next } else { //Track transpose if non-drum |