We propose to control the characteristics of transition state spectra by designing the initial state of a photochemical reaction. The method proceeds by introducing parameters into the (nonstationary) initial state wave function. The parameters are determined variationally to optimize a desired feature of the spectrum. One important application of this procedure is to reduce the unstructured background in a photoabsorption spectrum. In the resulting spectra, the contrast ratio of the resonance peaks to the background is dramatically increased, allowing a spectral quantization procedure to be used to assign the peaks. The algorithm can also be used to resolve overlapping peaks and to enhance specific progressions. As a theoretical tool, the variational algorithm can be viewed as a method to analyze the resonance structure of a given potential surface. We speculate that control of spectra can also be achieved in the laboratory, and suggest one possible scheme to do so. (C) 1999 Published by Elsevier Science B.V. All rights reserved.