If you like this I can recommend you to look into the raw audio format [1]. It is a very simple format but it helped me a lot to learn about digital audio.
Just take your fav programming language (I took PHP) and write some bits to a file:
$file = fopen('output.s16', 'w');
$amp = returnANiceSynthValue();
fwrite($file, pack('s', $amp));
[1] http://www.fmtz.com/misc/raw-audio-file-formats