MCP: add debug tracing for fader (pitchbend) messages
git-svn-id: svn://localhost/ardour2/branches/3.0@11829 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0e72a29bcc
commit
fcada6e737
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2006,2007 John Anderson
|
||||
Copyright (C) 2012 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -15,8 +16,9 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#ifndef mackie_controls_h
|
||||
#define mackie_controls_h
|
||||
|
||||
#ifndef __mackie_controls_h__
|
||||
#define __mackie_controls_h__
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@ -299,4 +301,4 @@ public:
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __mackie_controls_h__ */
|
||||
|
@ -329,15 +329,12 @@ void MackiePort::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size
|
||||
void
|
||||
MackiePort::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uint32_t fader_id)
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi pitchbend, fader = %1 value = %2\n", fader_id, pb));
|
||||
|
||||
Control* control = _mcp.surface().faders[fader_id];
|
||||
|
||||
if (control) {
|
||||
// only the top-order 10 bits out of 14 are used
|
||||
int midi_pos = pb & 0x3ff;
|
||||
|
||||
// in_use is set by the MackieControlProtocol::handle_strip_button
|
||||
|
||||
// relies on implicit ControlState constructor
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user