Piezo buzzer interference with neopixels

I am trying to work on a project will play a tune using a piezo buzzer, and at the same time flash a neopixel ring. The good part is that it does what I expect it to. However, the piezo buzzer has a different tone when the neopixel flashes.

From what I have read the standard tone library is using interrupts to create the tone. But, neopizels for their timing need to disable the interrupts. This causes the tone to be weird.

Is it possible to run both at the same time like I am looking to do? I am using the following code for the birthday music: https://github.com/AbhishekGhosh/Arduino-Buzzer-Tone-Codes/blob/master/Happy-Birthday-to-You.ino

Unfortunately, the way that tone program is set up, it can't do anything else but play "Happy Birthday".

That is the problem with using delay().

Is there another option that I could try? Or is everything with a tone going to require a delay?

The timers can each generate single, continuous tones on certain output pins without intervention from the CPU, which is similar to how the tone() function works. Unfortunately the tone library supplied with Arduino uses interrupts to toggle the output pins. This approach is not required but allows any pin to be used for output.

To play a tune, you just have to switch the timer outputs on and off, and change the timer output frequencies at appropriate intervals.

That switching could be done either using interrupts or millis() for the note/pause timing. Neither option would take much CPU time, so there would be plenty of time left over to blink some lights. See the tone() docs linked above.

Look around for Arduino music software and see what you can find. Perhaps there is a tone() library that does not use interrupts, with fixed output pins instead. Be sure to investigate the possibilities mentioned in this post.