Liking to write melodic music (8)
I believe the answer is:
penchant
'liking' is the definition.
(penchant is a kind of liking)
'write melodic music' is the wordplay.
'write' becomes 'pen' (synonyms).
'melodic music' becomes 'chant' (chant is a kind of music. I am not sure about the 'melodic' bit.).
'pen'+'chant'='PENCHANT'
'to' is the link.
Can you help me to learn more?
(Other definitions for penchant that I've seen before include "Disposition" , "Inclination; taste" , "Predilection, preference" , "Willingness" , "'Predilection, a strong liking (8)'" .)