It happened, as the ark of the covenant of Yahweh came to the city of David, that Michal the daughter of Saul looked out at the window, and saw king David dancing and playing; and she despised him in her heart.
Now on that day David delivered first this psalm to thank the LORD into the hand of Asaph and his brethren ( 1 Chronicles 16:7 ).