summaryrefslogtreecommitdiff
path: root/muse2/muse/midi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/muse/midi.cpp')
-rw-r--r--muse2/muse/midi.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/muse2/muse/midi.cpp b/muse2/muse/midi.cpp
index 0d81ff2c..65bccc70 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) {
+ if (track->type() == Track::DRUM) { //FINDMICHJETZT
int instr = MusEGlobal::drumInmap[ev.dataA()];
e.setPitch(instr);
}
@@ -271,7 +271,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track,
break;
case ME_NOTEOFF:
e.setType(Note);
- if (track->type() == Track::DRUM) {
+ if (track->type() == Track::DRUM) { //FINDMICHJETZT
int instr = MusEGlobal::drumInmap[ev.dataA()];
e.setPitch(instr);
}
@@ -373,7 +373,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track,
int ctl = ev.dataA();
e.setA(ctl);
- if(track->type() == Track::DRUM)
+ if(track->type() == Track::DRUM) //FINDMICHJETZT drum controller?
{
// Is it a drum controller event, according to the track port's instrument?
MidiController *mc = MusEGlobal::midiPorts[track->outPort()].drumController(ctl);
@@ -736,6 +736,12 @@ void Audio::collectEvents(MusECore::MidiTrack* track, unsigned int cts, unsigned
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()) {
@@ -754,7 +760,7 @@ void Audio::collectEvents(MusECore::MidiTrack* track, unsigned int cts, unsigned
channel = MusEGlobal::drumMap[instr].channel;
velo = int(double(velo) * (double(MusEGlobal::drumMap[instr].vol) / 100.0)) ;
}
- else {
+ else { //FINDMICHJETZT don't transpose for new style drum tracks
//
// transpose non drum notes
//
@@ -807,7 +813,7 @@ void Audio::collectEvents(MusECore::MidiTrack* track, unsigned int cts, unsigned
case Controller:
{
- if (track->type() == Track::DRUM)
+ if (track->type() == Track::DRUM) //FINDMICHJETZT was ist das? drumcontroller -_-
{
int ctl = ev.dataA();
// Is it a drum controller event, according to the track port's instrument?
@@ -979,7 +985,7 @@ void Audio::processMidi()
//
//Apply drum inkey:
- if (track->type() == Track::DRUM)
+ if (track->type() == Track::DRUM) //FINDMICHJETZT schwierig...
{
int pitch = event.dataA();
//Map note that is played according to MusEGlobal::drumInmap
@@ -1016,7 +1022,7 @@ void Audio::processMidi()
else
if(event.type() == MusECore::ME_CONTROLLER)
{
- if(track->type() == Track::DRUM)
+ if(track->type() == Track::DRUM) //FINDMICHJETZT was ist das?
{
ctl = event.dataA();
// Regardless of what port the event came from, is it a drum controller event
@@ -1079,7 +1085,7 @@ void Audio::processMidi()
// to the track port so buildMidiEventList will accept it. Even though
// the port may have no device "<none>".
//
- if (track->type() == Track::DRUM)
+ if (track->type() == Track::DRUM) //FINDMICHJETZT was ist das?
{
// Is it a drum controller event?
if(mc)