| 241 | } |
| 242 | |
| 243 | void StepSequencer::UpdateVelocityLights() |
| 244 | { |
| 245 | if (mVelocityGridController->GetGridController() == nullptr) |
| 246 | return; |
| 247 | |
| 248 | float stepVelocity = 0; |
| 249 | if (mHeldButtons.size() > 0) |
| 250 | stepVelocity = mGrid->GetVal(mHeldButtons.begin()->mCol, mHeldButtons.begin()->mRow); |
| 251 | |
| 252 | for (int x = 0; x < mVelocityGridController->GetGridController()->NumCols(); ++x) |
| 253 | { |
| 254 | for (int y = 0; y < mVelocityGridController->GetGridController()->NumRows(); ++y) |
| 255 | { |
| 256 | GridColor color; |
| 257 | if (stepVelocity >= (8 - y) / 8.0f) |
| 258 | color = kGridColor2Bright; |
| 259 | else |
| 260 | color = kGridColorOff; |
| 261 | |
| 262 | mVelocityGridController->GetGridController()->SetLight(x, y, color); |
| 263 | } |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | void StepSequencer::UpdateMetaLights() |
| 268 | { |