A scheme for generating two simultaneous hard-x-ray free-electron laser pulses with a controllable difference in photon energy is described and then demonstrated using the self-seeding setup at the Linac Coherent Light Source (LCLS). The scheme takes advantage of the existing LCLS equipment, which allows two independent rotations of the self-seeding diamond crystal. The two degrees of freedom are used to select two nearby crystal reflections, causing two wavelengths to be present in the forward transmitted seeding x-ray pulse. The free-electron laser system must support amplification at both desired wavelengths.