Recording soudcard out

Very little knowledge here.
I’m curious about how to record pretty much any sound going through the soundcard. Assuming there is no copy write issue. If I have a piece of stereo music I can play from the net through my USB connected Scarlett 2i2 and monitors that is not downloadable in any way, I should be able to route that signal somehow to record it into a project shouldn’t I?
I don’t really get how to change mono input 1 and 2 or stereo in 1 input options on a track to somehow record this sound that is passing through the 2i2. I must be able to grab it somehow and divert it to an empty track. It’s probably obvious but I’d appreciate someone giving some direction.

Your audio interface must have this functionality built into the driver. I’m not sure if the 2i2 has this capability or not, but I suggest researching whether or not it does.

For instance, I have a UR28M which has loopback functionality. I can route all the audio that is being output by my interface back into an input channel. This wasn’t always possible with the UR28M but Steinberg released a driver update that enabled it.

Basically, your interface must support this. You can try using a software-based solution but it will prove to be a real pain the ass.

Thanks Arc,
2i2 doesn’t have fold-back (well not internally at least). So I found a couple of ways but neither ended up the greatest quality. I simply unplugged the 2i2 left and right outlets going to monitors and plugged them back into the 2i2 inlets. Had to play with gain and volume a bit, but got it done. Only problem is a fair bit of background hiss/static. Some engineer could probably tell me why.
I also downloaded Audacity for free (what the hell I thought, it’s safe and free). It has a simple record input switch function. Really easy, it just comes up with an exact list of possible recording inputs by detecting your equipment. Automatically came up with a list including do you want to record from the Laptop stereo mix, mic, Scarlett Line in, Scarlett line out!! (basically the same as your foldback on your UR28M which routes all the audio that is being output by my interface back into an input channel for recording. Choose Scarlett line out, hit play, hit record, Audacity records the Scarlett’s line out, done. Export as a 32 bit wave and then import straight into Cubase project. Unfortunately I still wasn’t entirely happy with the quality from Audacity. No hiss like option 1, but the guitars sounded different, more distorted and for some reason a little less “glued” together, with more peaks.
I guess I need to upgrade to a genuine internal loopback interface to really get the job done. Or Cubase could develop a nice simple Interface audio out option as an input choice like Audacity and your UR28M interface. Hmm guess it’s interface update time.

Yes of course you can record it.

Windows has a hidden recording device called “What You Hear”

Just google the following keywords: “recording what you hear windows”
And it will save me from reposting all the steps here.

The legality of recording it, however, is another matter all together!

I looked into the “Record what you hear first”. Had a few driver issues that on research required me to find actual sound-card driver inf data files and manually edit them etc. Apparently it’s a pretty common problem (A few conspiracy theories regarding certain manufacturers deliberately disabling this function). Was going to keep working on it and then thought. Well I have a top level recording software suite at my fingertips, surely I can use that somehow.
I’m not up to anything illegal. I’m a writer who supports artists being paid. There are genuine grounds that would take a while to explain.

Actually the What You Hear is not available to every sound card. There are programs like Total Recorder which can do things like this. It emulates your output via software and enables you to record what you hear.