Accurate MIDI to Audio Timing (Max Instrument in Ableton Live)

    Jul 03 2022 | 11:52 am
    Hi fellow Max friends. I'm having some issues with regards to the timing when using MIDI to trigger audio in my Max patch.
    I've created this example to illustrate my problem.
    Here is my simple click device as a Max Instrument in Ableton Live:
    MIDI to click device.
    MIDI to click device.
    When I resample the audio I get variable timing deviations compared to the MIDI input as illustrated in this picture:
    Timing deviation between MIDI and resampling.
    Timing deviation between MIDI and resampling.
    Is there any way of fixing the timing deviations so that the click is playing exactly when the MIDI note is played?
    I'm currently using Max 8.1.11 (64-bit mac) and Ableton Live 10.1.42.

    • Jul 04 2022 | 3:03 pm
      It looks to me like you are getting about 0.5ms of delay, which people won't hear unless you are stacking identical samples, and is likely just the result of the internal rate of max message handling. I would say you are doing everything right. There is always this kind of tiny (and usually unnoticeable) lag when passing from the Max message domain to audio and vice versa, and it will indeed be variable as it often depends on when your midi and audio events are relative to each other and the frequency of the Max message handling process.