I wonder, how does music work in the game? and how much power do we have to alter it, personalize it?

I can clearly notice that, say, battle music makes use of playlists. but how? and how much are those customizable? are they situational to the place we fight?

dungeons: does each one have its own unique tune?