This is absolutely the answer I needed. I never once thought to put the js file in the project files folder... I just had it as a standalone file in the scripts folders. Awesome... I feel like I'm THIS close to have a working NES soundchip, at least in terms of the instruments and playback capability (it doesn't read roms or nsfs...yet)
Ultimately, this combined with the WebMIDI plugin (which is awesome and I would LOVE to see become an official plugin) will alllow users to make their own NES music