In the late-1800s, Germans used a "methane whistle", known as a Schlagwetterpfeife, to determine the presence of hydrogen or methane in the air that was circulated in mines. This paper describes a modern version of that concept that should be suitable for safety-related applications in mines, sewers, garages that shelter hydrogen or methane-powered vehicles, etc. A compact, self-resonant standing wave tube, 2 cm in diameter and 3 cm long, is capped at both ends by two small electrodynamic speakers. The cylindrical copper resonator has two slits at the mid-plane to allow a 25 mm fan to continuously sample the air which is brought to the resonator's temperature after being drawn along the outside of the resonator body. Variation in the resonator's temperature is compensated electronically by an integrated-circuit temperature sensor that produces one microampere per Kelvin. The sensor can measure the concentration of hydrogen to an accuracy of better than ±30 ppm or methane to ±0.02% in air using phase-locked loop frequency tracking electronics and a voltage-controlled oscillator. Concentration data will be presented for several different gas mixtures and will be compared to concentrations determined by other techniques (e.g., thermal conductivity gauges).