Magnetically induced optical self-pulsing in a nonlinear resonator.