Sync issue between midi out and dac

Florent Ghys's icon

I have two pulses :
1/ an sfplay~ playing a short hi-hat file beginning right at 0ms
2/ a GM click playing the note 80 at a velocity of 127 on channel 10 set to AU DLS Synth 1
When metro bangs them, they follow the same tempo but are not together. It's subtle but there are a few ms between them.
Could someone explain me why ?
Thanks a lot.

Florent Ghys's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Something like this :

broc's icon

Audio from DLS Synth goes directly to system output while audio from Max is delayed depending on the I/O vector size. So delaying the notes by the same amount should result in synced timing.

Florent Ghys's icon

Thanks a lot, this is very helpful !
DLS Synth is always a little mysterious for me...