| 963 | } |
| 964 | |
| 965 | void NoteStepSequencer::UpdateLights() |
| 966 | { |
| 967 | if (mController) |
| 968 | { |
| 969 | for (int i = 0; i < NSS_MAX_STEPS; ++i) |
| 970 | { |
| 971 | int button = StepToButton(i); |
| 972 | int color = 0; |
| 973 | if (i < mLength) |
| 974 | { |
| 975 | if (i == mGrid->GetHighlightCol(NextBufferTime(true))) |
| 976 | { |
| 977 | color = LaunchpadInterpreter::LaunchpadColor(0, 3); |
| 978 | } |
| 979 | else if (mVels[i] > 1) |
| 980 | { |
| 981 | int level = (mVels[i] / 50) + 1; |
| 982 | color = LaunchpadInterpreter::LaunchpadColor(level, level); |
| 983 | } |
| 984 | else |
| 985 | { |
| 986 | color = LaunchpadInterpreter::LaunchpadColor(1, 0); |
| 987 | } |
| 988 | } |
| 989 | mController->SendNote(0, button, color); |
| 990 | } |
| 991 | } |
| 992 | } |
| 993 | |
| 994 | int NoteStepSequencer::ButtonToStep(int button) |
| 995 | { |
nothing calls this directly
no test coverage detected