Described are devices, systems, and methods for modulating the spectral energy distribution produced by an x-ray source via control of the energy of the x-ray-generating electron beam, e.g., for energy-modulated radiation therapy or other purposes. In some embodiments, such energy modulation is achieved by an add-on device to a linear accelerator. Also disclosed are computational methods and computer program products for planning energy-modulated therapy.