The Key to Rondo by Emily Rodda
There are three rules to the old painted, music box: Wind the box three times only. Never shut the box when the music is playing. Never move the box before the music stops. Leo wouldn't dream of breaking these rules, but does his stubborn cousin Mimi listen? She winds the box four times -- and suddenly the paintings on its side come to life and a powerful witch is released. Now its up to Leo and Mimi to stop the witch, if only they can find the key to the music box -- and the magical world it controls.