| 1175 | } |
| 1176 | |
| 1177 | void NoteStepSequencer::ButtonClicked(ClickButton* button, double time) |
| 1178 | { |
| 1179 | if (button == mShiftBackButton) |
| 1180 | ShiftSteps(-1); |
| 1181 | if (button == mShiftForwardButton) |
| 1182 | ShiftSteps(1); |
| 1183 | if (button == mClearButton) |
| 1184 | { |
| 1185 | for (int i = 0; i < mLength; ++i) |
| 1186 | mVels[i] = 0; |
| 1187 | SyncGridToSeq(); |
| 1188 | } |
| 1189 | if (button == mRandomizeAllButton) |
| 1190 | { |
| 1191 | RandomizePitches(GetKeyModifiers() & kModifier_Shift); |
| 1192 | RandomizeVelocities(); |
| 1193 | RandomizeLengths(); |
| 1194 | SyncGridToSeq(); |
| 1195 | } |
| 1196 | if (button == mRandomizePitchButton) |
| 1197 | { |
| 1198 | RandomizePitches(GetKeyModifiers() & kModifier_Shift); |
| 1199 | SyncGridToSeq(); |
| 1200 | } |
| 1201 | if (button == mRandomizeVelocityButton) |
| 1202 | { |
| 1203 | RandomizeVelocities(); |
| 1204 | SyncGridToSeq(); |
| 1205 | } |
| 1206 | if (button == mRandomizeLengthButton) |
| 1207 | { |
| 1208 | RandomizeLengths(); |
| 1209 | SyncGridToSeq(); |
| 1210 | } |
| 1211 | } |
| 1212 | |
| 1213 | void NoteStepSequencer::RandomizePitches(bool fifths) |
| 1214 | { |
nothing calls this directly
no test coverage detected