Page 2 of 3
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 7:25 am
by DRW
I would suggest that you do the first few chapters of the tutorial, so that you learn about the NES sound channels and how to control them. This way you aren't completely oblivious to the inner workings.
But for actual practical use, I would suggest using an existing library then. After all, just have a look at FamiTone: Those are more than 1000 lines of code.
And that's his second major version. The first version was much less efficient in ROM size, RAM size and CPU time.
Going through the tutorial first was also a good help for later when I decided that I want a music fadeout in my game. FamiTone doesn't provide runtime changes of the volume, but since I knew how the APU works, I was able to intercept FamiTone's buffer arrays to extract, reduce and reinsert the volume values before the variables are written to the APU.
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 8:37 am
by Pokun
Yes if you have any interest in the APU at all, it is worth to at least read the basic part of the tutorial.
I was very interested how you could make sound out of the NES as it is maybe a bit harder to grasp than graphics. The tutorial shows how to make quite a capable sound driver and you can upgrade it with new features quite easily. It also gave me the necessary knowledge how to do this for other systems with similar sound chips.
That said, it does take time to get things sorted the first time.
One problem with some sound drivers like Famitone is that you have to use a special tracker program to make stuff with it. As for PPMCK you use MML which is probably easier to understand, but it's more designed for composing chiptune NSFs with than to use as a sound driver in a game. With your own sound driver you can design it to take data much similar to MML, or even design your own MML compiler if you want.
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 8:49 am
by tepples
Pokun wrote:One problem with some sound drivers like Famitone is that you have to use a special tracker program to make stuff with it. As for PPMCK you use MML which is probably easier to understand, but it's more designed for composing chiptune NSFs with than to use as a sound driver in a game. With your own sound driver you can design it to take data much similar to MML, or even design your own MML compiler if you want.
Conversely, based on opinions expressed in the
topic "Making MML editing more practical":
One problem with some sound drivers like PPMCK is that you have to use a special MML dialect and compiler to make stuff with it, and beginners may find the edit-compile-run cycle unwieldy. As for FamiTone and GGSound you use a tracker which is probably easier to understand, but the FamiTracker default driver is more designed for composing chiptune NSFs with than to use as a sound driver in a game, and many drivers that take FT exports (such as FamiTone2 and GGSound) cannot handle certain effects, bringing back the edit-compile-run cycle. With your own sound driver you can design it to take data much similar to a tracker, or even design your own tracker if you want.
In theory, just about any driver that works with MML can be made to work with FT exports. It just takes the appropriate converter program.
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 10:24 am
by DRW
Pokun wrote:One problem with some sound drivers like Famitone is that you have to use a special tracker program to make stuff with it.
Isn't FamiTracker the go to program for creating NES music anyway? Is there really any serious alternative, so that the restriction to FamiTracker for FamiTone could be considered a disadvantage?
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 10:41 am
by dougeff
There used to be thefox's Pornotracker / Musetracker.
And several trackers are multi-platform. deflemask, for example.
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 11:15 am
by FrankenGraphics
There's also bananmos:es nerdtracker 2 - which is even hosted by nesdev, apparently:
http://nesdev.com/nt2/ - what a lovely and refreshing site to visit in this time and age!
It has some interesting differences and choices for effects. Not sure how viable it is for homebrew since i don't think that was on the roadmap back then. It is storing volume commands in nibble-sized(!!) words while most other drivers omit having a volume column altogether. Running on DOS(box) is fine, but the absence of select/copy/cut/paste is a bit too masochistic for me.
i like that the site still points to parodius for the forums
Re: Is a good think make my own Sound Engine?
Posted: Fri Mar 01, 2019 7:44 pm
by DRW
O.k., there are other programs. But my focus was:
Is there any serious alternative?
Is there a tracker that has at least half of the popularity of FamiTracker, so that restriction to FamiTracker is an actual disadvantage? Or are these all just niche programs to begin with that nobody really uses anyway?
Re: Is a good think make my own Sound Engine?
Posted: Sun Mar 03, 2019 3:12 am
by kikutano
I'm using Famitone 2, really easy to use and with a lot of features that I need for my game. So, for now I will use it and try to import some goof sfx and music.

Re: Is a good think make my own Sound Engine?
Posted: Sun Mar 03, 2019 3:44 am
by FrankenGraphics
DRW wrote:Is there any serious alternative?
Is there a tracker that has at least half of the popularity of FamiTracker
There's 0cc-famitracker which is currently the only maintained fork of famitracker, which improves the UI quite a bit and has done some changes to the driver as well (linear vibratos being one, musician-friendly arpeggios being another - both leading to less instrument copy-clutter which is significant considering you can only share 64 instruments across a project). It has been disregarded in some threads on here as even less homebrew-oriented in the past, but i'm curious as to what exactly makes conversion from 0cc-famitracker less viable than vanilla famitracker. I might be missing something, but you'd still export a subset of the features and the song format.
edit:
The linear vibrato style should make it a better candidate for converting to pently. Other drivers would not be what you hear is what you get in that regard, so there's that.
Re: Is a good think make my own Sound Engine?
Posted: Sun Mar 03, 2019 6:57 am
by tepples
FrankenGraphics wrote:There's 0cc-famitracker which is currently the only maintained fork of famitracker
0CC-FT is an improvement on FT, but it's no longer "maintained". HertzDevil went on hiatus, jimbo1qaz took it up, and then jimbo1qaz went on hiatus since October.
FrankenGraphics wrote:It has been disregarded in some threads on here as even less homebrew-oriented in the past, but i'm curious as to what exactly makes conversion from 0cc-famitracker less viable than vanilla famitracker.
The 0CC-FamiTracker text export includes many of the new features. However, as stated in
specs.txt: "Bookmarks and the linear pitch setting are not exported to text files." This means a converter cannot tell a song's time signature, which is stored in bookmarks, nor whether the module was authored with linear pitch turned on. I would link to the feature request that I had filed against HertzDevil's fork to include these, but HertzDevil's bug report forum is in "Maintenance Mode" where only administrators can log in:
This board is in 'Maintenance Mode'." /> Okay faithful users...we're attempting to restore an older backup of the database...news will be posted once we're back!
Re: Is a good think make my own Sound Engine?
Posted: Mon Mar 04, 2019 10:02 am
by kikutano
I'm using famitone2 and NESASM3 without any problems, the music is played well and sound effects are ok. I'm using Famitracker to play some samples but when I try to convert a text file or nsf with famitone tool "text2data" or "nsf2data" it give me ALWAYS some error:
Error: effect is too long, Cxx at end of the effect may be missing or
Parsing error (row 394,col 10): Note is out of supported range (C-1..D-6). I've no idea how to find some .ftm or .nsf that can convert in sfx or music. This is really frustrating, I can't compose, so I need to find pre cooked samples and use it. So, what's the best way to find a sound fx, music archive that I can use for my game? Famitracker had a lot of samples, but nothing that I can convert to famitone

. There is a way to rip the sound from other game and reuse it?
Thanks a lot for any suggests!
Re: Is a good think make my own Sound Engine?
Posted: Mon Mar 04, 2019 11:26 am
by NOOPr
Moderators: Please, delete my post if it's inappropriate!
kikutano, you can get some NSFs from this
topic or directly from
MrNorbert1994's
site.
To properly open an NSF on Famitracker, use the rainwarrior's
NSF importer, save the sound as ftm and open it in a newer version of Famitracker for edition.
Remember that as the famitone documentation states:
"Every effect should be finished with silence, and C00 command put to the last row of the effect".
Hope it helps.
Re: Nerdy Nights Tutorial Source Code
Posted: Mon Mar 04, 2019 1:05 pm
by Bregalad
dougeff wrote:My advice for making a sound engine from scratch...
Don't.
Use an existing one.
Horrible advice. If your goal is to quickly develop something that "just work" then it's OK but if you're more curious and want to have your own features...
Re: Is a good think make my own Sound Engine?
Posted: Mon Mar 04, 2019 2:12 pm
by tokumaru
Personally, if I wanted to use other people's code, I'd be coding for a modern platform using libraries. A big part of the fun in coding for the NES is doing everything myself.
If you're more focused on results and want to get your game out more quickly, using other people's code is fine, but don't let anyone dissuade you from doing things yourself just because "it's hard" or "it takes time". Do whatever you think will make the development process more enjoyable to you, and don't hesitate to do things differently if you change your mind along the way.
Re: Is a good think make my own Sound Engine?
Posted: Mon Mar 04, 2019 2:20 pm
by kikutano
tokumaru wrote:Personally, if I wanted to use other people's code, I'd be coding for a modern platform using libraries. A big part of the fun in coding for the NES is doing everything myself.
If you're more focused on results and want to get your game out more quickly, using other people's code is fine, but don't let anyone dissuade you from doing things yourself just because "it's hard" or "it takes time". Do whatever you think will make the development process more enjoyable to you, and don't hesitate to do things differently if you change your mind along the way.
I agree, but as I said before, I prefer to spend the time to develop the gameplay and the graphics, maybe someday I will try to develop my own sound engine. But sometime I prefer to not reinvent the wheel, and the sound programming is not my favorite part when I develop games for work. To be honest, now I use Famitone so I can focus my self on the bank switching.