Demonstration of a dynamic bandpass frequency filter in a rare-earth ion-doped crystal