| 285 | } |
| 286 | |
| 287 | void StutterControl::UpdatePush2Leds(Push2Control* push2) |
| 288 | { |
| 289 | for (int x = 0; x < 8; ++x) |
| 290 | { |
| 291 | for (int y = 0; y < 8; ++y) |
| 292 | { |
| 293 | int pushColor; |
| 294 | |
| 295 | if (y < 2) |
| 296 | { |
| 297 | int index = x + y * 8; |
| 298 | if (mStutter[index]) |
| 299 | pushColor = 2; |
| 300 | else |
| 301 | pushColor = 1; |
| 302 | } |
| 303 | else |
| 304 | { |
| 305 | pushColor = 0; |
| 306 | } |
| 307 | |
| 308 | push2->SetLed(kMidiMessage_Note, x + (7 - y) * 8 + 36, pushColor); |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | void StutterControl::LoadLayout(const ofxJSONElement& moduleInfo) |
| 314 | { |