From 66c83f2765d109020c3f7aea52039709deeb2468 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 8 Apr 2012 15:45:52 +0000 Subject: MCP: fix (?) interpretation of fader/pitchbend messages git-svn-id: svn://localhost/ardour2/branches/3.0@11830 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/mackie_port.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/surfaces/mackie/mackie_port.cc') diff --git a/libs/surfaces/mackie/mackie_port.cc b/libs/surfaces/mackie/mackie_port.cc index d90969f04c..e0598a6774 100644 --- a/libs/surfaces/mackie/mackie_port.cc +++ b/libs/surfaces/mackie/mackie_port.cc @@ -334,8 +334,8 @@ MackiePort::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, Control* control = _mcp.surface().faders[fader_id]; if (control) { - int midi_pos = pb & 0x3ff; // only the top-order 10 bits out of 14 are used - _mcp.handle_control_event (*this, *control, float (midi_pos) / float(0x3ff)); + float midi_pos = pb >> 4; // only the top 10 bytes are used + _mcp.handle_control_event (*this, *control, midi_pos / 1023.0); } } -- cgit v1.2.3