How the sound is produced by software?

The audio card (with the Digital-Analog Converter) is the key component that converts a list of numbers into sound. Let's now dig into what each number in that list means:

Each number is a sample of the waveform at a specific point in time, and it represents the amplitude of the sound wave at that instant.

Typically, these values are in the range −1.0 to +1.0.

Example: Sine Wave

In Mathematica, a 440 Hz sine wave (A4) at time t looks like:

samples = Table[Sin[2 Pi 440 t], {t, 0, 1, 1/44100}];

Each of these values tells the speaker to move its diaphragm forward or backward slightly, creating pressure changes in the air — which we hear as sound.

These samples are sent at high speed (e.g., 44100 per second), which the DAC turns into voltage changes that drive the speaker.