The phrase is from Rudyard Kipling’s The Drums of the Fore and Aft, 1889. A British regiment is facing an Afghan army:
[T]he lower end of the valley appeared to be filled by an army in position—real and actual regiments attired in red coats, and—of this there was no doubt—firing Martini-Henry bullets which cut up the ground a hundred yards in front of the leading company. Over that pock-marked ground the Regiment had to pass, and it opened the ball with a general and profound courtesy to the piping pickets; ducking in perfect time, as though it had been brazed on a rod.
I understand “piping pickets” is figurative language meaning the Afghan soldiers firing at the British. But what, in the literal sense, would a piping picket be?
I suppose piping means pipe-playing, figuratively meaning shooting. Then my best interpretation is that picket (see Merriam-Webster) refers to a detached group of soldiers guarding an army from surprise (Oxford Learner’s Dictionaries says guarding a military base). The reason I’m not entirely satisfied by this is that I don’t think lines of infantrymen at the head of an army engaging the enemy can properly be called a picket, and actual guarding pickets would most likely not play pipes.
A picket may also be people standing or marching in protest, but I cannot see how these would fit.
So is there anything that “piping pickets” literally refers to?