Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-14-2015, 01:31 PM   #1
LQ Newbie
Registered: Apr 2015
Posts: 1

Rep: Reputation: Disabled
How to record multiple audio channels in commandline with external soundcard

Hi, for scientific reasons I need to record 8 audio channels simultaniously. The process has to be automated, so I want to run everything from commandline.
The device I'm using is a Presonus Audiobox 1818VSL. Ideally it should feed a RaspberryPi which stores it on a external harddrive. For my porpuse the samplerate doesn't really matter, but the file size should not not be to large. So 16 bit and 4 to 8 kHz would be great.
Up to now I've tried to use arecord with every posssible format, bitsize and samplerate, but nothing worked out so far. Obviously arecord missinterpretes the incoming signal, what results in pretty large and samplerate dependend noise.
Surprisingly everthings fine with the recording via audacity, which excludes the possibility of driver problems or something like that.
Does anybody have an idea how to solve this problem?
Thanks in advance
Old 04-15-2015, 08:07 AM   #2
Registered: Oct 2004
Location: Australia
Posts: 37

Rep: Reputation: 2
Have a look at sox,
It includes a recording tool which should solve your issue. It's multi-platform, although I've never been able to get the recorder to work on windoze.
Old 04-15-2015, 08:43 AM   #3
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 3,183
Blog Entries: 1

Rep: Reputation: 676Reputation: 676Reputation: 676Reputation: 676Reputation: 676Reputation: 676
$ arecord -v -D hw:1 -t wav -f S16_LE -c 8 -r 8000 -C -d 10 audio.wav

Seems to work for me. Although I've only tested to -c 2 as my card only has 2 channels. You might need to adjust the -D hw:1 to the card that applies. Although at 8kHz you're missing out on much of the audible (to your microphones) sound envelope.

$ cat /proc/asound/cards

To tell what cards are seen by alsa and their index= number. There might be quirks with your soundcard that only supports certain formats. Or quirks with your .asoundrc (if you have one) that gets in the way. But if the above arecord works for you, then great. The -d ## is the seconds to record and can be omitted if you want to stop it with Cntrl+c aka ^C aka C-c. And -v for verbose can be omitted as well as -C if you invoke it by the arecord name.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Onboard Audio (hda_intel) for Mic Input and Soundcard (ca0106) for Audio Output? snowdonkey Linux - General 1 07-11-2009 03:17 PM
Sound/Multi-channels on an HDA-Intel/C-Media CMI9880 soundcard? newbuntu Linux - Hardware 6 08-09-2005 08:05 PM
Getting CD audio through PCI soundcard NOT motherboard soundcard HalfDiminished Debian 0 01-11-2005 06:59 AM
6 channels audio AKded Linux - Hardware 0 07-29-2004 11:32 AM
Mp3/audio burn commandline neurotic Linux - Software 0 08-05-2003 08:58 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration