summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-08 14:10:24 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-08 14:10:24 +0000
commit9e6dc222b92bbfba58756d3be47890dd885b8f71 (patch)
tree4f9ade42505b2e30b03b6cf3c00a9971349de16a
parenta347445db32f51562aee5c6a786c312d1f612d2f (diff)
muted instruments in new style drum tracks are now respected
-rw-r--r--muse2/muse/midi.cpp8
-rw-r--r--muse2/muse/track.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/muse2/muse/midi.cpp b/muse2/muse/midi.cpp
index e927674f..65bccc70 100644
--- a/muse2/muse/midi.cpp
+++ b/muse2/muse/midi.cpp
@@ -730,12 +730,18 @@ void Audio::collectEvents(MusECore::MidiTrack* track, unsigned int cts, unsigned
//
if (ev.type() == Meta)
continue;
- if (track->type() == Track::DRUM) { //FINDMICHJETZT ignore muted
+ if (track->type() == Track::DRUM) {
int instr = ev.pitch();
// ignore muted drums
if (ev.isNote() && MusEGlobal::drumMap[instr].mute)
continue;
}
+ else if (track->type() == Track::NEW_DRUM) {
+ int instr = ev.pitch();
+ // ignore muted drums
+ if (ev.isNote() && track->drummap()[instr].mute)
+ continue;
+ }
unsigned tick = ev.tick() + offset;
unsigned frame = MusEGlobal::tempomap.tick2frame(tick) + frameOffset;
switch (ev.type()) {
diff --git a/muse2/muse/track.h b/muse2/muse/track.h
index 9d3db8af..0911b4f1 100644
--- a/muse2/muse/track.h
+++ b/muse2/muse/track.h
@@ -229,7 +229,7 @@ class MidiTrack : public Track {
static bool _isVisible;
clefTypes clefType;
- DrumMap* _drummap;
+ DrumMap* _drummap; // _drummap[foo].anote is always equal to foo
bool _drummap_tied_to_patch; //if true, changing patch also changes drummap
bool* _drummap_hidden;