Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MIDI message scheduling #4

Open
Spacechild1 opened this issue Jan 14, 2023 · 0 comments
Open

Improve MIDI message scheduling #4

Spacechild1 opened this issue Jan 14, 2023 · 0 comments

Comments

@Spacechild1
Copy link

I just noticed that you schedule MIDI messages on the tempo clock:

TidalVST/TidalVST.scd

Lines 91 to 97 in a625ad6

thisThread.clock.sched(latency, {
instruments[vstName].midi.noteOn(0, note, velocity);
});
thisThread.clock.sched(sustain + latency, {
instruments[vstName].midi.noteOff(0, note, velocity);
});

For accurate timing, the MIDI messages should be scheduled as OSC bundles instead. For example:

~dirt.server.makeBundle(latency, {
    instruments[vstName].midi.noteOn(0, note, velocity);
});

~dirt.server.makeBundle(sustain + latency, {
    instruments[vstName].midi.noteOff(0, note, velocity);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant