summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2013-05-12 17:49:40 +0000
committerRobert Jonsson <spamatica@gmail.com>2013-05-12 17:49:40 +0000
commita4b19f67d039c20369c44ca81845cd4b9eda4878 (patch)
treea8f40cede3f40f5673dede44238933d2b05b4d9e /muse2/muse
parent9f953d39bb81a6817d3d5c52a6f6569924553b95 (diff)
fixed drum playback in new drum editor
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/midiedit/dcanvas.cpp11
1 files changed, 10 insertions, 1 deletions
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);