In the yuefu verse of the Han dynasty, verse was set to melodies of various styles, creating songs that could be performed. These were used at all kinds of occasions, including affairs hosted by the emperor, ritual worship, or friendly gatherings.
到了漢朝時的樂府詩，則是把詩用宮、商、角、徵、羽的音律配樂，變成可以彈奏的歌，在各種重要場合，如帝王請客、祭祀交誼時使用。