No, according to the WMM you would not be able to do both tasks well simultaneously as they rely on different components of the WMM. Writing an essay relies more on the phonological loop whereas listening to music relies more on the visuo-spatial sketchpad. The central executive has limited capacity and can only focus fully on one task at a time.