Skip to content

Commit

Permalink
fix #11175: Drums do export to midi
Browse files Browse the repository at this point in the history
  • Loading branch information
Igevorse committed Oct 11, 2014
1 parent a7dab0a commit 4210646
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mscore/exportmidi.cpp
Expand Up @@ -262,14 +262,15 @@ bool ExportMidi::write(const QString& name, bool midiExpandRepeats)

for (auto i = events.begin(); i != events.end(); ++i) {
NPlayEvent event(i->second);
if (event.channel() != channel)
int eventChannel = cs->midiChannel(event.channel());
if (channel != eventChannel)
continue;
if (event.type() == ME_NOTEON) {
track.insert(i->first, MidiEvent(ME_NOTEON, event.channel(),
track.insert(i->first, MidiEvent(ME_NOTEON, channel,
event.pitch(), event.velo()));
}
else if (event.type() == ME_CONTROLLER) {
track.insert(i->first, MidiEvent(ME_CONTROLLER, event.channel(),
track.insert(i->first, MidiEvent(ME_CONTROLLER, channel,
event.controller(), event.value()));
}
else {
Expand Down

0 comments on commit 4210646

Please sign in to comment.