If you mean like you just activate an emote or something and your character plays a whole song automatically, then no, that is not possible. Any music you want to play has to be done in real time where each key press plays a single note. It's entirely up to you to be able to play music as if you're using a virtual instrument.

From what I've heard, there are third-party programs out there which allow you to load MIDI files and have your character basically play the notes in that file without your input. I expect it doesn't always work out very well and may require some knowledge of how to edit the MIDI so that it actually sounds good when converted. But more importantly, please be aware that such tools are not allowed by FFXIV's terms of service! It's possible you could be banned for using such things. I don't know anyone who has been banned for that reason specifically, but even the possibility has shied me away from even touching it. It just doesn't seem worth the risk, to me.