Looking at my wee sister’s trumpet, I wondered how many notes it could produce when it has only 3 valves. After a bit of research it turns out that the answer is "47 for the most competent players".
Then I found out that there are only 7 valve different valve combinations used to make notes and the combinations are not all used equally. The valves are not all the same - valve 1 lowers the pitch by 2 semitones, valve 2 lowers the pitch by 1 semitone and valve 3 lowers the pitch by 3 semitones. I took the trumpet apart and discovered that the valves look totally different inside and that the cut outs are positioned differently. The calculations needed to work out exactly how to design the valves must be very complex.
Then I wondered about the impact of the trumpet player’s mouth on the notes. The trumpet player also has to do very complex calculations to work out the correct embouchure for each note as you can get so many different notes with the same fingering – luckily the human brain can do these calculations very quickly without the player even realising that they are happening!