Tone library music mode/key explorer...

How come this whole thing works if I break it up and handle all the

tone1.isPlaying()

type commands all separately,

but if I try and do this

tone(variable).isPlaying()

I get a spanking?