added midi code gen