The method of multiple scales is used to derive equations governing the temporal and spatial variation of the amplitudes and phases of in viscid capillary–gravity travelling waves in the case of second-harmonic resonance (Wilton's ripples), but including the effects of: (i) near resonance, (ii) liquid depth, and (iii) pressure perturbations exerted by an external subsonic gas on the liquid–gas interface. The spatial form of the equations shows that, below a critical gas velocity, energy is transferred between the fundamental and its first harmonic in keeping with the energy conservation law. However, the amplitude of the first harmonic decreases with increasing gas velocity. Above the critical gas velocity, the displacement of the gas–liquid interface grows monotonically with distance. It is found that pure amplitude-modulated waves are possible only at perfect resonance. Pure phase-modulated, near-resonant waves are periodic, as the resonance forces a readjustment of the phases to produce perfect resonance. The effectiveness of the resonance in rippling the interface increases as the liquid depth decreases.