|
|
Hmmm... a simple speaker tied to a timer on the CPU - this sounds familiar...
In fact this is how the PC Speaker inside your PC works. Now many moons ago, before the days of fancy Soundblasters, you used to be able to get programs which played quite decent waveform audio through the PC speaker - how did they work?
It's actually similar to the way that the RCX drives the motors. Rather than send out different voltage levels, the PCSpeaker programmes worked by sending out pulses at different frequencies. The PC Speaker is actually quite un-responsive, so by sending out the right frequency of pulses, above those that the speaker was intended to handle, the cone of the speaker can't move fast enough and 'hovers' at a particular height. Now - the height depends on the frequency and so can be modified to follow the original waveform, and hence you get a decent sound.
The problem is that the RCX's speaker is actually very small, and very responsive, so using the PCSpeaker approach directly doesn't work. The RCX's speaker actually produces these super-high frequencies, rather than 'faking' a particular output signal strength. So you get very nasty sounding sound.
Mind you.... I though it was worth experimenting around with mega high frequencies.
|
|