The vertical propagation of compression waves from beneath the solar atmosphere is considered. It is shown that at the step-up in critical frequency which occurs at the photosphere, the phase difference between reflected and incident waves is strongly dependent on frequency, and is zero at about 3 mHz. This can explain why velocity power spectra deduced from photospheric spectral lines, have maxima at that frequency, period 5 min, if all modes are excited to equal velocity amplitudes, that is, to equal energy density, in the region just beneath the photosphere. Higher in the atmosphere, there is a step-down in critical frequency into the corona, the whole constituting a quasi-rectangular barrier in critical frequency. Standing-wave components can be set up, by partial reflection, at frequencies higher than the top of the barrier which is at about 4.5 mHz. The first of these has a period of about 200 s, and may be responsible for the peak observed at that period in power spectra from chromospheric spectral lines. For waves of frequency higher than 4.5 mHz, the relatively cool layer between the photosphere and corona acts as an acoustic interference filter which is most transparent at those frequencies at which standing waves are set up within it.