MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / RandomizeLengths

Method RandomizeLengths

Source/NoteStepSequencer.cpp:1289–1299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287}
1288
1289void NoteStepSequencer::RandomizeLengths()
1290{
1291 for (int i = 0; i < mLength; ++i)
1292 {
1293 if (ofRandom(1) <= mRandomizeLengthChance)
1294 {
1295 float newLength = ofClamp(ofRandom(2), FLT_EPSILON, 1);
1296 mNoteLengths[i] = ofLerp(mNoteLengths[i], newLength, mRandomizeLengthRange);
1297 }
1298 }
1299}
1300
1301void NoteStepSequencer::DropdownUpdated(DropdownList* list, int oldVal, double time)
1302{

Callers

nothing calls this directly

Calls 3

ofRandomFunction · 0.85
ofClampFunction · 0.85
ofLerpFunction · 0.85

Tested by

no test coverage detected