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.

Beginners > Help with GBA sound

#54098 - thegamefreak0134 - Thu Sep 15, 2005 5:29 pm

Hello all! I am brand new to the whole GBA development scene. In fact, I have successfully gotten through one tutorial from this site. (the one about the pong game.) Due to the fact that I can indeed pick up on things quickly, about halfway through I ignored the logic in the tutorial and began writing my own.

I have the game to a playable point now, and I wanted to go ahead and use the simple code involved to play with sound. Problem is, I looked at the docs on GBA sound and was completely stumped.

I understand the whole concept of registers, but I don't understand how to write a function I can use to handle sound without having clicks and pops and things. I need a sound tutorial more than a sound register reference. Yes, I want to use the DirectSound Channels A and B, but I also don't want to have to neglect the other four channels as they are quite useful as well.

Can someone help a music lover out here? I posted here because I am very new to the scene and just getting into the swing of things, but If you think I'll get more response in the audio section, feel free to let me know.

Thanks in advance for anything and everything you can offer!
_________________
What if the hokey-pokey really is what it's all about?

[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]

#54101 - NoMis - Thu Sep 15, 2005 5:40 pm

Deku Tree's Sound Tutorial is a pretty good starting point.

NoMis
_________________
www.gamedev.at - The austrian gamedev site
hde.gamedev.at - The Handheld Dev Env plugins for Eclipse

#54106 - DekuTree64 - Thu Sep 15, 2005 5:56 pm

Check out my sound tutorial for info on VBlank-timed double buffering with the direct sound channels, and to watch me write a MOD player, complete with a couple of bugs along the way.

I've never played with the GBC channels, although I have been tempted to plenty of times. You've probably already seen it, but BeLogic's site has lots of info, and some nice demos to play with.

The hardest part of using them would just be creating the data to work with, since there aren't many tools for it (the BoyScout player is all that comes to mind). Not to mention synchronizing with buffered sample data would be a pain.

EDIT: Dang, I shouldn't leave posts sitting open half-typed :)
Oh well, thanks for the plug, NoMis.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku


Last edited by DekuTree64 on Sat Sep 17, 2005 12:57 am; edited 1 time in total

#54132 - thegamefreak0134 - Thu Sep 15, 2005 7:22 pm

Deku, your second link is bad. Dunno if its the path or if the site is down but it's not going.

Anywho, I took the liberty of printing out your entire tutorial and wasting about half a stack of paper, but it will all go to good use. I have already played with the boyscout thingy and although it seems to work in the editor, I can't seem to get the built in player to work right. I think I need a malloc routine or something.

Anyway, I'll go home and go coding happy with this stuff and post back here if I have trouble. As a general rule, if it works well, I don't ask questions. Um, you said there were bugs in your tutorial right? Would you mind pointing them out? Thanks.

*EDIT* never mind, I figured the second link out. I already looked at the audio advance site and thus the confusion over registers and whatnot.
_________________
What if the hokey-pokey really is what it's all about?

[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]

#54238 - DekuTree64 - Sat Sep 17, 2005 1:10 am

thegamefreak0134 wrote:
Um, you said there were bugs in your tutorial right? Would you mind pointing them out?

Well I certainly hope there aren't any left to be pointed out :)
The ones I was referring to are all fixed in the end.

I might go back sometime and touch up the tutorial a bit so the bugs never exist at all, but for now I'm just leaving it in its original version. That way you can see the natural progression of writing it, and how the bugs were fixed (i.e. me == lazy)
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku