| 1154 | } |
| 1155 | |
| 1156 | void NoteStepSequencer::OnGridButton(int x, int y, float velocity, IGridController* grid) |
| 1157 | { |
| 1158 | int col = x + mGridControlOffsetX; |
| 1159 | int row = y - mGridControlOffsetY; |
| 1160 | if (grid == mGridControlTarget->GetGridController() && col >= 0 && col < mLength && velocity > 0) |
| 1161 | { |
| 1162 | int tone = mGridControlTarget->GetGridController()->NumRows() - 1 - row; |
| 1163 | if (mTones[col] == tone && mVels[col] > 0) |
| 1164 | { |
| 1165 | mVels[col] = 0; |
| 1166 | } |
| 1167 | else |
| 1168 | { |
| 1169 | mTones[col] = tone; |
| 1170 | mVels[col] = velocity * 127; |
| 1171 | } |
| 1172 | SyncGridToSeq(); |
| 1173 | UpdateGridControllerLights(false); |
| 1174 | } |
| 1175 | } |
| 1176 | |
| 1177 | void NoteStepSequencer::ButtonClicked(ClickButton* button, double time) |
| 1178 | { |
nothing calls this directly
no test coverage detected