Audio Recorder is a great free application allows you to record audio from your sound card, microphones, browsers, webcams, music players, Skype calls, and everything plays out of your loudspeakers.
This program supports several output formats such as OGG, M4A, FLAC, MP3, MP2, WAV, SPX.
Multiple formats for recording...
This program is like Replay Music in windows. It can separate audio tracks, but does not tag them.
It will record from Spotify program. You can set a timer to start on hearing sound and set silence between tracks to separate them.
To install this program enter the following into your terminal window...
sudo add-apt-repository ppa:audio-recorder/ppa
sudo apt-get update
sudo apt-get install audio-recorder
For more information click here: Linux Audio Recorder