gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Audio > Sine Wave Generator-HELP !!

#28148 - seanfrau - Wed Oct 27, 2004 1:13 pm

Hi Yall.

Does anyone know how to create accurate Digitally - generated ,Low -Frequency Sinewaves ,between 100 and 800 Hz. ,using the GBA Direct Sound ?

This facility, in conjunction with other non-gaming applications for the GBA will take center stage in a science project that I am currently involved with.
_________________
"I beheld the Beast, the Monster I had created"

#28195 - tepples - Wed Oct 27, 2004 7:14 pm

You can generate a sine table and then play that over and over on either of the PCM channels. See the BeLogic documents to learn how to play a sound.

But be warned that the GBA's sound output hardware performs high-pass filtering, so don't expect a flat frequency response even on the headphone jack. The high-pass characteristic is especially strong on the internal speaker (where I've modeled it in Cool Edit as a 3rd order Butterworth high-pass with corner point at 800 Hz).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.