Increasing the rate of alternation from 5 or 10 times per second to a faster rate will cause the back and forth movement of the linear motor to be perceived as sound.

  Times per Second

Electronic Alternator

Connect the audio output of the computer to an amplifier. Connect the output of the amplifier to a linear motor.
Adjust the rate of alternation to 400 times per second. Then click the “On / Off” button to turn on the electronic alternator. The linear motor should move back and forth 400 times per second. Can you hear the tone generated by this motiion?