system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do speakers virtually produce any sound?

From my understanding speakers are made up of some vibrating cone of a fixed shape. It just seems to me that such a thing could only produce one sound like a drum.
gpt
It's the *way in which it vibrates* that counts.  Different sounds are made from different pitches and amplitudes.  Pitch is determined by how fast the speaker vibrates, and amplitude is determined by how "hard" it vibrates.

When your computer pumps music to your speakers, it is really pumping a voltage waveform.  This waveform represents the sound of the music (it's what the music looks like on the computer, with the wavy lines).  The waveform represents different sounds with changes in frequency (pitch) and amplitude (loudness).

Now, inside the speaker is the cone, a solenoid (solenoids turn into magnets when current runs through them) and a permanent magnet.  When a voltage is applied to the solenoid, it becomes a magnet, the solenoid and permanent magnet move each other, and the cone (attached to the solenoid) moves.  In fact, if you wanted, the computer could send a signal to the speaker that would make it move the cone once, then hold this position.

Whatever voltage waveform is pumped to the speaker, the speaker will move accordingly.  So, for example, if the voltage waveform is a perfect sine wave, the speaker cone will move like a sign wave.  Incidentally, this movement will cause the air surrounding the cone to move in a sine wave and produce a single pitch. 

In the whole process, the music waveform is converted to a voltage waveform, which electromagnetically moves the cone in the same waveform, reproducing the sound.

So, by changing the frequency of the voltage waveform, you change how fast the speaker vibrates and change the pitch (i.e the sound) made by the speaker.