Tone with Timer

I’m trying to play a little music through a piezo buzzer at the same time I do a simple NeoPixel lightshow. To support the parallelism necessary, I’m trying to avoid delay and use Timers instead. I’m having some trouble getting the timers to work, and it seems like the timers never start or for some other reason my callbacks are never called.

Before I keep digging myself into this hole, I just want to make sure: There’s nothing fancy/funky about tone that prevents it from working with Timer, right? Here’s the basic gist of what I’m trying to do:

toneTimer = new Timer(0, &MusicPlayer::endNote, *this);
pauseTimer = new Timer(0, &MusicPlayer::endPause, *this);

tone(pin, myNote);

void MusicPlayer::endNote() {

void MusicPlayer::endPause() {
  tone(pin, nextNote);

It’s a bit more complicated than that, but hopefully you get the basic idea. I’m using 2 timers: one for playing the note, one for waiting a bit before the next note. Is this crazy? Will it never work?

Note In case anyone cares, I’m using a similar timer setup with the lightshow and it works like a charm! So, if you need to run a NeoPixel lightshow in parallel with other tasks, Timer is the way to go.

I tested similar code to yours, and the problem seemed to be creating the timer with a 0 duration. If I change the 0 to 1, it works fine.

Thanks! I never considered that my timers might be incorrect.