Change midi creation method. Put events on stack and push them and create objects at update scene.