| 1256 | } |
| 1257 | |
| 1258 | void NoteStepSequencer::RandomizeVelocities() |
| 1259 | { |
| 1260 | for (int i = 0; i < mLength; ++i) |
| 1261 | { |
| 1262 | if (ofRandom(1) <= mRandomizeVelocityChance) |
| 1263 | { |
| 1264 | int newVelocity = 0; |
| 1265 | if (ofRandom(1) < mRandomizeVelocityDensity) |
| 1266 | { |
| 1267 | switch (gRandom() % 4) |
| 1268 | { |
| 1269 | case 0: |
| 1270 | newVelocity = 50; |
| 1271 | break; |
| 1272 | case 1: |
| 1273 | newVelocity = 80; |
| 1274 | break; |
| 1275 | case 2: |
| 1276 | newVelocity = 110; |
| 1277 | break; |
| 1278 | default: |
| 1279 | newVelocity = 127; |
| 1280 | break; |
| 1281 | } |
| 1282 | } |
| 1283 | |
| 1284 | mVels[i] = newVelocity; |
| 1285 | } |
| 1286 | } |
| 1287 | } |
| 1288 | |
| 1289 | void NoteStepSequencer::RandomizeLengths() |
| 1290 | { |
nothing calls this directly
no test coverage detected