I just wanted to share my findings in trying to mod the music in Avorion.
It's really easy: Just make sure that the music you want to add is in .ogg format and put it in the appropriate folder. Since most music is .mp3, you'd probably need to either use a software program to convert them, or find a website that will do an online conversion for free. (Try searching for "mp3 ogg batch online convert".)
Myself, I used the free Audacity audio program because it allowed me fine control of quality and file size. (I used a quality setting of "4", which is good enough for me. But "5" may be slightly better.)
But doing it that way was tedious. There are sites and programs that can batch convert dozens of songs at the same time, which is obviously much faster.
Background (ambient) music is located here:
{Steam folder} \steamapps\common\Avorion\data\music\background
Action (combat) music is located here:
{Steam folder} \steamapps\common\Avorion\data\music\action
Don't get me wrong: I love Avorion's music! However, there are only 8 background tracks and only 8 action tracks. After a while, they can start to sound a little repetitive. So, I wanted to add more.
In case anyone else would find this useful, here are the tracks in X2: The Threat that fit a background / ambient theme:
And here are the X2 tracks that fit an action / combat theme:
IMO, another game with music that sounds rather reminiscent of Avorion's is Eve Online.