Returning waves reinforce a particular rhythm
A speaker pushes nearby air together, then lets it spread apart. These compressions travel down the tube. Small parcels of air move back and forth near their original positions; the changing compression travels much farther.
The rigid piston reflects the wave. When the round-trip timing matches the drive, successive returning waves reinforce one another. Some places develop large pressure oscillations and others stay relatively quiet. This persistent spatial pattern is a standing wave. Sound pressure means the small variation around the ordinary air pressure.
A microphone detects pressure, so its loudest position need not be where air moves farthest. Air cannot pass through the piston. Its displacement there is small, but pressure can vary strongly. Elsewhere the microphone can become quiet even though the air moves through a large excursion. Such a quiet location is a pressure node.
Sources: [1]
The glass rim is not a sharp end to the moving air
At an open mouth, air can move between the tube and the room. The moving air inside must accelerate some air outside as well. That exterior air adds inertia to the motion. The glass has a sharply defined edge, but the air motion does not stop at that edge.
This changes the timing of the reflected wave relative to the next push from the speaker. For a narrow pipe at sufficiently low frequency, its effect can be represented by a small extra length. The wave behaves as though the pipe extended slightly beyond the measured rim. This extra effective length is called the end correction.
In 1948, Levine and Schwinger obtained a low-frequency correction of 0.6133 times the radius for a thin unflanged circular pipe. A radius of gives about per open end. Thick walls, flanges and higher frequencies change the exterior motion and need a suitable correction.
A pipe closed at one end has a simplest resonance of roughly a quarter wavelength. A pipe open at both ends has a simplest resonance of roughly half a wavelength, with exterior air contributing at both ends. Changing the end plate changes the conditions that the entire standing wave must satisfy.
Two neighbouring resonances remove the shared extra length
Keep the drive tone fixed and continue withdrawing the piston. The next resonance accommodates one additional half wavelength. Both resonant lengths contain the same end correction. Subtracting one length from the other removes it.
For an ideal example, take a drive frequency of and neighbouring resonant lengths of approximately and . Their separation is , which is half a wavelength. Twice that distance, multiplied by the frequency, gives a sound speed near .
Once sound speed is known, identify the resonance order by the number of repeated sections in the standing wave. This tells you the effective length required by that resonance. Its excess over the geometric tube length gives the end correction. More measured positions check whether the same correction describes the sequence.
Sources: [1]
Sharp peaks still need independent geometric information
Hold the piston fixed and vary the drive frequency instead. A series of sharp peaks still appears, but all of them measure the same transit-time scale through one effective length. A somewhat larger sound speed and a correspondingly larger effective length can produce the same entire frequency sequence.
Changing the real tube length provides a new piece of information. The main length changes from one setup to another, and the small end extension is added at each opening. Comparing several lengths separates the two contributions.
Temperature belongs with those measurements. Warm air carries sound faster and shifts a previously resonant tone. The ruler zero and frequency counter need checks too. A small microphone should disturb the open mouth as little as possible. The useful result is a comparable set of lengths, frequencies and temperatures.
Sources: [1]