Until the late 18th century, trumpets had only one long piece of tubing, which allowed them to play certain notes. Trumpeters would pause during a song to exchange tubes, allowing the trumpet to follow key changes and play different notes. This was the standard until the early 19th century, when the demand increased for instruments that could play a range of notes. Heinrich Stolzel is credited with inventing the valve around 1814, which allowed fingerings to replace the cumbersome swapping of tubes.
Trumpet valves have a series of holes in them, which are blocked when the trumpet does not have any buttons pressed down. A person activates a valve by pressing down the buttons on top of the trumpet, which causes the valve to shift positions. Once it shifts positions, the holes in the valve line up with the tubes of the trumpet, causing the tubing of the trumpet to elongate. This allows the trumpeter to vary the pitch.
When no valves are pressed down, the trumpet is said to be in open position. C, G and E are the notes that the trumpet can play with an open fingering. When the closest valve to the face is pressed down, the trumpet can play A, F, A# and D. When the middle valve is pressed down, the trumpet can play B and F#. When the farthest valve from the face is pressed down, the trumpet can play G, D#, A or E.
When the first two valves are pressed down, the trumpet can play A, E and C#. When the back two valves are pressed down, the trumpet can play G# and D#. When the frontmost and back valve are pressed down, the trumpet can play G and D. When a person presses down all three valves, the trumpet can play F# and C#.