M4L Device with pitchshift~ is causing latency

Masa's icon

My very simple M4L Audio Effect Device using pitchshift~ causes noticeable latency in Ableton. I would appreciate any suggestion to avoid that problem. I can use 'Track Delay' adjustment in Ableton, but it would be a bit bothersome if I have to adjust it every time I add or change the setting of that M4L device.

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

Many thanks for your advice,
Masa

Evan's icon

There's no avoiding it, just adjusting for it.
Check out some of the built in M4L devices that use either retune~ or pitchshift~ (the Simple Pitch Shifter device would be a good choice). All of those have latency compensation components.