Adiabatic transformation of continuous waves into trains of pulses