I'm currently working through the nerdynights tutorial on sound by Metal Slime... but one thing is bothering me as I progress; why bother creating a custom sound engine? I'm only making a tiny little NROM game as my first foray into assembly, and I've got some working beeps and such but I feel like there's probably a generalized, open-source nsf playback engine posted somewhere online that I'm not finding. I would like to not just textually enter each sound effect and note, if Famitracker exists and I can get much faster feedback.
So, is there a source somewhere online that I can just copy into my .asm?
edit: ...just saw GGsound, looking into it....
Pently,
GGSound, and
FamiTone2 are music engines that should be suitable for an NROM game. GGSound and FamiTone2 have converters from FamiTracker. Pently
currently does not because its author (I) was hired for an unrelated paid NES programming project and
lack the waking time to maintain two NES projects plus a day job plus household chores plus personal physical fitness. Instead, a textual input format similar to
MML or
LilyPond is used.
Ah, perfect. I just knew this had already been done, I just didn't have the google-fu for it. Sorry for the stupid question, thank you for the fast answer.
I've seen
people incorporate NSFs directly into their code. Just saying that's an option, if you'd prefer to just keep using FamiTracker.
Including NSF directly (what koitsu said) is not too hard, as long as
- it doesn't use bankswitching
- you know what RAM locations it uses (to avoid overlaps with your own variables)
- you don't need support for sound effects or special sound engine features (like tempo changes)
...for now, I'll hang on to Famitone2. It seems to be the easiest to incorporate... Right now I'm too excited about getting into collision stuff to really bother with sound. I do have a passing interest in forking (or at least modifying) the source for Famitone2 to try and get sweeps and the other unsupported effects incorporated. But that seems like a whole week of work, given my currently loose grasp on the APU channels.