VectorLinux
October 30, 2014, 10:50:28 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: alsa "what you hear" recording - SOLVED  (Read 20736 times)
mick12345678
Vectorite
***
Posts: 140


« on: October 06, 2008, 02:29:43 pm »

I have a dual boot system (XP and VL5.9 Gold). I use the XP mainly as a home recording studio (Creative Audigy 4 card, Goldwave, Audacity, Band In A Box, Anvil Studio), and my intention is to transfer this activity to Linux.

To this end, I have been exploring VL sound configuration and have made some progress.

I can play WAVs and MP3's  (XMMS, Mplayer) and Midis (Rosegarden - with the soundfont loaded externally via asfxload, so as to exploit the h/w synth capability of the Audigy card).

One of the things I have always done under XP is to use the 'record what you hear' feature. That is, I have a sound recording program (some Creative app they throw in with the card) that lets you set "what you hear" as the input source. Typically, I invoke this, then play a midi and the result is I get a WAV file (I know there are other ways of doing this, but this is simple and it works every time).

When I try to do this under VL it doesn't work, whether the recording program is Goldwave (under WIne, so thats a can of worms anyway) or Arecord (from the console).

If I run arecord while playing a clip through XMMS, then I get a WAV file just as I expect. But if I play a midi using Rosegarden, although I can hear it,  arecord captures nothing (the WAV is empty).

I suspect the answer may be to use the "-D" option of arecord, but I haven't had any luck yet.

Is there a clue below ?

Code:
user:$ cat /proc/asound/devices
  0: [ 0]   : control
  1:        : sequencer
  4: [ 0- 0]: hardware dependent
  6: [ 0- 2]: hardware dependent
  8: [ 0- 0]: raw midi
  9: [ 0- 1]: raw midi
 10: [ 0- 2]: raw midi
 11: [ 0- 3]: raw midi
 16: [ 0- 0]: digital audio playback
 18: [ 0- 2]: digital audio playback
 19: [ 0- 3]: digital audio playback
 24: [ 0- 0]: digital audio capture
 25: [ 0- 1]: digital audio capture
 26: [ 0- 2]: digital audio capture
 33:        : timer

user:$ aplay -L
default:CARD=Audigy2
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    Default Audio Device
front:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    Front speakers
rear:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    Rear speakers
center_lfe:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    Center and Subwoofer speakers
side:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    Side speakers
surround40:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Audigy2,DEV=0
    Audigy 4 [SB0610], ADC Capture/Standard PCM Playback
    IEC958 (S/PDIF) Digital Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)

« Last Edit: October 18, 2008, 09:52:59 am by mick12345678 » Logged
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #1 on: October 06, 2008, 06:29:20 pm »

I am not familiar with the recording as you are doing it and I may be way off base here, but I find I have to turn up capture in alsamixer from the terminal inorder to get anything I can hear.

So just to humour me, try typing...
"alsamixer" in the terminal without the quotes
click tab to move to the capture screen
then right arrow over to capture 1 and crank it up
then over to capture 2 and crank it up.

Again, this is something I have to do to record through a microphone.  I don't know if it applies to what you are doing.
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
mick12345678
Vectorite
***
Posts: 140


« Reply #2 on: October 07, 2008, 03:33:52 am »

Thanks - that worked ! Grin
I'd forgotten about the TAB key in alsamixer giving you the 'capture' devices  Roll Eyes

Now, when I play a midi in Rosegarden and do
Code:

arecord -f CD -D hw:0,0 test.wav

it works.

However, if I try to vary the input device it doesn't work.
In the example below, it appears to be recording, but theres nothing in the WAV file.
Code:
user:$ arecord -f CD -D hw:0,1 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 8000Hz)
         please, try the plug plugin


and in the next example, it  doesn't even start recording :
Code:
user:$ arecord -f CD -D hw:0,2 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:959: Channels count non available

Update. The output below suggests to me that maybe "hw:0,1" is the microphone (which would explain why the WAV was empty), but "hw:0,2" is still a mystery...
Code:
user:$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Audigy2 [Audigy 4 [SB0610]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [Audigy 4 [SB0610]], device 1: emu10k1 mic [Mic Capture]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [Audigy 4 [SB0610]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
« Last Edit: October 07, 2008, 06:03:22 am by mick12345678 » Logged
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #3 on: October 07, 2008, 07:08:03 am »

I'm off to work right now, but it's a good community and someone should be responding shortly I imagine.

I'll check on the thread when I get back.

By the way are you using kde or xfce in your VL 5.9 Gold?

Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
mick12345678
Vectorite
***
Posts: 140


« Reply #4 on: October 07, 2008, 07:52:13 am »

thanks for the help.
I am using Xfce.
Logged
Joe1962
Administrator
Vectorian
*****
Posts: 2499



WWW
« Reply #5 on: October 07, 2008, 01:13:18 pm »

Check this out, it might help:
http://www.sabi.co.uk/Notes/linuxSoundALSA.html#tasksRecordPlay
Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10
mick12345678
Vectorite
***
Posts: 140


« Reply #6 on: October 08, 2008, 08:30:49 am »

Thanks for the link, that's helpful  Smiley,
Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #7 on: October 10, 2008, 11:44:32 am »

I can playback sound files, but I can't record with anything other than 'arecord'.

I have tried Audacity (apparently doesn't work well, if at all, in 5.9 so let's forget that for now), MhWaveEdit and now Qtractor. I don't get any error messages, just nothing recorded.

Its not a alsamixer/mute issue, since arecord works (albeit my voice sounds like minnie mouse)
Quote
arecord -f CD -D hw:0,1 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 8000Hz)
         please, try the plug plugin

Do I need to start configuring plugins to get MhWaveedit/Qtractor to record ?
Logged
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #8 on: October 10, 2008, 01:10:04 pm »

What gives you the idea that Audacity doesn't work in 5.9?  I've taken some minidiscs and LPs and digitized them with no problem using Audacity.  I've also converted from one format to another.  AUdacity works very well indeed.

My hardware is decidedly different from yours, BTW, so that may make a difference.
Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
mick12345678
Vectorite
***
Posts: 140


« Reply #9 on: October 11, 2008, 10:41:44 am »

Quote
What gives you the idea that Audacity doesn't work in 5.9?

this thread did http://forum.vectorlinux.com/index.php?topic=5792.15 .

I should clarify  that I am trying to record through a microphone. Would be nice to hear from anyone who has managed to get the combination mic/audigy card/audacity/5.9 Gold working  Cry.
Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #10 on: October 12, 2008, 12:24:47 pm »

Fixed it  Grin !
Yet another alsamixer quirk  - the mic doesnt become a capture device unless you hit the space bar while the mic is selected under the capture display. Strange that 'arecord' worked before  Huh

MhWavedit and Qtractor now both record through the mic ok.
 
Will give Audacity another try.
 
Anyway, 2 steps forward and one step back is still progress in my book  Cheesy
« Last Edit: October 12, 2008, 12:27:11 pm by mick12345678 » Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #11 on: October 13, 2008, 11:49:40 am »

I downloaded Audacity again, and retried but no luck - it won't let me record with the mic. Whatever input option I try (there are a choice of 7 - I tried them all) I get this error when I hit the record button :
Code:
error while opening sound device, Please check the input device settings and the project sample rate.
Qtractor is still allowing mic recording, so it can't be that I accidentally messed up Alsamixer (easily done  Shocked).
 

Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #12 on: October 14, 2008, 08:37:06 am »

Fixed it  Grin
I set the Audacity input/output to be JACK, and quality to 48Khz/16bit.
Messed about with Qjackctl and got nowhere.
Then, by mistake, I accidentally hit the record button when I'd forgotten to start Qjackctl and suddenly it was working !

So it seems the answer is to configure Audacity for Jack, and to let Audacity itself start Jack. Once it has done so, you can startup Qjackctl (if you want, but its not necessary).

I suspect its a lot easier if your sound card is anything other than an Audigy.
Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #13 on: October 16, 2008, 01:55:49 pm »

Cool that it's working!

Your post got me thinking about it again and googling around.
It seems now that the problems a couple of us were having in that thread can be solved by killing jackd after audacity starts (at least for me).
http://forum.vectorlinux.com/index.php?topic=5792.0

That, of course, precludes using jack....

I have been trying to use it as you say, setting audacity for jack, and letting it start the server. Still cannot make it, but there might be some setting that is escaping me.
I don't actually need jack, only alsa mic recording. So the ugly hack of killing jackd after audacity calls it in order to use the alsa devices will have to do for now.
Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #14 on: October 16, 2008, 02:18:52 pm »

Thanks - that fixes it for me  Grin
I can now set 'alsa default' as input/output and record from mic so long as I kill jack (sorry, Jill  Cheesy) before attempting to record.
Nice to know it was a bug & not me  Wink
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!