That got me curious as to how many there actually are. As I understand it, some homebrew NES music engines are intended for NSFs, music ROMs, and demos:
NerdTracker II
FamiTracker
Musetracker
PPMCK: Macro based
Some are specifically designed for games, with smaller ROM and RAM footprints:
FamiTone2
My own sound engine, which lacks a snappy name
I started to write a music engine, for a quick Halloween game. (A cute Bubble Bobble clone.)
Unfortunately, work happened, so it's unlikely to be finished any time soon.
The .asm file is simply labelled "psg"
It's nothing fancy, just bare-bones functions.
Attribute Zone has its own music engine, using a compiler written in Csound, using CsoundMML to input the score. It is very simple though and does not do much.