The invented device converts electromagnetic radiation from one frequency to another with use of a moving grating made of a nonlinear medium. Light is input into the medium at one frequency and extracted at a second frequency. This effect is achieved with electromagnetic propagation in a shocked photonic crystal. While a significant change in light frequency would usually require interactions with objects moving at a significant fraction of the speed of light, this approach allows frequency conversion at arbitrarily slow speeds. The amount of frequency shift can be tuned by adjusting the size of the bandgap of the pre-shocked crystal. By tuning the system to match this frequency change, a 100% conversion efficiency can be achieved. This system can also classically decrease the bandwidth of a propagating signal to a single frequency. With the inclusion of defects in the photonic crystal, light can be trapped in a defect state at the shock front for a controlled period of time.