cleaning up global scope. most modules go in: global.A
fixing midi export.

you can now specify channel & instrument.

also, the whole midi file should play instead of cutting off at the last
note.