Advanced digital audio

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
zoob
Level 1
Level 1
Posts: 5
Joined: Tue Jul 28, 2020 11:02 am

Advanced digital audio

Post by zoob »

I'm interested in recording streaming music digitally without transcoding it first to analog and back again. All I'm seeing is stereo mix/what you hear mixers. I've an external sound card (Focusrite Scarlett 2i2) but everything I've tried still shows analog recording in Audacity. Running LM Cinnamon 19.3

Maybe a dongle is needed?

Someone point me in the right direction.

Thank you
User avatar
blackcarajillo
Level 3
Level 3
Posts: 113
Joined: Wed Jun 22, 2016 12:33 pm

Re: Advanced digital audio

Post by blackcarajillo »

Try to install pavucontrol and open the app and have a look. It is more advanced and allows to choose different sound output and input.
zoob
Level 1
Level 1
Posts: 5
Joined: Tue Jul 28, 2020 11:02 am

Re: Advanced digital audio

Post by zoob »

I have pulse audio control. The recording tab is blank and the rest just analog signal from my external soundcard.
rene
Level 16
Level 16
Posts: 6693
Joined: Sun Mar 27, 2016 6:58 pm

Re: Advanced digital audio

Post by rene »

Above is OK advise if your output has an e.g. "mix" source you can record from but assuming it will not have in your case: I believe every Pulseaudio sink (i.e., output) has a corresponding "monitor" source (i.e., input). To for example record whatever ends up going to my "alsa_output.pci-0000_00_1b.0.analog-stereo" I'd use simply

Code: Select all

parec -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor foo.pcm
parec records by default S16_LE/44100/2 raw PCM which I would play back as e.g. aplay -f cd foo.pcm. You can set or have parec set format automatically with --{fix-}format/rate/channels parameters: man parec. See the output of pactl list sources for the sources you have available.

Note though that this also implicitly comments you preferably having specified a source, since cp src.wav dst.wav "records" src.wav a lot more efficiently. You do say "streaming" so I suppose this is YouTube or something like that but even then you're better of grabbing the video with one of the many available YT-grabbers and dumping the audio directly from it. Better in that above sense of you when using the "monitor" route needing to specify content-format and mux it into some type of file-format yourself.
zoob
Level 1
Level 1
Posts: 5
Joined: Tue Jul 28, 2020 11:02 am

Re: Advanced digital audio

Post by zoob »

I'll look up Pulse Audio sink...

[I've a command line program for Youtube that can just d/l audio (youtube-dl) but it would take forever to cap 200 songs that way.
Spotify premium simply gives me my list of songs and runs through it streaming around 320kbps.]
rene
Level 16
Level 16
Posts: 6693
Joined: Sun Mar 27, 2016 6:58 pm

Re: Advanced digital audio

Post by rene »

A pulseaudio "sink" is as said nothing other than an output (device) and pactl list sources should as far as I know always list a .monitor source, an input, for each sink --- although while I do on this system have an e.g. "alsa_output.pci-0000_03_00.1.hdmi-stereo.monitor" source I don't in fact see an iec958 (S/PDIF) one although I do have those outputs on this card. Not that it matters between an analogue or digital output: this route just grabs whatever is being played before it's send to the card, i.e., certainly before it hits a DAC, but I suppose this is just not what you're looking for in the first place, what with having to "manually" slice and dice songs.

Spotify Premium? As far as I know you can just download the tracks from there. As to YT no personal experience (nor interest) but a child sometimes loads up his phone using https://mp3-youtube.download/nl/online-audio-converter. Definitely very much faster than realtime.
zoob
Level 1
Level 1
Posts: 5
Joined: Tue Jul 28, 2020 11:02 am

Re: Advanced digital audio

Post by zoob »

Pulse won't even open on my box and the reviews are less than stellar. However, I now see that the Pulse volume control has to be started in a certain order...first. Then Audacity and the streaming source.
Thank you
rene
Level 16
Level 16
Posts: 6693
Joined: Sun Mar 27, 2016 6:58 pm

Re: Advanced digital audio

Post by rene »

zoob wrote:
Wed Jul 29, 2020 9:53 pm
Pulse won't even open on my box and the reviews are less than stellar.
You don't say :-) You are still using it though: Pulseaudio is itself not an optional component of a current Mint system; pavucontrol is just a control application for it.

Anyways. No idea what your reply says. It as said seems you shouldn't be attempting what you are attempting in the first place but should just e.g. download tracks directly from Spotify Premium. Luck with it though.
zoob
Level 1
Level 1
Posts: 5
Joined: Tue Jul 28, 2020 11:02 am

Re: Advanced digital audio

Post by zoob »

Phasing out out the SPDIF cable and optical I read. The "outer circle of hell" has been mostly tamed these days simply using HDMI. However, I'm not sure if the frequency and bit depth needs to be totally matched using a mixer/DAW.
User avatar
absque fenestris
Level 9
Level 9
Posts: 2686
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Advanced digital audio

Post by absque fenestris »

I don't know what or who you want to record: in my case - guitar exercises - I ended up with my old cassette recorder: recording - pause - stop.
And never - really never - did the thing ask me for a title, a label, a backup or something --- relaxing ...
Linux Mint 18.3 Sylvia (MATE) 32-bit - Acer D250 Netbook
Linux Mint 20 Ulyana (Cinnamon) 64-bit - Huawei MateBook X Pro
Post Reply

Return to “Sound, Multimedia, & Codecs”