The sounds are produced by vibrations of the anal opening. Sounds depend on the velocity of expulsion of the gas and the tightness of the sphincter muscles of the anus. Contrary to a popular misconception, fart noise is not generated by the flapping of the butt cheeks.
from Facts on Farts