Mid-point OSnap already exists. It works on LINE objects. Draw line object. Start another drawing command (another LINE or ARC/CIRCLE) and move cursor near the middle of the line object and OSnap will snap to mid-point (orange rectangle marker shows on), same like it activates on end-points.