PCM basics:
Complex audio is a combination of "harmonics" (basically a sine wave). Therefore the simplest tone is a sine wave, because it consists of only 1 harmonic.
The pitch of a sine wave is determined by how many times the wave completes a full sequence per second. IE: if the sine wave repeats ~216 times per second (Hz), the tone is middle C. Faster rates produce higher tones.
The volume of a sine wave is determined by its amplitude, or "height".
Basically the "taller" the wave, the louder it is... and the "wider" it is, the lower pitch it is.
Complex audio is the same principle, only is it the combination of thousands/millions of different harmoics, all of varying length/pitch/amplitude.
This data is stored digitally as a sequence of "samples". Samples represent the point on a sound wave. Therefore the actual sound wave is constructed by stringing together multiple samples. One sample on its own is meaningless.
In other words... take a 2D grid where the X axis is time (the position of the sample) and the Y axis is the amplitude (the value of the sample). Plot out all your sample data on that grid. Then "connect the dots"... and that is your sound wave.
Example... if you have the following string of samples:
2, 2, 2, 2, -2, -2, -2, -2, 2, 2, 2, 2, -2, -2, -2, -2
That would look something like this:
1 2 3 4 5 6 7 8 9
|
+4
+3
+2 **** ****
+1 | | |
0 ....|...|...|...
-1 | | |
-2 **** ****
-3
-4
|
In change the volume, you'd make the wave "taller":
4, 4, 4, 4, -4, -4, -4, -4, 4, 4, 4, 4, -4, -4, -4, -4
1 2 3 4 5 6 7 8 9
|
+4 **** ****
+3 | | |
+2 | | |
+1 | | |
0 ....|...|...|...
-1 | | |
-2 | | |
-3 | | |
-4 **** ****
|
This would play the same tone, but it would be louder.
If you want to alter the pitch, you'd have to make it wider/narrower:
2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2,
1 2 3 4 5 6 7 8 9
|
+4
+3
+2 ** ** ** **
+1 | | | | | | |
0 ..|.|.|.|.|.|.|.
-1 | | | | | | |
-2 ** ** ** **
-3
-4
|
This would be higher pitch (specifically, one octave higher since it's 2x the frequency)
EDIT: I'm probably misusing the term "amplitude" here.... "magnitude" would be a better word.