Page 1 of 1

How to capture sound with selected channels on scarlett 4i4?

Posted: Thu Nov 09, 2023 1:59 pm
by Madr

Hello together,

I am starting to understand basics in ALSA and already managed to setup the most with the help of entries in this forum or other sources. One task still remains unsolved which is to record only with selected channels using the focusrite scarlett 4i4. I've connected the interface to a raspberry pi which has the latest release of debian bookworm installed. The problem I am facing is that I want to record only one specific channel or multiple specific channels (for example only channel 4 or only channel 2 and 4. The question is how do I do that. Right I am selecting channels by just recording with up to 4 channels:

Code: Select all

 arecord -D plughw:CARD=3,DEV=0,SUBDEV=0 -f S32_LE -r 48000 -d 10 -c 4 testrecord_c4.wav

What I rather would want to do is:

Code: Select all

 arecord -D plughw:CARD=3,DEV=0,SUBDEV=3 -f S32_LE -r 48000 -d 10 -c 1 testrecord_ch4.wav

or for multiple channels:

Code: Select all

 arecord -D plughw:CARD=3,DEV=0,SUBDEV=[1,3] -f S32_LE -r 48000 -d 10 -c 1 testrecord_ch4.wav

The problem is that my interface is only recognized with one device and one subdevice:

Code: Select all

~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 3: USB [Scarlett 4i4 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and

Code: Select all

~ $ arecord -L
... (other cards) ...
hw:CARD=USB,DEV=0
    Scarlett 4i4 USB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
    Scarlett 4i4 USB, USB Audio
    Hardware device with all software conversions
sysdefault:CARD=USB
    Scarlett 4i4 USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
    Scarlett 4i4 USB, USB Audio
    Front output / input
dsnoop:CARD=USB,DEV=0
    Scarlett 4i4 USB, USB Audio
    Direct sample snooping device
usbstream:CARD=USB
    Scarlett 4i4 USB
    USB Stream Output

Maybe someone knows, how to record like this? Would be a big help. Thanks in advance!
If I just didn't manage to find an entry related to this please just post the link and I'll delete this post rightaway.


Re: How to capture sound with selected channels on scarlett 4i4?

Posted: Thu Nov 09, 2023 10:49 pm
by tseaver

@Madr

Untested, but perhaps arecord's -m / --chmap argument is what you need? I don't know its semantics, exactly.


Re: How to capture sound with selected channels on scarlett 4i4?

Posted: Fri Nov 10, 2023 8:31 am
by bluebell

I use jack_thru and connect the needed capture channels so I can record with Audacity from those jack_thru instances.

Bildschirmfoto_2023-11-10_09-30-49.png
Bildschirmfoto_2023-11-10_09-30-49.png (31.93 KiB) Viewed 4533 times

Re: How to capture sound with selected channels on scarlett 4i4?

Posted: Sat Nov 11, 2023 9:37 pm
by Madr
tseaver wrote: Thu Nov 09, 2023 10:49 pm

Untested, but perhaps arecord's -m / --chmap argument is what you need? I don't know its semantics, exactly.

I just checked the docs again and tried it but doesn't really seem to be what I need or I just didn't figure how to use it properly. But still thanks!

bluebell wrote: Fri Nov 10, 2023 8:31 am

I use jack_thru and connect the needed capture channels so I can record with Audacity from those jack_thru instances.

I am not familiar with Jack but since this is for latency critical applications in real-time processing I'd prefer to use the least amount of programs as possible.

Seems that I will have to stick to my old command, since it's working for me right now. I am recording with the first three channels anyway but it would have been still nice to know how to capture audio in such a way.