The NES audio processing unit is documented here (or see the Nerdy Nights article). As you can see, it is controlled by setting the states of 21 memory-mapped registers, which control 5 channels (instruments). One of those instruments actually plays samples, meaning that you point it at a buffer containing a waveform (like a .wav file) while the others are like the OPL chip instruments that .BAM was created for. If you want to write a NES game don't do it from scratch, instead take some existing code to play .NSF files or similar. Playing music would be the most modular part of the engine, where you can easily slot in existing code, but you probably ought to try to use existing code for other parts too.
MIDI was proposed in 1981 and not standardised until 1983.
Well, aside from Kids These Days, any programmer can program any computer, right? Maybe you can look more broadly.Still if you know of any TALENTED NES game programmers