toneMelody problem in 0019

Newbie poster here: hope I'm putting this in the right place! Maybe it should be under Bugs, but... :slight_smile:

I just started with the Arduino a few days ago, and was using version 0018. The toneMelody example in that version loaded and executed just fine. Today I switched over to version 0019, and found that when toneMelody is executed, only the first note is correct. The following notes do play, but the pitch is (way) wrong. I checked the tone values being used via serial monitor and they are the same.
I see that one of the changes made in 0019 was to the tone() function, and I wonder what needs to be done to get the code to work correctly again?

I'm using a Duemilanove, BTW. Thanks... Tim

This looks to be a bug in tone(), introduced in 0019 (whilst fixing "Issue 228: PWM remains disabled after tone() ends".)

A temporary work-round would be to insert noTone(8); just before the tone comand. That'll work because it ensures that the underlying timer is re-initialised correctly on subsequent tone calls.

[edit: the issue is already logged : Issue 361 : tone command no longer plays frequencies accurately]