3 ms·
In theory, an 1056 Hz 8-bit WAV file filled with alternating +127 and -127 samples will perfectly reproduce a 528 Hz tone. That's about 60kB in size, and a tra
by kd5bjo 9y ago
In theory, an 1056 Hz 8-bit WAV file filled with alternating +127 and -127 samples will perfectly reproduce a 528 Hz tone. That's about 60kB in size, and a traditional LZW compression (I.e. Zip) will work quite well due to the repetition.
- jcims 9y agoWouldn’t that likely end up as a sawtooth pattern at the speaker and thus introduce a number of harmonics?
- kd5bjo 9y agoNot if the sound driver is doing its job properly -- it's generally bad form to add harmonics above the Nyquist frequency[1] of the input file. If you do have to deal with a buggy sound driver, you can use any small multiple of the tone frequency as your sampling rate and still have efficient LZW compression. [1] https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampli...
- jcims 9y agoWell I'll be...TIL - https://imgur.com/a/vr580 https://imgur.com/a/vr580 Actual sawtooth on the left (done at higher bit rate), tone on right is 2khz tone at 8khz sample rate (audacity won't generate tone right at nyquist). Looks like a triangle wave in audacity, but the tone is fairly pure with just a whisper of harmonics, and those are probably from the speaker.
- tripzilch 9y agoCheck out this video, it addresses that, also it's an amazing video, skilled presentation etc: https://xiph.org/video/vid2.shtml https://xiph.org/video/vid2.shtml (tldw: the answer is no, like the other commenter said, if the D/A converter is working properly)