m4l send/receive performance & buffer size

Exit Only's icon

I was testing send/receive performance in max4live this morning and noticed something kind of interesting. I made two simple patches, one sending a dictionary of pitch/velocity/duration information from a max midi device and then a max instrument device that played a simple cycle~ with a function/line~ volume control.

I then recorded the output of this, running it at various intervals down to 64n. The timing mostly held up fine, with minor jitter here and there on various buffer sizes in Ableton. The exception was when i hit 2048 it fell apart completely. The timing of notes was way off and it almost had a triplet feel with some notes being skipped. I know max in overdrive has its timing based on signal vector size but I'm kind of surprised at the huge degradation in performance between 1024 and 2048.

I tried investigating using the adstatus object but it seems like it doesnt report anything when running in m4l.

Another thing to note is the tight timing also falls apart if the devices are being edited, which is understandable.

Here are the patches i used. I did this quickly so they are a little bit of a mess
This is the midi device:

Max Patch
Copy patch and select New From Clipboard in Max.

this is the receive test m4l instrument device. I used two cycle~/line~ pairs just in case there were issues with overlapping notes

Max Patch
Copy patch and select New From Clipboard in Max.

(you'll want to enable Open In Presentation on both of those patchers)