A phenomenological Ginzburg-Landau theory of charge-density waves is presented. It yields, in the absence of pinning impurities, a manifold of stable (equal-energy) states that are independent of the phase of the wave. The pinning of these waves by impurities (both weak and strong pinning) is examined in detail and spectra for various impurity distributions are analyzed in detail. Strong dependence on the wave phase, change in harmonic content, and phase shifts are common features, in addition to the appearance of a continuous background. There is also a plethora of metastable states, many of which have energies close to the ground state. Comparison between the proposed theory and experiment in NbSe3 is satisfactory.