A musical instrument is an object capable of producing a sound that is aesthetically perceived as musical. All musical instruments are divided primarily into three groups, depending on what is the source of sound: string (vibration of the string from mechanical action), wind (vibrations caused by the pressure of the air flow) and percussion (vibration of a solid surface). These groups, in turn, are divided into several depending on the method of sound production, among which there are wooden and brass wind instruments, tongue. Keyboard instruments can belong to all three groups, the sources of sound vibrations in them are different. The generally accepted scientific classification of musical instruments is the Hornbostel—Sachs system.
The physical basis of a musical instrument that produces musical sounds (with the exception of electrical devices) is a resonator. It can be a string, a column of air in some volume, an oscillating circuit, or another object capable of storing the supplied energy in the form of vibrations. The resonant frequency of the resonator determines the basic tone (the first overtone) of the sound produced. The instrument can produce as many sounds simultaneously as there are resonators mounted in it. The sound begins at the moment of energy input into the resonator. The resonant frequencies of the resonators of some instruments can often be smoothly or discretely changed while playing the instrument. To forcibly stop the sound, you can use damping.
In musical instruments that produce non-musical sounds, such as percussion, the presence of a resonator is not essential.