Skip to content

Improve MIDI message scheduling #4

@Spacechild1

Description

@Spacechild1

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);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions