and with them Heman and Jeduthun, and the rest who were chosen, who were mentioned by name, to give thanks to Yahweh, because his loving kindness endures forever;
So David gave him the lyrics, and these guys started singing and worshipping the Lord with this song or psalm.