In this paper we propose and demonstrate a dynamic, narrow-bandpass frequency filter. This is generated in a rare-earth ion-doped crystal using a combination of spectral hole burning and Stark shifting. This filter can toggle within one microsecond between absorption and transmission, with similar to 60 dB difference in attenuation, in two separate 1 MHz wide spectral regions. The filter demonstrated here is specifically designed as a component in a rare-earth ion-based quantum repeater protocol. However, this is a general technique that could also be applied for amplitude or phase modulation, or switching between more complicated spectral profiles. (C) 2013 Optical Society of America