From 9e6dc222b92bbfba58756d3be47890dd885b8f71 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sat, 8 Oct 2011 14:10:24 +0000 Subject: muted instruments in new style drum tracks are now respected --- muse2/muse/midi.cpp | 8 +++++++- muse2/muse/track.h | 2 +- 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; -- cgit v1.2.3