The first thing that should have been noted while reading this was the way that God shows how to pursue holiness. Interestingly, He shows it by showing what not to do. Romans 12 reflects this by showing how to renew the mind and not to be transformed to this world. Psalm 1 shows how to accomplish this.
The historical context concludes that the sons of Jeduthun were porters (doorkeepers), as stated in 1 Chronicles 16:42. David understood how music was to be organized. In order to be good at singing, it took service and practice. The sons of Jeduthun did this well. In versus 5-8, David is emphasizing the virtue, patience.