The state of a sound pulse at a particular point in a tube any particular time may be characterized by the direction in which the pulse is propagating, the direction of displacement of the air from its "neutral" position, and whether the pressure is higher or lower than the neutral pressure. If air moves so as to cause an increase in pressure, that means that a high-pressure pulse is coming from the source of the higher pressure, which means the wave will travel in the same direction of the air. If the air moves so as to decrease the pressure, that means that a low-pressure pulse is coming from the side where the air is being drawn, which means the pulse will travel in the opposite direction of the air.
When a pulse hits the open or closed end of a tube, it will be reflected. Because the direction of wave propagation will be reversed, either the displacement or pressure (but not both) will also be reversed. An open end will reverse pressure but keep displacement direction; a closed end will keep pressure but reverse the displacement direction.
The resonant frequency of a tube will be determined by how many round trips are necessary to end up with a wave whose displacement and pressure match the original. If both ends reverse displacement or both ends reverse pressure, then after one round trip the displacement and pressure will end up matching the original. If one end reverses displacement, however, while the other end reverses pressure, then after one round trip both displacement and pressure will be reversed; a second round trip will be necessary to restore both to their original directions.
In a flute, the mouthpiece is constructed so that a high-pressure pulse arriving from within the tube will increase the amount of air which is deflected away from the opening, thus generating a low-pressure pulse in the same way as would an open pipe. A reed assembly which is constructed so that a high-pressure pulse will decrease the amount of air blown into the pipe will behave similarly. A reed assembly may be constructed, however, so that a high-pressure pulse will increase the amount of air blown into the pipe, in which case it would generate a high-pressure pulse whose displacement was the reverse of the original. Using such a reed in a nearly-closed pipe would cause a pulse to regenerate after one round trip, but in an open pipe two round trips would be necessary.