Major Audio Lag When Moving Objects (and sometimes when not)

Bryan Green's icon

Could someone give me some hints on how to prevent or at least lessen audio lag/hiccups when a project is running and objects are being moved around? I'm running the attached patch (which should hopefully work as-is; I replaced the samples with ones that come with Max)-- and whenever I move objects around, add new objects, etc. the audio will pause ever so slightly, or just totally start playing out of time. The CPU meter says I'm at 1%, and I'm on a Mac mini with a dual-core i5 2.3GhZ CPU. I have 'Overdive' turned on, am running the scheduler in overdrive, etc....and I've tried every combination of I/O and Vector sizes as well, to no avail. This is what keeps me coming back to ( and then leaving ) Max time and time again-- for me, it's not usable in real-time, and the same has been true on every machine I've run it on (including a PC with a 6-core, 3.5GhZ AMD CPU). The patch will even start playing out of time when things are NOT being moved around, which I suppose is caused by background system tasks. Still, with such a lightweight patch as this-- I'd think it would be rock solid!

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

Bryan Green's icon

I take it back-- I fire up Max on my PC for the first time in a while, and this patch runs absolutely rock-solid there. Still-- I would expect my humble Mac to not choke on this...

Bryan

Sy B.'s icon

Bumping this thread as I have the same issue. It didn't bother me before as much, but now that I'm beginning to build patches that I hope to perform (and edit) live, I need to figure out how to get rid of the lag.

What puzzles me is that my patches never take up more than 20% of my CPU (usually much less), but there is considerable lag as soon as I unlock a patch while it's playing and begin moving objects around. Even just moving the mouse while a patch is playing can introduce unpleasant audio stuttering.

I've tried reducing the signal & I/O vector sizes and increasing / decreasing the sample rate. Nothing seems to mitigate the lag.

My specs:

Max 7 on OSX 10.11.6
Quad core 2.3GHz Intel Core i7
16GB RAM

Any advice appreciated. Thanks very much!

Sy B.'s icon

Nudging here one more time. I'm mostly perplexed because the patch I'm working on doesn't take up that much of my computer's resources. I start the patch running and it sounds fine, and then as soon as I so much as move the mouse, the timing gets all out of whack. Editing / moving objects around makes it much worse.

Christopher Overstreet's icon

I recently got an old PC, though I put a nice video card in it. I have a very new imac. When I drag things in the imac, I get some audio problems, but much bigger deal is framerates of video stuff drops dramatically, even if all on the gpu. On the slow PC, I don't have that problem....

Sy B.'s icon

Just passing along a response I got from the support team:

This is a known issue that affects some users when using UI objects on Mac and has to do with the JUCE library. For best results, make sure you have overdrive on and minimize the use of patcher scrolling and UI elements while doing live coding in Max7. Also make sure that you are using Max in low resolution mode, which you can set by going to the finder and doing a Get Info on the Max application icon.

This is something we are actively working on for future versions.

I wasn't aware of overdrive, but it does help quite a bit. Hoping future versions iron this out a bit more.

Ernest's icon

Does the low-resolution mode also apply to compiled Max apps?