diff options
-rw-r--r-- | muse2/ChangeLog | 3 | ||||
-rw-r--r-- | muse2/muse/midiedit/dcanvas.cpp | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index bff1dfde..c49ae072 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,6 @@ +12.05.2013: + - Fixed bug with playback of drums clicking on notes in the new drum editor, + it was playing the wrong instrument (rj) 08.05.2013: - Yet another MAJOR audio engine and plugin/synth process chain re-write. (Tim...) - Track controllers (vol, pan) now sample-accurate. diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp index 734871ef..ebe3a6c8 100644 --- a/muse2/muse/midiedit/dcanvas.cpp +++ b/muse2/muse/midiedit/dcanvas.cpp @@ -209,7 +209,7 @@ bool DrumCanvas::index2Note(int index, int* port, int* channel, int* note) *channel = ch; if(note) *note = old_style_drummap_mode ? ourDrumMap[index].anote : instrument_map[index].pitch; - + return true; } @@ -576,6 +576,15 @@ void DrumCanvas::itemPressed(const MusEGui::CItem* item) MusECore::Event e = ((DEvent*)item)->event(); int index = e.pitch(); // play note: + + if (!old_style_drummap_mode) { + for (int i = 0; i < instrument_map.size(); ++i) { + if (instrument_map.at(i).pitch == index) { + index = i; + break; + } + } + } int pitch, port, channel; if(index2Note(index, &port, &channel, &pitch)) startPlayEvent(pitch, e.velo(), port, channel); |