2 Samuel 5:24
And let it be, when thou hearest the sound of a going in the tops of the mulberry trees, that then thou shalt bestir thyself: for then shall the Lord go out before thee, to smite the host of the Philistines.
Cross-reference
1 Chronicles 14:15 is the parallel account of this same event, repeating the instruction to attack when hearing marching in the balsam trees.
Joshua 6:10 also involves a divinely timed signal before battle — silence until commanded to shout, paralleling the marching sound signal here.
In Judges 4:14, Deborah tells Barak to go because the Lord has gone out before him — the same divine advance signal as the marching here.
1 Samuel 14:12 shows Jonathan using an enemy's words as a divine signal to attack — here David uses marching sound as God's signal.
In 2 Kings 7:6, the Lord causes the sound of a great army to deceive the enemy, similar to the marching sound in the treetops here.
2 Kings 13:17 uses a prophetic arrow as a sign of victory — here the marching sound is a divine sign of victory over Philistines.
In 1 Samuel 14:9-12, Jonathan uses a verbal sign to know when to attack — a different method but same principle of waiting for God's signal.
1 Samuel 14:15 describes a divinely sent panic among Philistines — here God's going out before David strikes them with similar effect.