Clarification needed on .wav file sampling rates
Posted: Sun Oct 23, 2016 7:59 pm
Up until now, I was of the apparently misguided belief that all .wav files are 44100 samples per second; some recent experiments have given me to strongly suspect that the .wav format supports 48000 as well, and perhaps other, additional rates. Will someone who actually knows please answer my question: what are the sampling rates that .wav format supports?
This question would probably never have occurred to me, except that last night something very peculiar happened: a certain .wav file that I have plays in the correct key on my computer, but plays about 146.7 cents flat on a Sparkfun "Wav Trigger". The first thing I suspected was that the crystal clock on the Wav Trigger was off frequency; however, the piano-tuning tracks that I have created (that can be a whole new subject!) all play at the correct pitch on the Wav Trigger as well as on the computer.
What I take home from this is that the .wav file header must tell the codec in a computer what sample rate to read at, but in the Wav Trigger that header is at least partially ignored, or perhaps the Wav Trigger has a fixed sample rate of 44100, no matter what.
By the way, using Cool Edit, I made an ASCII listing of the contents of the .wav file I had experienced the wrong pitch on, and LO AND BEHOLD, the "samplespersecond" field said "48000". Using Cool Edit, I then invoked the "Edit Sample Rate" function to set the rate to 44100; however, this caused the same song to play 146.7 cents flat on my computer; therefore, as a next step, I used Cool Edit's "Transform Time/Pitch" function to correct the pitch, saved the file, closed the file, reopened it and made a new ASCII content listing of it. The sampling rate, this time, correctly displayed "44100". Also, the newly-saved .wav file now plays in the correct pitch BOTH in my computer AND in the Wav Trigger. Once again, please: what sampling rates does .wav format support?
This question would probably never have occurred to me, except that last night something very peculiar happened: a certain .wav file that I have plays in the correct key on my computer, but plays about 146.7 cents flat on a Sparkfun "Wav Trigger". The first thing I suspected was that the crystal clock on the Wav Trigger was off frequency; however, the piano-tuning tracks that I have created (that can be a whole new subject!) all play at the correct pitch on the Wav Trigger as well as on the computer.
What I take home from this is that the .wav file header must tell the codec in a computer what sample rate to read at, but in the Wav Trigger that header is at least partially ignored, or perhaps the Wav Trigger has a fixed sample rate of 44100, no matter what.
By the way, using Cool Edit, I made an ASCII listing of the contents of the .wav file I had experienced the wrong pitch on, and LO AND BEHOLD, the "samplespersecond" field said "48000". Using Cool Edit, I then invoked the "Edit Sample Rate" function to set the rate to 44100; however, this caused the same song to play 146.7 cents flat on my computer; therefore, as a next step, I used Cool Edit's "Transform Time/Pitch" function to correct the pitch, saved the file, closed the file, reopened it and made a new ASCII content listing of it. The sampling rate, this time, correctly displayed "44100". Also, the newly-saved .wav file now plays in the correct pitch BOTH in my computer AND in the Wav Trigger. Once again, please: what sampling rates does .wav format support?