Best Way to Create a Music System

I was wondering the best way to create a music system. Like if I’m around enemies I will get a battle song or if I’m in a town I get a nice soothing song?