[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How is the IIgs beep generated?
"Michael J. Mahon" <mjmahon@aol.com> wrote:
>Mitchell Spector wrote:
>> "Michael J. Mahon" <mjmahon@aol.com> wrote:
>>>The correct parameters for the default IIgs "bonk" are:
>>>
>>>POKE 6,83
>>>POKE 7,2
>>>CALL 768
>>>
>>>That reproduces it quite well. The volume is about 2/3 the max
>>>volume of a raw beep, but the ear doesn't really care. ;-)
>>
>> It's a similar approximation of the GS "bonk" bell (especially
>> the lower tones), but certainly not the same. :)
>
>Try POKEing the parameters I suggested and give it a listen.
Not sure if this is what you're suggesting, but here's what I did:
-Loaded your "Test.bonk" program into memory and ran it once
-Typed in 'CALL 768' and heard one tone only
-Typed in POKE 6,83 <return>, POKE 7,2 <return>
-Typed in 'CALL 768' once again, heard a lower tone this time
>After listening to them side by side, I'll bet it's the best
>approximation that can be produced with Apple II hardware.
It's closer in pitch, but still not the very unique IIgs "bonk".
Using the different parameters (assuming I used them correctly)
got something closer, but still not exact.
>> I'm still curious how the tone is produced. Maybe it's standard
>> speaker toggling that is then filtered or enhanced somehow using
>> something unique to the GS's audio circurity?
>
>The IIgs routine uses completely standard speaker toggling, combined
>with linear decreases in speaker volume throughout the tone--which
>only the IIgs hardware supports.
>
>My routine does exactly the same thing, based on 21.3kHz pulse-width-
>modulation. Many people (particularly those "of an age" ;-) cannot
>hear the 21.3kHz pulses at all, but only the modulation, which is at
>the "bonk" frequency. Ideally, one would use a low-pass filter to
>remove all traces of the 21.3kHz "carrier", but we're trying to use
>standard hardware...
>
>I'm guessing that the primary difference is that on the IIgs, the
>speaker is driven by an audio amplifier from the actual speaker toggle
>logic level, while on all other Apple II's, the speaker is driven by
>a Darlington driver with a peculiar AC-coupled, DC-clamped input.
Ahh. If that's the case, then the "bonk" sound on Apple IIGS,
through which ever method or means it is produced, is unique to
the IIGS and cannot be reproduced identically on an 8-bit Apple II.
Which brings up something interesting that I've always thought
about. It seems like there's this untapped sound capability on the
IIGS which is neither emulated Apple II speaker toggling OR the
Ensoniq synthesizer. Call it enhanced speaker toggling if you will. :)
Apart from the system bell, I've never seen a single programmer
experiment or use this sound feature in any piece of software.
I've seen speaker toggling used in native IIGS software for audio
(e.g. Paperboy, Gauntlet, John Madden's Football) but is it just old
fashioned 8-bit Apple II sound. I wonder if some kind of simple music
program could be written that could use it...just for the sake of
seeing if it could be done. The most simple thing to try would be
to play any of the Control Panel bell pitches at will, like a piano
keyboard! This would be running on a IIgs of course, we're talking
about just playing the pitches in the Sound Control Panel.
Mitchell Spector