Re: [Alsa-user] ice1712 recording
On 08/12/16 18:18, James Shatto wrote: > No, I mean you can record all four channels as input at the same time > with the same app. Hence the -c 4 aka 4 channels. In audacity you > just select 4 channels and press record. Once recorded you can break > them out into 4 mono channels and save each individually (unmixed). > There's no mixing involved until you configure it to do so. WAV files > and other audio formats often contain multiple tracks. Individual > unmixed tracks. They are mixed at the time of playback if configured > to do so. Yes that works. I had to select M Audio Delta 44: ICE1712 Multi(hw:0,0) for recording. Page 4-30 of the ice1712/envy24 data sheet shows that a multi channel buffer is used to record "a seamless flow of multiple streams". So the hardware is capable of multitrack record without using any sound servers. Anyway this seems to work with arecord ... pcm.D44_cslave { type dsnoop ipc_key 223456 slave { pcm "hw:0,0" rate48000 period_time 0 # in microseconds buffer_size 256 # in bytes period_size 64 # in bytes channels4 format S32_LE } bindings { 0 0 1 1 2 2 3 3 } } pcm.D44_ch12_capture { typeplug ttable.0.0 1 ttable.1.1 1 slave.pcm D44_cslave } pcm.D44_ch34_capture { typeplug ttable.0.2 1 ttable.1.3 1 slave.pcm D44_cslave } Terminal 1 ... $ arecord -v -DD44_ch12_capture -r 48000 -c 2 -d 60 -fS32_LE ./test12.wav Terminal 2 ... $ arecord -v -DD44_ch34_capture -r 48000 -c 2 -d 60 -fS32_LE ./test34.wav No XRUNs but the buffer settings could do with some further optimisation. The key is to use a dsnoop instead of a hw as the slave. Thanks for your help James. -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
On Thu, 8 Dec 2016 12:18:47 -0600, James Shatto wrote: >As well as a few CLI options for the same. Sox is good for that. For SpaceFM I wrote a script to split and/or merge stereo wav. Written on the fly, so most likely not good shell script writing, but it does what it should do and IIRC ffmpeg was easier to use. [rocketmouse@archlinux bin]$ ls -Ggl s2* lrwxrwxrwx 13 Apr 27 2016 s2a -> s2m lrwxrwxrwx 13 Apr 27 2016 s2d -> s2m lrwxrwxrwx 13 Apr 27 2016 s2l -> s2m -rwxr-xr-x 1 1791 Apr 28 2016 s2m lrwxrwxrwx 13 Apr 27 2016 s2r -> s2m [rocketmouse@archlinux bin]$ cat s2m #!/bin/dash version="2016-04-28" usage() { cat< mono.wav: s2m input_file.wav stereo.wav > left.wav: s2l input_file.wav stereo.wav > right.wav: s2r input_file.wav stereo.wav > dual {left,right}.wav: s2d input_file.wav stereo.wav > all {mono,left,right}.wav: s2a input_file.wav EOF exit $1 } outfile() { outfile="$(echo "$infile" | sed 's/\(.*\).wav/\1_'$1.$suffix/I)" if [ -f "$outfile" ]; then echo "$outfile already exists" usage 1 fi } ex2file() { outfile $1 echo "Export to $outfile" case $1 in mono) ffmpeg -i "$infile" -ac 1 "$outfile" ;; left) ffmpeg -i "$infile" -map_channel 0.0.0 "$outfile" ;; right) ffmpeg -i "$infile" -map_channel 0.0.1 "$outfile" ;; esac } case $1 in -h|--help) usage 0 ;; esac infile="$1" if [ ! -f "$infile" ]; then echo "No file $infile" usage 1 fi num_ch=$(exiftool "$infile" | grep -v "File Name" | grep -v "Directory" | grep "Num Channels" | cut -d: -f2 | sed s/\ //) plural="" if [ "$num_ch" = "" ]; then num_ch="No" else if [ "$num_ch" -ge "2" ]; then plural="s" fi fi if [ "$num_ch" != "2" ]; then echo "$num_ch channel$plural, not a stereo file" usage 1 fi suffix=$(echo "$infile" | rev | cut -d. -f1 | rev) if [ "$(echo "$suffix" | tr [:upper:] [:lower:])" != "wav" ]; then echo "Suffix is \"$suffix\", must be \"wav\", case sensitivity is not required" usage 1 fi case $(basename $0) in s2m) ex2file mono ;; s2l) ex2file left ;; s2r) ex2file right ;; s2d) outfile right ex2file left ex2file right ;; s2a) outfile left outfile right ex2file mono ex2file left ex2file right ;; esac exit -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
> You can mix all 4 inputs down into one stream and then record that, but do you really mean that you can record to 4 separate application threads concurrently without mixing? No, I mean you can record all four channels as input at the same time with the same app. Hence the -c 4 aka 4 channels. In audacity you just select 4 channels and press record. Once recorded you can break them out into 4 mono channels and save each individually (unmixed). There's no mixing involved until you configure it to do so. WAV files and other audio formats often contain multiple tracks. Individual unmixed tracks. They are mixed at the time of playback if configured to do so. By default sound is often configured for stereo with one track panned left and one track panned right. But it's two tracks, not mixed (until reproduced and analog-illy mixed in air). Baring cheap sound devices that have bleed over between tracks with unintentional mixing. In audacity you can separate the channels and unpan them for two true mono tracks. As well as a few CLI options for the same. Sox is good for that. With unix-isms you can send your output to stdout and pipe to stdin of another app. Like tee which can then save a file and redirect the same output to another file. I've sometimes gone this route to output the raw WAV and a compressed MP3 at the same time to two different storage devices / locations. I seem to recall an arecord option to output each channel as it's own mono file. Which you could tail -f on other terminals to pipe that to other things. Seems like --separate-channels is that option. $ arecord --help - James -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
On Mon, 5 Dec 2016 14:27:22 +, zcx wrote: >On 04/12/16 21:09, Ralf Mardorf wrote: >> Only one app can grab the device, if you run two instances of the >> same app, only one instance can grab the device. > >Yes, this appears to be the case. But do you know why? A car has got four wheels, why can't you drive each wheel to a completely different place, at the same time? Why are the four wheels in sync? It doesn't matter what car you own, by design it's the same for all cars. A car with four wheels and four seats provides only one seat for a driver and only one steering wheel. As already pointed out, one sound server is able to access the device and several apps could access the sound server. Problem solved. Regards, Ralf -- "Warum passieren mir immer Sachen, die sonst nur dämlichen Menschen passieren?" - Homer Simpson. -- "Pull a Homer -- to succeed despite idiocy." - The Simpsons -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
On 04/12/16 21:09, Ralf Mardorf wrote: > Only one app can grab the device, if you run two instances of the same > app, only one instance can grab the device. Yes, this appears to be the case. But do you know why? -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
On 04/12/16 21:51, James Shatto wrote: > It can record from all 4. You can mix all 4 inputs down into one stream and then record that, but do you really mean that you can record to 4 separate application threads concurrently without mixing? > I suspect that adding -c 4 would overcome the issue. The -f dat has a > default of -f S16_LE -c 2 -r 48000. So you might want to change that > parameter as well. Terminal 1 ... $ arecord -DD44_ch12_capture -f S24_LE -c 4 -r 96000 test12.wav Recording WAVE 'test12.wav' : Signed 24 bit Little Endian, Rate 96000 Hz, Channels 4 Terminal 2 ... $ arecord -DD44_ch34_capture -f S24_LE -c 4 -r 96000 test34.wav arecord: main:722: audio open error: Device or resource busy Terminal 1 ... ^C Terminal 2 ... $ arecord -DD44_ch34_capture -f S24_LE -c 4 -r 96000 test34.wav Recording WAVE 'test34.wav' : Signed 24 bit Little Endian, Rate 96000 Hz, Channels 4 Terminal 1 ... $ arecord -DD44_ch12_capture -f S24_LE -c 4 -r 96000 test12.wav arecord: main:722: audio open error: Device or resource busy i.e. the same behaviour as before. It appears that one thread is blocking the other. > I have that card, although I haven't booted that old PCI system in a > while. Please try it and see if you can get it to work with multiple concurrent input streams. > It's a nice card, a shame > most newer things don't have PCI in favor of PCIe. This core2duo machine has a gigabyte motherboard with a single PCI slot. The application also has two by two channel separate outputs. It is easy to separate those to Channel 1 & 2 and Channel 3 & 4 in .asoundrc using the dshare plugin. I have tried to separate the two by two channel separate inputs using two instanced of dsnoop, but it does not work. You get the same blocking problem that is exhibited by arecord. > Assuming that it didn't get index 0 in /proc/asound/cards. The Delta 44 is at index 0. zcx -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
It can record from all 4. Although many applications only care about left / channel 1 (defaults). I tend to run pulseaudio over jackd setup. As that was the only way to have your mic be an input other than 1 for apps like skype. Since channel 1 and 2 are typically stereo output. $ man arecord -c, --channels=# the number of channels. The default is one channel. . I suspect that adding -c 4 would overcome the issue. The -f dat has a default of -f S16_LE -c 2 -r 48000. So you might want to change that parameter as well. $ arecord -Dhw:1 -f S24_LE -t wav -c 4 -r 96000 output.wav I have that card, although I haven't booted that old PCI system in a while. What I recall of that card, that should be the highest sampling available for it. 24 bit, 96kHz, 4 channels (input). In theory it has a 10 channel output mixer. It's a nice card, a shame most newer things don't have PCI in favor of PCIe. You might want to simplify your .asoundrc, it's more likely to get in the way than help these days. #- defaults.ctl.card 1 defaults.pcm.card 1 defaults.pcm.device 0 #- Assuming that it didn't get index 0 in /proc/asound/cards. But did get 1. In alsa speak that's equivalent to -Dhw:1,0 . Although you might want to omit the ,0 since that's typcially playback, not capture, so -Dhw:1 - James On 12/4/16, Ralf Mardorfwrote: > On Sun, 4 Dec 2016 20:18:24 +, zcx wrote: >>I have a Delta 44 sound card here that uses the ice1712 chipset. >> >>Am I right in thinking that although the card has 4 mono inputs, it >>can only capture one stream at a time? arecord seems to think so... > > Only one app can grab the device, if you run two instances of the same > app, only one instance can grab the device. > > If several apps should be able to use the device at the same time, you > need a workaround, e.g. dmix or e.g. a sound server, such as e.g. jackd. > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > Alsa-user mailing list > Alsa-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-user > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ice1712 recording
On Sun, 4 Dec 2016 20:18:24 +, zcx wrote: >I have a Delta 44 sound card here that uses the ice1712 chipset. > >Am I right in thinking that although the card has 4 mono inputs, it >can only capture one stream at a time? arecord seems to think so... Only one app can grab the device, if you run two instances of the same app, only one instance can grab the device. If several apps should be able to use the device at the same time, you need a workaround, e.g. dmix or e.g. a sound server, such as e.g. jackd. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
[Alsa-user] ice1712 recording
I have a Delta 44 sound card here that uses the ice1712 chipset. Am I right in thinking that although the card has 4 mono inputs, it can only capture one stream at a time? arecord seems to think so... $ arecord -l List of CAPTURE Hardware Devices card 0: M44 [M Audio Delta 44], device 0: ICE1712 multi [ICE1712 multi] Subdevices: 1/1 Subdevice #0: subdevice #0 I have an alsa application that needs to capture two audio signals concurrently. Both are to be sampled at 48000 sps. The two resulting data streams must be kept completely separate for the application to work. I am trying to avoid using another sound card. So I tried this in .asoundrc... pcm.ice1712 { typehw card0 device 0 channels12 } pcm.D44_ch12_capture { typeplug ttable.0.0 1 ttable.1.1 1 slave.pcm ice1712 } pcm.D44_ch34_capture { typeplug ttable.0.2 1 ttable.1.3 1 slave.pcm ice1712 } If I open a terminal both the capture PCMs work fine on their own... $ arecord -f dat -r 48000 -DD44_ch12_capture test12.wav Recording WAVE 'test12.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo ^C $ arecord -f dat -r 48000 -DD44_ch34_capture test34.wav Recording WAVE 'test34.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo ^C But if I then open another terminal and try to use the capture PCMs concurrently I get $ arecord -f dat -r 48000 -DD44_ch34_capture test34.wav arecord: main:722: audio open error: Device or resource busy I suspect this is a limitation of the ice1712 hardware. Can anyone shed any light on this please? -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ICE1712: Recording from line-in with Audacity
Frank Barknecht wrote: This is from the Wiki at http://audacityteam.org/wiki/index.pl?LinuxIssues Audacity can use ALSA natively if you compile it to use PortAudio v19 instead of the default, v18. Note that v19 is still evolving and not as well tested, but it is the only way that Audacity supports ALSA. Many users have reported good experiences with it. To use it, reconfigure Audacity like this: ./configure --with-portaudio=v19 --without-portmixer Now, is there any tricky mapping of channels, probably with .asoundrc, so that the line-in signal shows up in ch. 1 and 2? Not it pure OSS probably, but you could use libaoss to let Audacity-OSS talk to ALSA devices without knowing it does so. But actually I record radio a lot with ecasound, which has the advantage, that it can be put into a cronjob and thus can even record, when I'm away/asleep. Thanks, Frank, for your suggestions. I didn't dive into ecasound yet, and I don't catch the logics behind aoss, so I tried to compile audacity-1.2 with the portaudio-v19 option: Hard stuff, I got the same compile errors mentioned on the wiki page, and I didn't succeed until I copied an original portaudio snapshot from their homepage INTO the audacity source. Now I have two i/o devices in audacity: /dev/dsp again and TerraTec DMX6Fire, which, until now, seems to be unusable. I'll keep on trying ... Klaus --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ICE1712: Recording from line-in with Audacity
Hallo, Klaus-Peter Schrage hat gesagt: // Klaus-Peter Schrage wrote: Thanks, Frank, for your suggestions. I didn't dive into ecasound yet, and I don't catch the logics behind aoss, so I tried to compile audacity-1.2 with the portaudio-v19 option: [...] Now I have two i/o devices in audacity: /dev/dsp again and TerraTec DMX6Fire, which, until now, seems to be unusable. Hmm, I see trouble coming. I will need to try this as well in the next time, but won't be able to do so this week. I'd be interested in your progress though. Regarding ecasound, I attached a little shell script that we use for about four years now at my work (DLF) to record various radio shows for later use like transcribing interviews and stuff. You'd call it from a cronjob like this: # Forschung Aktuell aufnehmen: 31 16 * * 1-5 /usr/local/bin/auto_aufnahme.sh forschung 1740 mp3 This will record for about half an hour (1740 seconds) into a subdirectory called forschung directly to format mp3 every weekday starting at 16:31 o'clock. The script is using various ecasound options to ensure click-free recordings even with a non-patched kernel by double-buffering and realtime mode. As I said, this is working like that for years now. ciao -- Frank Barknecht _ __footils.org__ auto-aufnahme.sh Description: Bourne shell script
Re: [Alsa-user] ICE1712: Recording from line-in with Audacity
Hallo, Andreas von Heydwolff hat gesagt: // Andreas von Heydwolff wrote: I can recommend also KHdRecord at http://software.jodda.de/record.html. The timer is configurable from within the program. Did you write a postcard? Quoting the site: Most people don't like this program. I have downloads of 100 source packages per week, but I got only 3 postcards at all. So what is the reason, that you don't like it? I like this attitude... ;) I didn't knew about KHdRecord, but I see one problem. It seems to only use OSS as well, which can be a problem especially on ICE1712 chips. For me, nothing beats ecasound in regard to reliably and quick recording, if you can live with the command line. And even one cannot live with a command line there's help in the form of tkeca: http://tkeca.sourceforge.net/ ciao -- Frank Barknecht _ __footils.org__ --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ICE1712: Recording from line-in with Audacity
Frank Barknecht wrote: Hallo, Andreas von Heydwolff hat gesagt: // Andreas von Heydwolff wrote: I can recommend also KHdRecord at http://software.jodda.de/record.html. The timer is configurable from within the program. Did you write a postcard? yes I did :-) I like this attitude... ;) me too. I didn't knew about KHdRecord, but I see one problem. It seems to only use OSS as well, which can be a problem especially on ICE1712 chips. I am using it with a Delta 44 card, the results are satisfying for me. For me, nothing beats ecasound in regard to reliably and quick recording, if you can live with the command line. And even one cannot live with a command line there's help in the form of tkeca: http://tkeca.sourceforge.net/ Never used ecasound yet, will also give it a try. Thanks for the link and shellscript, will look into it. --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user
[Alsa-user] ICE1712: Recording from line-in with Audacity
I have a Terratec DMX6Fire 2496 card, and I'd like to record radio broadcasts through line-in which means input channels 3 4 on my card. Using arecord, I can type for example arecord -D line_in -d 20 -f cd tst.wav with line_in defined by the following clip in .asoundrc: #adcdac 3 and 4 pcm.line_in { type plug ttable.0.2 1 ttable.1.3 1 slave.pcm ice1712 } I'd like to record through Audacity, which I find very convenient, but it operates in OSS emulation mode and the only i/o device accessable there is /dev/dsp. To capture line-in I have to open 4 channels with the line-in signal going to ch. 3 and 4, ch 1 and remaing silent. Now, is there any tricky mapping of channels, probably with .asoundrc, so that the line-in signal shows up in ch. 1 and 2? TIA Klaus --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user