added midi encoder

for now, it just writes the header chunk