An NSF is really just a ROM. In the case of NSFs that contain audio from commercial game, it's the commercial ROM with the game engine/graphical display/enemy and player logic hacked out, leaving only the music player and data.
Editing an NSF to have new sounds is not
fundamentally flawed, but it's not something I'd recommend starting with unless you're already familiar with 6502. It's editing a program you didn't write in compiled or assembled form, meaning no access to source code, comments, and existing blocks of code can't be made longer (because branches/jmps refer to places that were decided when the ROM was assembled). You're dead in the water unless you're already familiar with the language or you're making very small data changes. (You still need 6502 knowledge to find what is data vs what is code.)
FamiTracker:
http://famitracker.com/ Lets you create music with a GUI, and can export to NSF. If all you want is an NSF, that's a good path to take.
If you want to learn 6502, there's easy6502 which lets you write/test code right in your browser with no extra software or anything:
https://skilldrick.github.io/easy6502/It's not the greatest teaching material, I've realized, but if you already have some programming background, you should be able to get there with it.
6502 is separate from NES hardware, which is the real hidden boss of any of this. Nerdy Nights:
http://nintendoage.com/pub/faq/NA/index ... _out.html#teaches 6502 as well as NES hardware. Unfortunately some of the zips in the audio sections are dead, and you'd have to find mirrors. If you can make an NES ROM (and truly understand how one is put together), you can make an NSF just by reading about the differences. Again, an NSF is really just an NES ROM focused on audio.
If you really want to write your own music engine, you're welcome to by figuring out how audio works from either nerdy nights, or the wiki:
https://wiki.nesdev.com/w/index.php/APU_basicsBut there are also several open source ones you can freely use. (Including Famitracker's which basically supports everything NES audio hardware can do already.)
https://wiki.nesdev.com/w/index.php/Tools#Music_tools Unless you want to do some really nuts stuff or do it just for the sake of it, it may not be worth writing your own
music engine. The game itself will be hard enough.
Edit: Oh, hey, I recognize your name. You PM'd me on NES Maker's forum. I did respond, it just ended up taking a while since I was having some computer issues at the time.