a1k0n / jsxm

FastTracker 2 .xm module player in Javascript
http://www.a1k0n.net/code/jsxm/
MIT License
485 stars 36 forks source link

Global vars and namespacing #2

Closed tibbon closed 8 years ago

tibbon commented 8 years ago

I love what you've got here. But all of the top level functions and vars are global. Encapsulating these using the module pattern or similar would be awesome for making it more structured.

a1k0n commented 8 years ago

Yeah, it's a complete mess. I have never developed an actual production javascript app before -- can you tell? I'll work on it.

It would also really help to have unit tests for all the effects and various combinations of note on/instrument on/etc, as I keep breaking them.

tibbon commented 8 years ago

Tests would be awesome. I love the book JavaScript Patterns by Stoyan Stefanov for them, but there's some good online resources too. If I can find some time, I might make a PR for you.

a1k0n commented 8 years ago

Thanks @hillerstorm for fixing this...