If it is determined that the detected jitter value based on the reference value of the tilt value is a value greater than the predetermined jitter value, the jitter value is detected every time the tilt value is changed stepwise within the predetermined range of numeric values including the reference value of the tilt value, and the optimum tilt value corresponding to the medium is set based on th