| 94 | } |
| 95 | |
| 96 | void ChaosEngine::Poll() |
| 97 | { |
| 98 | double chaosTimeLeft = mChaosArrivalTime - gTime; |
| 99 | if (chaosTimeLeft > 0) |
| 100 | { |
| 101 | if (chaosTimeLeft > ofRandom(-1000, 3000)) |
| 102 | { |
| 103 | if (mTotalChaos) |
| 104 | TheTransport->SetTimeSignature(gRandom() % 8 + 2, (int)powf(2, gRandom() % 3 + 2)); |
| 105 | |
| 106 | TheScale->SetRoot(gRandom() % TheScale->GetPitchesPerOctave()); |
| 107 | TheScale->SetRandomSeptatonicScale(); |
| 108 | float bias = ofRandom(0, 1); |
| 109 | bias *= bias; |
| 110 | TheTransport->SetTempo(ofMap(bias, 0.0f, 1.0f, 55.0f, 170.0f)); |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | void ChaosEngine::AudioUpdate() |
| 116 | { |
nothing calls this directly
no test coverage detected