Sun Sep 04, 2022 2:23 pm
Thanks Martin and Roglu,
This discussion was very helpful. It helped me to realize that the times where the audio dropout occurs tends to be on not very demanding sets after some time playing them, never when I'm stress testing Hauptwerk. That made me think it's likely also a CPU priority issue - a background process takes precedence over Hauptwerk, and robs it of its CPU time, stalling the audio driver.
On my system, Hauptwerk defaults using one of the two "efficiency" cores, rather than the 8 "performance" cores, and for small sets, it pretty much only uses the efficiency cores. Now, I'm running Mac OS 12.5.1, so there aren't really many options for setting the priority for tasks. I did discover however, that there is a sort of way to adjust priority using the "Terminal app". My apologies if this has been discussed for macs before, I couldn't remember if it has. A disclaimer though, apparently this method may cause operating system problems, so caveat emptor!
So, I found out how to increase the priority of Hauptwerk on my mac. I guess there are different ways to do this, the step I followed was for when the program is already open. The first step is to open Hauptwerk, then figure out what its process ID is. To do this, Open the "Activity monitor" app, search for “Hauptwerk” in the search field in the top right hand corner, click on the process in the monitor app, then click on the icon that has an “i” in a circle. The process ID is the number in brackets after “Process Group” at the top. Then, open the "Terminal" app, and type in:
sudo renice -n -10 "Process ID"
I tried without the "sudo," but it didn't work, it said I didn't have permission. Apparently that's the "superuser" way of doing it. It will ask for your password. Enter that, and it should reassign the priority.
To check if the priority has been reassigned correctly, enter:
ps -fl -C "Process ID"
Under the "N" column, it should say -10 (on my system, Hauptwerk defaulted to 0, then was -10 after I changed it).
Basically, Mac OSX usually defaults most non-mac processes at 0, and other processes a number between -20 and 20, with -20 having the highest priority, and 20 having the lowest priority. I would have tried -20, but the article I read cautioned against that, since it may destabilize your system! I guess this is very much a power user type of fix, but there may not be another way.
After I set the priority to -10, I played a number of smaller sample sets that don't tax the hardware too much, and even after about 30 minutes, I didn't have a dropout. I hope that's it!
I also tried to set a higher priority to the audio driver (without the "sudo,") but it wouldn't let me, and I'm a bit more afraid of destabilizing the system with that one, so hopefully I won't have to try that in the future!
There might be a way to set this permanently, with a particular command when the app is closed, but I didn't try this out. I'm not sure if a process number is assigned dynamically, or if a given app always has the same process number. So for the time being I'm going to open Hauptwerk, find out what the process number is, and assign a new priority as above. If I figure out how to permanently assign a higher priority safely, I'll post about it later. It may be that others already know about this, or know more than me, so hopefully they chime in if they do.
If I get audio errors again as before, I'll report back as before!