The speed of vibration in a stringed instrument is determined by the length of the string. The shorter the string, the higher frequency of the vibration. This scale is repeated over all eighty-eight keys on a piano, all six strings on a guitar, etc. The distance, for example, from one C to the next C is called an octave. When two notes that are an octave apart are played together, they form a euphonious combination.
Beat frequency has to be understood in order to tune a musical instrument.
The waves coming from the instrument and the waves coming from what it is being tuned to must be at the same frequency. Beat frequency is the number of beats heard per second. It is found by subtracting the lower frequency from the higher one. When two instruments are in tune, the beat frequency should be zero. Frequencies higher than humans can hear which is twenty kHz are called ultrasonic.