The composer Donald Swann wrote melodies to a number of Tolkien's poems during the professor's lifetime. They were approved by him, and he even added his own melody for Galadriel's
Namárië. The song cycle
The Road Goes Ever On was first published in 1967; Tolkien was still alive. It was then recorded by the singer William Elvin (
nomen est omen?!). This recording is included in the book version that I own - a book well worth buying, as it also includes Tolkien's notes on translations of some of the Elvish poetry.
Of course, everyone has different mental images of melodies, and no one else's songs will be quite like what one person envisions. I, for example, was not satisfied with Swann's version of Bilbo's walking song "The Road Goes Ever On", nor with the movie melody. I made up my own and have sung it to myself on hiking trips.
For more discussion on Tolkien-based music, check out the
Middle-Earth Music Reviews thread. You'll find a number of productions there.
In answer to your question, Tolkien himself was not a musician, but his wife Edith was an accomplished pianist.