However, the relationship between absolute pitch and frequency isn't always trivial. The latter is a physical phenomenon, but the former is psycho-acoustic. When you have sounds with a normal set of overtones that align with a harmonic series, the perceived pitch matches the fundamental frequency. But that frequency doesn't actually need to be audible. By weighting the amplitudes of the partials in a certain way, you can also construct a sound that will be perceived as different pitches by different listeners, or by the same listener under different circumstances.
With sounds whose frequencies aren't all harmonic, assigning a pitch can get more complicated.