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

Method PlayNote

Source/Looper.cpp:1255–1267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1253}
1254
1255void 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
1269void Looper::LoadLayout(const ofxJSONElement& moduleInfo)
1270{

Callers

nothing calls this directly

Calls 3

MsPerBarMethod · 0.80
GetMeasureTimeMethod · 0.80
DisableLFOMethod · 0.80

Tested by

no test coverage detected