timning debug

This commit is contained in:
2026-01-13 21:46:33 -06:00
parent 1121dedcee
commit a9f474f397
6 changed files with 27 additions and 4 deletions

View File

@@ -31,6 +31,10 @@ inline float Synth::getParam(ParamId id) {
}
void Synth::handleNoteEvent(const NoteEvent& event) {
std::cout << "Synth::handleNoteEvent: " << std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - event.timestamp) << std::endl;
lastTime = event.timestamp;
if(event.type == NoteEventType::NoteOn) {
// TODO: find quietest voice and assign a note to it instead of just the first inactive one
@@ -106,4 +110,6 @@ void Synth::process(float* out, uint32_t nFrames, uint32_t sampleRate) {
}
}
//std::cout << "Notequeue::push: " << std::chrono::high_resolution_clock::now() - lastTime << std::endl;
}

View File

@@ -52,4 +52,6 @@ private:
// for the scope
ScopeBuffer* scope_ = nullptr;
std::chrono::time_point<std::chrono::high_resolution_clock> lastTime;
};