Mercurial > hg > touchkeys
comparison Source/Mappings/Control/TouchkeyControlMappingFactory.cpp @ 52:18af05164894
Bug fix in control mapping.
author | Andrew McPherson <andrewm@eecs.qmul.ac.uk> |
---|---|
date | Tue, 12 May 2015 18:19:05 +0100 |
parents | 90ce403d0dc5 |
children |
comparison
equal
deleted
inserted
replaced
51:003236a1e29b | 52:18af05164894 |
---|---|
68 if(inputType >= 1 && inputType < TouchkeyControlMapping::kTypeMaxValue) | 68 if(inputType >= 1 && inputType < TouchkeyControlMapping::kTypeMaxValue) |
69 inputType_ = inputType; | 69 inputType_ = inputType; |
70 } | 70 } |
71 | 71 |
72 void TouchkeyControlMappingFactory::setController(int controller) { | 72 void TouchkeyControlMappingFactory::setController(int controller) { |
73 if(midiControllerNumber_ < 1 || | 73 if(controller < 1 || |
74 midiControllerNumber_ >= MidiKeyboardSegment::kControlMax) | 74 controller >= MidiKeyboardSegment::kControlMax) |
75 return; | 75 return; |
76 | 76 |
77 // Before changing the controller, check if we were going to or from the pitch wheel. | 77 // Before changing the controller, check if we were going to or from the pitch wheel. |
78 // If so, we should scale the value to or from a 14-bit value | 78 // If so, we should scale the value to or from a 14-bit value |
79 if(midiControllerNumber_ == MidiKeyboardSegment::kControlPitchWheel && | 79 if(midiControllerNumber_ == MidiKeyboardSegment::kControlPitchWheel && |