Motivated by the problem of jet–flap interaction noise, we study the tonal dynamics that occurs when an isothermal turbulent jet grazes a sharp edge. We perform hydrodynamic and acoustic pressure measurements to characterise the tones as a function of Mach number and streamwise edge position. The observed distribution of spectral peaks cannot be explained using the usual edge-tone model, in which resonance is underpinned by coupling between downstream-travelling Kelvin–Helmholtz wavepackets and upstream-travelling sound waves. We show, rather, that the strongest tones are due to coupling between Kelvin–Helmholtz wavepackets and a family of trapped, upstream-travelling acoustic modes in the potential core, recently studied by Towne et al. (J. Fluid Mech. vol. 825, 2017) and Schmidt et al. (J. Fluid Mech. vol. 825, 2017). We also study the band-limited nature of the resonance, showing the high-frequency cutoff to be due to the frequency dependence of the upstream-travelling waves. Specifically, at high Mach number, these modes become evanescent above a certain frequency, whereas at low Mach number they become progressively trapped with increasing frequency, which inhibits their reflection in the nozzle plane.