Any poet and writer who has spent enough time in many efforts of original composition should be aware at that stage of creative maturity that composing a poem as a poem is different from composing for a melody. You can have your own arrangement within a poem (even with a recurrent theme) at set junctures at will. However, you're guided by the melody in a piece of music. This is where poetry and melody co-exist. It also helps not to have pre-set definitions of how a poem should be before setting out to work or else that will restrict the generation of ideas. Most poets work on poetry by themselves. However when you set words to music, you work with a musician. It's a co-operative effort and a partnership of creative media.