Recording that audio that the audio interface is currently playing is called "Loopback regording". It seems that the abillity of loopback recording is to some degree dependend on the audio interface you are using. I'm using a Focusrite Saffire Pro 24 DSP. I need to perform several steps to setup my system for loop recording:
1. Setup Loopback channels of audio interface as Studio One audio inputs
Go to Studio One menu, select Options, then Audio Device, then press the button songsettings at the bottom of the dialog window.
Now add the the Loopback channels of your audio interface as new inputs to Studio One. Add them once as Stereo input and once as separate mono inputs.
2. Switch the audio interface from DAW tracking mode to Loopback mode
This tells the audio interface to send the stereo mix to the loopback channel
As soon as my audio interface is switched to loopback recording mode, I can see the incomming audio signal in Studio One. To prevent an audio feedback loop, my interface shuts down the main output so I cannot hear any audio at this point.
3. Select Input Source and arm Studio One Track for recording
Create a new audio track in Studio One. Select the tracks input Source. Loopback L+R in my case. MUTE the track, otherwise the recorded audio is sent to the Studio One mixer that sends it to the audio interface again causing a feedback loop!
Now start the recording in Studio One by hitting the record button in the transport control section and then start the playback on Spotify or Youtube.
If your audio interface does not offer loopback inputs then use the ASIO4ALL Asio drivers if you are on a PC. Just tell Studio One to use ASIO4ALL v2 as audio device and configure it's inputs. Set ASIO4ALL as the default audio playback device on windows otherwise Spotify will playback through your audio interface instead of ASIO4ALL and you have no signal to record. Make sure your computers built in microphone is muted, otherwise it gets recorded through ASIO4ALL as well. After the recording, switch back Studio One and Windows default audio playback device to your audio interface.
Hope this helps!