It is currently Sun Apr 28, 2024 2:23 am


CPU Spikes to Red Causing Intermittent Audio Artifacts

Hauptwerk software technical support only. Please make sure you have read the manual, tutorials and FAQ pages before requesting support.
  • Author
  • Message
Offline

RWAbacus

Member

  • Posts: 45
  • Joined: Sat Jun 25, 2011 2:34 pm
  • Location: Uxbridge, ON, CANADA

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostSat Dec 16, 2023 5:00 pm

mdyde wrote:If the method described in that YouTube video (right-clicking on the Hauptwerk process to set its CPU affinity, then clicking OK) resolves your audio glitches problem then it will be because some very high-priority thread belonging to a non-Hauptwerk process (e.g. a driver component) is bound to a particular CPU core which Hauptwerk is also using for its audio engine, resulting in Hauptwerk's audio engine thread being 'choked' and an audio glitch.

If possible, the best way to solve that is to identify the relevant process and avoid having it running at the same time as Hauptwerk, or to persuade it not to bind to any specific CPU core.

However, if you can't easily do that, then in Hauptwerk v8+ there's no need to use the work-around described in that video; instead, simply un-tick the "General preferences | Advanced | Bind audio engine threads to CPU cores on Windows" option in Haupwterk, which achieves the same result. If that option isn't ticked, Windows will move Hauptwerk's threads around amongst CPU cores as and whenever it sees fit. However, if turning that preference off, also having the "Try to run Hauptwerk at real-time priority on Windows" preference ticked (and always launching Hauptwerk 'as Administrator') would probably be important, because in my experience, if not running at real-time priority, Windows often puts audio engine threads on inappropriate CPU cores initially, and an audio glitch occurs when it subsequently moves them (e.g. when you come to play the first large chord).


Well, that worked! I followed your advice and simply un-ticked the "General preferences | Advanced | Bind audio engine threads to CPU cores on Windows" option in Hauptwerk and also having the "Try to run Hauptwerk at real-time priority on Windows" preference ticked (and always launching Hauptwerk 'as Administrator'). These two items solved all of my intermittent audio artifacts. I certainly did try to find the offending driver and/or identify the relevant process to no effective solution. Watching 32 threads fight for a couple of milliseconds (or less) yielded little other than Hauptwerk sure likes thread #7 - or at least used to. Now it doesn't seem to matter what happens or at what level, "All is Calm, All is Bright" <<from Silent Night>>. I wish I didn't have to take the two extra steps of running in Administrator mode (especially getting organists who know less than nothing about a computer's OS). What happens if you don't do that? Is it no longer "It Came Upon a Midnight Clear?

mdyde wrote:As Mark mentioned, you don't need to do anything involving ranks, rank routing, or groups. Everything needed for configuring mix-downs is on the "General settings | Audio mixer" screen. Ranks are routed (directly, or via groups) to 'primary' mixer buses, and the 'master mix' and 'intermediate mix' mixer buses are for mix-downs from the 'primary' mixer buses.

For example, on the "General settings | Audio mixer" screen:

- First, in the left-hand list of buses (within the node for the audio mixer preset that the organ is set to use), highlight just "Intermediate mix 1".

- Now in the right-hand pane, give it an appropriate name, such as "Front mix-down", and select the desired audio device channel(s) for it.

- Now, in the left-hand list of buses, highlight all of the *primary* mixer buses that you're using for your front speakers (and no others).

- Then, in the "Sends: to intermediate mix buses" section at the bottom of the right-hand pane (you may need to drag the screen taller to see them), make sure that intermediate mix bus 1 is ticked. That ensures that those primary buses will also send audio to intermediate mix 1 (your "Front mix-down").

[Also, with just "Intermediate mix 1" highlighted in the left-hand bus list, you may want to un-tick all of its "Sends to master mix buses", otherwise the signal from you front speakers would be reaching your sub-woofer (for example) from two places, thus doubling its amplitude, which you probably wouldn't want.]


I so appreciated your step-by-step instructions here. They almost worked for me.
1) Audio-mixer screen -
check
2) Intermediate mix 1 -
check (first time in this territory - liked it).
3) Front mix-down -
check
4) select the desired audio device channel(s) for it -
check
5) left-hand list of buses, highlight all of the *primary* mixer buses that you're using for your front speakers -
check
and then ... boom ...The mixdown worked for the new mid-channel speakers but all the existing front 3 x 3 stereo pairs stopped working.

So, I quickly undid step 5 and that's how far that went; obviously I'm still missing some 'stuff' ... learning, but still have lots of learning to do. I obviously stopped your instructions at this inflection point. What I did to make it work was just enable the routing table in the MOTU 24Ao interface to send those signals, and that worked.

Thank you for your incredible patience, extensible vocabulary and easy-to-follow instructions. Have a Great Christmas!

Respectfully,
RWAbacus
Offline
User avatar

mdyde

Moderator

  • Posts: 15481
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostSun Dec 17, 2023 6:00 am

Thanks very much, RWAbacus. You're very welcome.
RWAbacus wrote:
mdyde wrote: If the method described in that YouTube video (right-clicking on the Hauptwerk process to set its CPU affinity, then clicking OK) resolves your audio glitches problem then it will be because some very high-priority thread belonging to a non-Hauptwerk process (e.g. a driver component) is bound to a particular CPU core which Hauptwerk is also using for its audio engine, resulting in Hauptwerk's audio engine thread being 'choked' and an audio glitch.

If possible, the best way to solve that is to identify the relevant process and avoid having it running at the same time as Hauptwerk, or to persuade it not to bind to any specific CPU core.

However, if you can't easily do that, then in Hauptwerk v8+ there's no need to use the work-around described in that video; instead, simply un-tick the "General preferences | Advanced | Bind audio engine threads to CPU cores on Windows" option in Haupwterk, which achieves the same result. If that option isn't ticked, Windows will move Hauptwerk's threads around amongst CPU cores as and whenever it sees fit. However, if turning that preference off, also having the "Try to run Hauptwerk at real-time priority on Windows" preference ticked (and always launching Hauptwerk 'as Administrator') would probably be important, because in my experience, if not running at real-time priority, Windows often puts audio engine threads on inappropriate CPU cores initially, and an audio glitch occurs when it subsequently moves them (e.g. when you come to play the first large chord).


Well, that worked! I followed your advice and simply un-ticked the "General preferences | Advanced | Bind audio engine threads to CPU cores on Windows" option in Hauptwerk and also having the "Try to run Hauptwerk at real-time priority on Windows" preference ticked (and always launching Hauptwerk 'as Administrator'). These two items solved all of my intermittent audio artifacts. I certainly did try to find the offending driver and/or identify the relevant process to no effective solution. Watching 32 threads fight for a couple of milliseconds (or less) yielded little other than Hauptwerk sure likes thread #7 - or at least used to. Now it doesn't seem to matter what happens or at what level, "All is Calm, All is Bright" <<from Silent Night>>. I wish I didn't have to take the two extra steps of running in Administrator mode (especially getting organists who know less than nothing about a computer's OS). What happens if you don't do that? Is it no longer "It Came Upon a Midnight Clear?


Excellent.

If Hauptwerk isn't launched from Windows "as Administrator" then Hauptwerk won't have the necessary OS privileges to set itself to run at real-time priority. If audio engine threads aren't bound to CPU cores (either because the Hauptwerk v8+ "Bind ..." preference is unticked, or because the Windows CPU affinity for the process was reset manually after the audio driver started, as in that that YouTube video) then Windows will move audio engine threads around between CPU cores from time to time. My experience is that one sometimes gets audio glitches when it does that (which would be most likely at times of sudden demand, e.g. when playing the first large chord) unless Hauptwerk is running at real-time priority. Hence you may still risk audio glitches if you don't launch "as Administrator" (but feel free to try it anyway -- maybe you will be lucky).
RWAbacus wrote:
mdyde wrote:
RWAbacus wrote:- My "only" remaining problem is that I can't seem to get the mixer (or mixer bus, or Rank Routing) to give me a mixdown of all the FRONT speakers. The moment I start changing any of the working groups outlined above, I destroy them - often losing the SUB in the process.

verything needed for configuring mix-downs is on the "General settings | Audio mixer" screen. Ranks are routed (directly, or via groups) to 'primary' mixer buses, and the 'master mix' and 'intermediate mix' mixer buses are for mix-downs from the 'primary' mixer buses.

For example, on the "General settings | Audio mixer" screen:

- First, in the left-hand list of buses (within the node for the audio mixer preset that the organ is set to use), highlight just "Intermediate mix 1".

- Now in the right-hand pane, give it an appropriate name, such as "Front mix-down", and select the desired audio device channel(s) for it.

- Now, in the left-hand list of buses, highlight all of the *primary* mixer buses that you're using for your front speakers (and no others).

- Then, in the "Sends: to intermediate mix buses" section at the bottom of the right-hand pane (you may need to drag the screen taller to see them), make sure that intermediate mix bus 1 is ticked. That ensures that those primary buses will also send audio to intermediate mix 1 (your "Front mix-down").

[Also, with just "Intermediate mix 1" highlighted in the left-hand bus list, you may want to un-tick all of its "Sends to master mix buses", otherwise the signal from you front speakers would be reaching your sub-woofer (for example) from two places, thus doubling its amplitude, which you probably wouldn't want.]


I so appreciated your step-by-step instructions here. They almost worked for me.
1) Audio-mixer screen - check
2) Intermediate mix 1 - check (first time in this territory - liked it).
3) Front mix-down - check
4) select the desired audio device channel(s) for it - check
5) left-hand list of buses, highlight all of the *primary* mixer buses that you're using for your front speakers - check
and then ... boom ...The mixdown worked for the new mid-channel speakers but all the existing front 3 x 3 stereo pairs stopped working.

So, I quickly undid step 5 and that's how far that went; obviously I'm still missing some 'stuff' ... learning, but still have lots of learning to do. I obviously stopped your instructions at this inflection point. What I did to make it work was just enable the routing table in the MOTU 24Ao interface to send those signals, and that worked.


In step 5 I think you must accidentally also have changed some other setting somehow. For good measure, I just followed my instructions above and they work properly for me, yielding a new mix-down of the front speakers via the "Front mix-down" intermediate mix bus, without adversely affecting the existing front speaker outputs.

As a test, perhaps try selecting just one of your front speaker primary buses, then tick its "Sends: to intermediate mix buses: 1 'Front mix-down'" tick-box, without touching any other settings.

When you play the relevant pipes, do both the green and red virtual signal LEDs light up (as they should) for both that front speaker's primary bus, and also for the "Front mix-down" intermediate mix bus?

Alternatively, if you already it configured how you want it within MOTU's mixer application then of course that's fine too.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Previous

Return to Technical support

Who is online

Users browsing this forum: No registered users and 6 guests