Delay all background processes while music is playing

Hmm, I think of Linux as fundamentally a desktop OS - that’s certainly its background, and at least it falls into the same category with respect to use of background processes.

(By contrast I had in mind embedded operating systems or bare metal.)

Anyway, this may be a little off topic for the main thrust of your post.