| 148 | } |
| 149 | |
| 150 | void processCC(const midi::Message& msg) { |
| 151 | uint8_t cc = msg.getNote(); |
| 152 | int8_t value = msg.getValue(); |
| 153 | // Learn |
| 154 | if (0 <= learningId && values[cc] != value) { |
| 155 | ccs[learningId] = cc; |
| 156 | valueFilters[learningId].reset(); |
| 157 | learnedCc = true; |
| 158 | commitLearn(); |
| 159 | updateMapLen(); |
| 160 | refreshParamHandleText(learningId); |
| 161 | } |
| 162 | // Ignore negative values generated using the nonstandard 8-bit MIDI extension from the gamepad driver |
| 163 | if (value < 0) |
| 164 | return; |
| 165 | values[cc] = value; |
| 166 | } |
| 167 | |
| 168 | void clearMap(int id) { |
| 169 | learningId = -1; |