and with them Heman and Jeduthun [with] trumpets and cymbals for those that should sound aloud, and [with] instruments for the songs of God; and the sons of Jeduthun to be at the gate.
So David gave him the lyrics, and these guys started singing and worshipping the Lord with this song or psalm.