He dealt to everyone of Israel, both man and woman, to every one a loaf of bread, and a portion [of flesh], and a cake of raisins.
So David gave him the lyrics, and these guys started singing and worshipping the Lord with this song or psalm.