-
-
Replying to @alt_kia
"As the PC audio signal is a square wave" What? > final int SAMPLE_RATE = 40000; A 20kHz signal at 40kHz sample rate is a sine wave, not a square wave, because Nyquist. Either this guy is using a horrible sound card with aliasing, or there's harmonic distortion somewhere.
2 replies 0 retweets 2 likes -
It is if you go through a complete sample and reconstruction process intended to reproduce a bandlimited input signal. But if you're bitbanging a speaker you get a lot of the squarewave harmonics. The natural rolloff won't be the same as an antialiasing filter.
1 reply 0 retweets 0 likes -
Yeah, but this is a Java applet running on a PC, so I would *hope* the signal chain is bandlimited and the resampling in use, if any, is mostly free of harmonic distortion.
2 replies 0 retweets 0 likes -
Ah ha, a piece I didn't know. I would hope the same, yes. I saw 'PC audio' and read it as 'PC speaker'. If it really is the 8253-ish-driven speaker, it's likely a bitbanging interface. If it's a soundcard and you're getting 40/60kHz out... yikes.
1 reply 0 retweets 0 likes -
Yeah, I'd expect some funky harmonics out of PC speaker tones. Would be a fun thing to record and see. Legacy ones are definitely driven via a single digital output; I wonder what happens with modern HDA setups though.
2 replies 0 retweets 1 like -
I think for HDA there's two ways, either you feed in the i8253 signal into a pin on the codec, or the BIOS emulates the whole thing using an HDA widget to internally generate the tones inside the codec. I wonder if either or both of those approaches have band-limited output.
1 reply 0 retweets 1 like
Well I just tried both on my laptop. Neither is bandlimited. The i8253 path at 10kHz (i8253 -> HDA codec PCBEEP input -> line out) has harmonics up to at least 290kHz before I hit the noise floor, and the internal gen at 12kHz (HDA codec beepgen -> line out) goes beyond 1MHz (!).pic.twitter.com/QroMccNeNk
-
-
Incidentally, that's 12kHz instead of 10kHz because the uber-crappy HDA internal generator works using an 8-bit divider from 12kHz (48kHz/4). Which makes PC Speaker music completely out of tune if played through it.
1 reply 0 retweets 1 like -
"Enh. Close enough."
1 reply 0 retweets 1 like - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.