Even with barrel rifling and the minie ball, I feel like a trained archer or crossbowman would be more effective in combat. Was the loudness of rifles effective in instilling fear?
This has been asked endlessly. The snapple facts are this:
It takes significantly longer to create bows and to fletch arrows. Years at times for a good bow. A musket can have a simple cast with simple parts that can be made in a straightforward way. This also includes ease of repair and replacement parts.
It takes significantly longer to train with a bow. Especially on horseback. A man can be okay to use his musket after 2 weeks of training. It takes years of training to be proficient with a bow. A lifetime on horseback.
Arrows by the 1500s could not reliably penetrate common armor. Even by the later crusades compound bows would have their arrows bounce or stick out of the armor of crusaders. By the 1500s average armor could even withstand a bobkin arrow from an English longbow. However the earliest muskets could reliably quadruple the kinetic impact of an arrow. Armor was no savior to mass internal damage and trauma.
Bows are a very physical weapon. Crossbows moreso. A musket is not. They may shoot slower but they get significantly less tired doing so.
Unlike a bow a musket is more than a ranged weapon. They were bayonets first and guns second once they fully replaced pikes. A bowman can't ward off a cavalry attack. A bowman can't seize or defend a hill from more men charging up to take it. A bowman can't charge and route wavering infantry. A bow is an inflexible support tool, a musket is a flexible, simple tool. One which combined two roles into one.
Ultimately it's a fallacy to assume muskets just took over overnight. It took 150-200 years to fully take over. However once flintlock muskets came into play men could reliably fire a volley every 20 seconds which, with 3 tanks alternating fire, meant near automatic volleys being laid down. Combine that with the shock factors you mention and it's clear why they took over.
At the end of the day this was a long process and every time a musket centric army of roughly equal strength matched up against a non musket army the former overwhelmingly seized the day. See battles like Pavia. This is the ultimate proof above all.
See H.W. Kochs The Rise of Modern Warfare, 1618-1815
A good archer is far more dangerous in most regards than a pre-modern rifleman, but a good archer is the accumulation of years of training and in many cases the result of an entire culture or sub-culture. Nomadic steppe tribes often used the bow as a way of life since they were children and were expert archers, same for English longbowman as all englishmen were mandated to practice archery for their whole lives.
Turns out though that any fool can be given a musket and a few weeks training and turned into a moderately dangerous soldier, and in the time it takes to raise an army of professional archers you could raise a dozen armies to march in formation and fire volleys toward the enemy.