The phenomenon is explained by the effect of bubble density on the speed of sound in the liquid. The note heard is the frequency of a standing wave where a quarter wavelength is the distance between the base of the mug and the liquid surface. This frequency f is equal to the speed v of the wave divided by four times the height of the water column h: