The distance sensor that I use at the moment is an ordinary Sharp infrared distance sensor that measures between 4 and 30 cm. By mounting it behind the valves I can play with the distance much in the same way that I use a plunger mute on the ordinary trumpet.
The plan is to replace this sensor with either the Leap motion controller or the MGC3130 in the future. These sensors will allow me to use hand control in a much more detailed way.