It happened on the next day, that an evil spirit from God came mightily on Saul, and he prophesied in the midst of the house: and David played with his hand, as he did day by day. Saul had his spear in his hand;
By this time David had probably written some of the psalms that are now part of the biblical book of Psalms (cf. 2 Samuel 23:1). The introductions and titles to these psalms indicate that a number of them were written during the time of his flight from Saul. These, along with other psalms he wrote over a long and eventful career, give David’s personal views of events that the writer of 1 and 2 Samuel describes in narrative form.