diff options
author | Tim E. Real <termtech@rogers.com> | 2010-11-29 07:16:41 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-11-29 07:16:41 +0000 |
commit | be99c1e70a0956995f20b5d0cc2c46b123973ea3 (patch) | |
tree | 78a292a182610b61407acecd81448de9ba2aa733 /muse2 | |
parent | ee4a8d828f83dda7df604350ec96f3187e353806 (diff) |
In Mess::processEvent(), added ME_PITCHBEND case. Fixes pitchbend in some synths.
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 3 | ||||
-rw-r--r-- | muse2/muse/widgets/canvas.cpp | 6 | ||||
-rw-r--r-- | muse2/synti/libsynti/mess.cpp | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 7d29d782..af2e9c39 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,6 @@ +29.11.2010 + - In Mess::processEvent(), added ME_PITCHBEND case. For synths which don't override + processEvent (like Vam and Deicsonze). Pitchbend should work in them now. (Tim) 28.11.2010 - Finished porting Marker View. (Orcan) - Ported ctrlpanel. Needs some testing. I also removed usage of the Oxygen's "pen" icon diff --git a/muse2/muse/widgets/canvas.cpp b/muse2/muse/widgets/canvas.cpp index 3d80966d..7533b2ad 100644 --- a/muse2/muse/widgets/canvas.cpp +++ b/muse2/muse/widgets/canvas.cpp @@ -456,13 +456,13 @@ void Canvas::viewMousePressEvent(QMouseEvent* event) keyState = event->modifiers(); button = event->button(); - printf("viewMousePressEvent buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button()); + //printf("viewMousePressEvent buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button()); // special events if right button is clicked while operations // like moving or drawing lasso is performed. ///if (event->stateAfter() & Qt::RightButton) { if (event->buttons() & Qt::RightButton & ~(event->button())) { - printf("viewMousePressEvent special buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button()); + //printf("viewMousePressEvent special buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button()); switch (drag) { case DRAG_LASSO: drag = DRAG_OFF; @@ -480,7 +480,7 @@ void Canvas::viewMousePressEvent(QMouseEvent* event) // ignore event if (another) button is already active: ///if (keyState & (Qt::LeftButton|Qt::RightButton|Qt::MidButton)) { if (event->buttons() & (Qt::LeftButton|Qt::RightButton|Qt::MidButton) & ~(event->button())) { - printf("viewMousePressEvent ignoring buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button()); + //printf("viewMousePressEvent ignoring buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button()); return; } bool shift = keyState & Qt::ShiftModifier; diff --git a/muse2/synti/libsynti/mess.cpp b/muse2/synti/libsynti/mess.cpp index 639ffee6..8c23d8ea 100644 --- a/muse2/synti/libsynti/mess.cpp +++ b/muse2/synti/libsynti/mess.cpp @@ -7,6 +7,7 @@ #include "mess.h" #include "muse/midi.h" +#include "muse/midictrl.h" static const int FIFO_SIZE = 32; @@ -116,6 +117,8 @@ bool Mess::processEvent(const MidiPlayEvent& ev) return sysex(ev.len(), ev.data()); case ME_CONTROLLER: return setController(ev.channel(), ev.dataA(), ev.dataB()); + case ME_PITCHBEND: // Tim. + return setController(ev.channel(), CTRL_PITCH, ev.dataA()); } return false; } |