From: Paul Davis Date: Wed, 30 Apr 2014 14:10:06 +0000 (-0400) Subject: fix for storing 14 bit MIDI controller values X-Git-Tag: 4.0-rc1~1601^2~1288 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=58522e5b5ea72896c2893c00bd4cf2939b30a492 fix for storing 14 bit MIDI controller values --- diff --git a/libs/midi++2/channel.cc b/libs/midi++2/channel.cc index 190ea18568..67d6f5fb11 100644 --- a/libs/midi++2/channel.cc +++ b/libs/midi++2/channel.cc @@ -138,7 +138,9 @@ Channel::process_controller (Parser & /*parser*/, EventTwoBytes *tb) } else if ((tb->controller_number >= 32 && tb->controller_number <= 63)) { - cv = (unsigned short) _controller_val[tb->controller_number]; + int cn = tb->controller_number - 32; + + cv = (unsigned short) _controller_val[cn]; /* LSB for CC 0-31 arrived. @@ -151,7 +153,6 @@ Channel::process_controller (Parser & /*parser*/, EventTwoBytes *tb) high 7. */ - int cn = tb->controller_number - 32; if (_controller_14bit[cn] == false) { _controller_14bit[cn] = true;