It's not the ghost music, I know what that sounds like. And I don't have any pets, and I don't know what it sounds like when a pet dies.
Gnomes have the same life stages, so when you get a gnome, I would assume it'd be a young adult...so maybe it became an adult the first time I heard the music, and an elder the second? If that is what the tune is. Perhaps, like with the ghost tune not starting until after pets, maybe I didn't get the gnome music until after installing pets.