Each spark is pushing on the air and can create a sound. Change the frequency of the sparks and you get an equal frequency wave, hitting your ears like a note of music. The creators had to find a way to move seamlessly between frequencies to make the notes sound distinct, instead of just playing the whole scale.
Tesla created the Tesla coil !!!!
He was a famous inventor who created a " lightning machine " in a modern design.