text: why sound is produced when a gun is fired?   sound is made by vibrations of the air (or other medium). vibrations are caused by many means, and a gunfire is one of them. it is called "explosion". it moves the air particles at the end of the barrel in random ways, by expulsion of the combusted gun powder gasses and by the movement of the bullet.   the first reason of the sound is uncontrolled expansion of gasses at the end of the barrel, that cause air particle to vibrate at various frequencies for a short time, while gasses move them apart from one antoher.  the second reason is the bullet breaking the sound barrier when exiting the barrel. it's average velocity is 450 m/s up to 1200 m/s. if speed of sound at 20oc and 1 atm is cca 340 m/s, it is clear that sound barrier is broken, which causes "boom".  so, mixture of those two sounds make sound of a gun fire.