Cool script! I had no idea that one could generate a .wav file using php, and have enjoyed playing with the php class.
I'm not too familiar with the .wav format. I found some resources explaining the different "chunks" found at the beginning of the file. I'm curious about the raw data array. What is the max and min values for the array of numbers before the generated .wav file clips? Using the example you provided, is it 44,100 to -44,100? It's probably a silly questions until I know more. I'll keep looking around for information and will post something once I know more about how an audio file works. :)