By pressing down on a key in a piano, you cause a hammer to strike a string which creates standing waves in that string. Since a wave’s velocity is determined by the medium it’s traveling through and all of the strings are made of the same material, you can determine frequency through this method. To determine the fundamental frequency you can do f=v/λ. After that one, each frequency of a standing wave can be determined by the equation fn= n*f1, where fn corresponds to the frequency of the standing wave, n corresponds to the harmonic number, and f1 corresponds to the fundamental frequency.
One equation that describes fundamental frequency is f1 = v / 2L.
To tune a piano each string has to be tuned so that its fundamental frequency corresponds to a specific note. This can be determined by the string’s mass, length, and tension.
Ensuring that each string is tuned to a fundamental frequency corresponding to a specific note guarantees that the sound will be the strongest audible pitch reference and will not have any harmonics, overtones, or partials.
Waves will continue to oscillate until they naturally dissipate, but in pianos that takes quite a long time and sometimes the sound will become muddled from playing too many notes at once. To combat this, pianos have dampeners which decreases the amount of time that it takes for the oscillation of the piano waves