summaryrefslogtreecommitdiff
path: root/muse2/muse/midi.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-13 17:10:30 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-13 17:10:30 +0000
commit5c191a7c5b525cfc833ed4d3be171101058e9779 (patch)
tree481d8a2830b582e80737ff9d4ba07a4802ee0489 /muse2/muse/midi.cpp
parent1c547a97cf011a07fa7269df343820470856dd36 (diff)
removed or fixed many FINDMICH markers. NEEDS TESTING!
Diffstat (limited to 'muse2/muse/midi.cpp')
-rw-r--r--muse2/muse/midi.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/muse2/muse/midi.cpp b/muse2/muse/midi.cpp
index 28269b20..d5ed119d 100644
--- a/muse2/muse/midi.cpp
+++ b/muse2/muse/midi.cpp
@@ -372,7 +372,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track,
int ctl = ev.dataA();
e.setA(ctl);
- if(track->type() == Track::DRUM) //FINDMICHJETZT drum controller?
+ if(track->type() == Track::DRUM)
{
// Is it a drum controller event, according to the track port's instrument?
MidiController *mc = MusEGlobal::midiPorts[track->outPort()].drumController(ctl);
@@ -808,7 +808,7 @@ void Audio::collectEvents(MusECore::MidiTrack* track, unsigned int cts, unsigned
case Controller:
{
- if (track->type() == Track::DRUM) //FINDMICHJETZT was ist das? drumcontroller -_-
+ if (track->type() == Track::DRUM)
{
int ctl = ev.dataA();
// Is it a drum controller event, according to the track port's instrument?
@@ -1026,10 +1026,9 @@ void Audio::processMidi()
event.setB(velo);
}
}
- else
- if(event.type() == MusECore::ME_CONTROLLER)
+ else if(event.type() == MusECore::ME_CONTROLLER)
{
- if(track->type() == Track::DRUM) //FINDMICHJETZT was ist das?
+ if(track->type() == Track::DRUM)
{
ctl = event.dataA();
// Regardless of what port the event came from, is it a drum controller event
@@ -1049,6 +1048,24 @@ void Audio::processMidi()
event.setChannel(channel);
}
}
+ else if (track->type() == Track::NEW_DRUM) //FINDMICHJETZT TEST
+ {
+ ctl = event.dataA();
+ if (tport->drumController(ctl)) // is it a drum controller?
+ {
+ int pitch = ctl & 0x7f; // pitch is now the incoming pitch
+ pitch = track->map_drum_in(pitch); // pitch is now the mapped (recorded) pitch
+ event.setA(ctl & ~0xff | pitch); // map the drum ctrl's value accordingly
+
+ if (MusEGlobal::config.newDrumRecordCondition & MusECore::DONT_REC_HIDDEN &&
+ track->drummap_hidden()[pitch] )
+ continue; // skip that event, proceed with the next
+
+ if (MusEGlobal::config.newDrumRecordCondition & MusECore::DONT_REC_MUTED &&
+ track->drummap()[pitch].mute )
+ continue; // skip that event, proceed with the next
+ }
+ }
}
// MusE uses a fixed clocks per quarternote of 24.
@@ -1092,7 +1109,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) //FINDMICHJETZT was ist das?
+ if (track->type() == Track::DRUM) //FINDMICHJETZT no changes. TEST
{
// Is it a drum controller event?
if(mc)