| 1253 | } |
| 1254 | |
| 1255 | void Looper::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation) |
| 1256 | { |
| 1257 | //jump around in loop |
| 1258 | if (velocity > 0) |
| 1259 | { |
| 1260 | float measurePos = fmod(pitch / 16.0f, mNumBars); |
| 1261 | float sampsPerBar = TheTransport->MsPerBar() / 1000.0f * gSampleRate; |
| 1262 | mLoopPosOffset = (measurePos - fmod(TheTransport->GetMeasureTime(time), mNumBars)) * sampsPerBar; |
| 1263 | if (mLoopPosOffset < 0) |
| 1264 | mLoopPosOffset += mLoopLength; |
| 1265 | mLoopPosOffsetSlider->DisableLFO(); |
| 1266 | } |
| 1267 | } |
| 1268 | |
| 1269 | void Looper::LoadLayout(const ofxJSONElement& moduleInfo) |
| 1270 | { |
nothing calls this directly
no test coverage detected