1 Samuel 16:23
And it came to pass, when the evil spirit from God was upon Saul, that David took an harp, and played with his hand: so Saul was refreshed, and was well, and the evil spirit departed from him. And it came to pass, when the evil spirit from God was upon Saul, that David took an harp, and played with his hand: so Saul was refreshed, and was well, and the evil spirit departed from him.
Those who observed Saul's strange, distracted condition advised that music be used to soothe and calm his mind, and in providence David was brought to his notice as a skillful musician who was also a valiant man of war, prudent and faithful in all matters because guided by the Lord. In humbled moments Saul felt he wanted one who knew from the Lord how to act according to His will to take charge of the kingdom, and while in a favorable state of mind he sent messengers for David. He soon loved David and made him his armor-bearer and attendant, thinking that if David was favored of God he would be a safeguard to him and perhaps save his life from his enemies.
When David played skillfully upon the harp, Saul was refreshed, his troubled spirit and mind were soothed, the gloom that settled upon him was dispelled, his excited mind was brought into a more rational and happy state, and the evil spirit departed for the time while he played. His distress arose from rebellion and despair after God rejected him, so although music calmed him it did not amount to repentance or reform. Sacred music could bring him relief from the evil spirit and stir him to devotion, so that under its influence he spoke with fervor in praise and prayer, but the effect did not last. After the excitement passed he became exhausted and returned to his former disposition, with good and evil still contending within him.
The verse places the young David in intimate association with Saul through his stay at court and connection with the king's household. That time gave him insight into the cares and sorrows and perplexities concealed by the glitter and pomp of royalty, and he learned there how little worth human glory is to bring peace to the soul. It was with relief and gladness that he returned from the king's court to the sheepfolds and the flocks. It illustrates the contrast between David as a shepherd lad holding God's promise of the throne and standing in trust in God, and Saul as the established king seeking to hold on to his power.
Singing to the glory of God often drives the enemy away, and shouting to God beats him back and gives the victory. When Satan has come down in great power knowing his time is short and the powers of darkness are rising, God's people must constantly rise and keep the ascendancy above the powers of darkness by singing and shouting to God. They are to do so while increasing in power and strength and growing in grace and in the knowledge of the truth, with more glorifying of God and more childlike simplicity.