Page 1 of 2

Recording wav files from LPs

Posted: Tue 08 Sep 2009, 11:29
by Brian Prewett
Hi All, I am new to Puppy and I like it.

I have been working through my LP collection and saving them to wav files using Windows. Is there an app in the standard Puppy that will record a wav file from Line In on my Creative Xi Fi sound card ? I am not sure about installing extra apps yet.

Thanks in advance . . .Brian

Posted: Tue 08 Sep 2009, 12:40
by rjbrewer
The standard command line audio recorder in linux is "wavrec."
A google search will provide the greatest amount of info.

Wav files can be played by dragging the file to the player (gxine?).

If playing back with "wavplay", they can be stopped with "killall wavplay".

A little help from within Puppy:

http://www.murga-linux.com/puppy/viewto ... =5938#5938

Posted: Tue 08 Sep 2009, 14:10
by davesurrey
Hello Brian,
Welcome to Puppy!

Over the last few years I have converted my Vinyl, Philips compact cassette, RDat and MiniDisc collections plus over 1200 CDs and the one thing I learned was to plan ahead.

It takes a great amount of time and you want to get it done right first time, eg what format to rip to and what if any compression to use. But I guess you know that already.

I see that you say you are not sure about installing extra apps yet. You didn't say what version of Puppy you are using but if it's the latest official version then there doesn't seem to be any GUI based app as standard. So using the command line and wavrec may be your only option.

I'd have a quick look to see if that's what you feel comfortable with perhaps by going to http://www.murga-linux.com/puppy/viewtopic.php?p=5938

Alternatively, if like me you want to rip, convert to WAV, and then edit and perhaps clean up the recording for noise and clicks, then you may need something more like Audacity.

I have to say I've never used it on Puppy but if you are interested then you will have to download the required pets...much easier than you may think.

Again I suggest you have a look at http://www.murga-linux.com/puppy/viewtopic.php?t=35225

If you feel this is a lot of trouble then please remember that IMHO (and a lot of other folks') one of Linux's weaker parts is multimedia. But it does have so many other strengths that make it worth sticking with.

HTH
Dave

EDIT:
Just seen a new version of Audacity which may be simpler for you to install if you go down that route.

http://www.murga-linux.com/puppy/viewtopic.php?t=35225

Posted: Wed 09 Sep 2009, 02:12
by mikeb
Attached is a 'simple as yer get' gui recorder script...will record as wav or mp3...make sure the mixer is set up first...space bar sets the capture input
Extract and click on it to run....
mike

edit
added fancy version

Posted: Wed 09 Sep 2009, 11:01
by davesurrey
Very nice script Mike. Is it yours?

Not sure what it's using but I see it stops at 196kbps highest bitrate. If I dived into the script and added to the selections 256 and 320kbps do you think anything would stop that working?

Cheers
Dave

Posted: Wed 09 Sep 2009, 17:03
by mikeb
Not sure what it's using but I see it stops at 196kbps highest bitrate. If I dived into the script and added to the selections 256 and 320kbps do you think anything would stop that working?

probably.....whatever lame will handle..I think I just chose some common values that we use

mike

arecord ... | lame .... not working on Puppy 4.3.1

Posted: Tue 01 Dec 2009, 10:51
by mcewanw
mikeb wrote:Attached is a 'simple as yer get' gui recorder script...will record as wav or mp3...make sure the mixer is set up first...space bar sets the capture input
Extract and click on it to run....
mike
Not sure if it is a bug or if I'm doing something wrong, but I couldn't get this program to work on Puppy 4.3.1

I wondered if you have tried it there.
I set up alsamixer okay (and confirmed it worked by installing sox and using the utility 'rec' provided sox to record). But with your recorder script I just received a terrible noise! I also tried piping alsamixer through lame (various options for different bit rates etc) at the commandline, but still just the ... noise...

arecord try.wav

on its own works fine, so I'm left wondering if Puppy 4.3.1 lame is functioning correctly.

Posted: Tue 01 Dec 2009, 10:57
by mcewanw
I have now taken the okay try.wav and tried:

Code: Select all

lame -V2 try.wav try.mp3
Then

aplay try.mp3

but again the result is just terrible noise.

Posted: Tue 01 Dec 2009, 13:55
by Flash
Have you tried mhWaveEdit (I don't remember where I got it and I don't have time to research it. I think it's available from Puppy's package manager. If not, you might find it in the Additional Software section.)

Posted: Tue 01 Dec 2009, 13:59
by mikeb
Terrible noise usually means endidness....ie the bytes are the wrong way around....cdr uses one way wav uses the other...there are options for this ...look up arecord --help...I'm guessing the default behaviour has changed in a newer version so I may not have specified it....lame expects little endian I believe..eg wav .
My script is very simple ..I'm sure you will see what it is doing....and no I havent tried 4.3 yet...too many other things to do :)

mike

Posted: Tue 01 Dec 2009, 14:23
by mikeb
hmmm I did not add -t wav when piping to lame but its a raw output anyway and -f cd is used.....and your test suggests the problem is in lame too.

From lame --longhelp

-r input is raw pcm
-x force byte-swapping of input

may need specifically setting now

mike

Posted: Tue 01 Dec 2009, 22:38
by mcewanw
mcewanw wrote:
aplay try.mp3

but again the result is just terrible noise.
Sorry, my mistake... I was dreaming... aplay doesn't play back mp3 format! (I was momentarily confusing aplay with sox's "play", a program which does play back mp3 files if sox is compiled for that).

Your recorder script works fine under Puppy 4.3.1 (played back with Aqualung). EDIT: only if I remove the -D option though (see my next post)

-D hw:$CARD,0

Posted: Tue 01 Dec 2009, 23:15
by mcewanw
@mikeb: On second thoughts/try: actually your record script doesn't work on my Puppy 4.3.1 system (a Dell laptop CPx) without a modification (lame works fine though).

I can make it work, but have to remove the following option to arecord:

Code: Select all

-D hw:$CARD,0
I've tried:

-D hw:0,0

and every combination of 0 and 1 for -D hw:x,x

but no go.

Your record script works fine if I simply delete that option altogether.

Running arecord -D hw:0,0 at the command line comes back with the error message:
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:974: Access type not available

Posted: Wed 02 Dec 2009, 01:32
by mikeb
Ah ha...well perhaps that -D option has changed with the latest alsa...1.0.20 in puppy 4.31. I do remember it was a bit fiddly to get working originally...I will investigate.......its only used to give the option of selecting a second sound card such as a usb one.

I have updated alsa on my notebook so will test out on there.

thanks for the feedback and when I find a universal answer I will post it up.

regards

mike

Posted: Wed 02 Dec 2009, 03:19
by Flash
I've used mhWaveEdit to record audio tapes in Puppy, I think from the Line in but it may have been the Mic input, I forget. I saved the recordings as mp3, but as you can see, mhWaveEdit can save them in just about any format you can think of.

uses intermediate files and no pause control

Posted: Wed 02 Dec 2009, 13:04
by mcewanw
Flash wrote:I've used mhWaveEdit to record audio tapes in Puppy, I think from the Line in but it may have been the Mic input, I forget. I saved the recordings as mp3, but as you can see, mhWaveEdit can save them in just about any format you can think of.
Yes, I tried it and it works. However, it isn't recording straight to mp3. Rather it stores big temporary wav files in the directory ~/mhwaveedit, which is fine if you have a huge disk, but I don't. The beauty of the likes of arecord ... | lame ... is that you are recording mp3 files on the fly without resorting to temporary wav storage.

For recording mp3 voice clips it is also very useful to have a pause function... which mhwaveedit doesn't seem to provide. Nice program though if you have sufficient disc space for whatever you are recording.

Posted: Wed 02 Dec 2009, 13:41
by Flash
Actually I think mhWaveEdit creates the initial file as digitized voice, the equivalent of a Raw picture file, then converts it to whatever format you tell it to when you Save the file. But yes, you're right that the initial file is huge.

Posted: Wed 02 Dec 2009, 15:17
by mikeb
For recording mp3 voice clips it is also very useful to have a pause function
hmm good point...I'm not sure how a true pause function would be implemented though it is possible to pause and resume processes with kill...I did that for a simple cd player and it worked so one to try out. Otherwise I could have it create incremental files with each pause... eg blah_01.mp3 blah_02.mp3 etc.
More food for thought....

mike

pause

Posted: Wed 02 Dec 2009, 16:05
by mcewanw
yes, I once submitted a recording program called wiakrecord to the forum, which included a pause function. That used kill -SIGSTOP and kill -SIGCONT (that part of the program was written in C so that the pause worked virtually instantaneously, but from bash, kill -STOP and kill -CONT <process_id> work fine to pause/continue the arecord ... | lame ... process pipe.

A picture of wiakrecord from its home site is here:

http://wiak.org

I never published the C source code part of wiakrecord though, just the bash and gtkdialog frontend. The C was part of something much bigger I was writing - a control language/protocol for controlling pipelines of processes. I may get back to that some day and release it; family circumstances took me away from it back then. I do have a version of krecspk/wrecspk which includes a pause function written using kill, but it has a few bugs which I've still to iron out. The pause works fine on record, but is not so good on playback - usign madplay (I'll probably write a small C function version of kill just for the pause function). I'll upload the code to the forum in a day or two incase anyone is interested in it, but it would be worth adding pause to your wee record script as a simple solution, I'd say.

Re: uses intermediate files and no pause control

Posted: Wed 02 Dec 2009, 22:46
by Flash
mcewanw wrote:...For recording mp3 voice clips it is also very useful to have a pause function... which mhwaveedit doesn't seem to provide. ...
Guess what, mhWaveEdit can pause during a recording session. The Pause button doesn't show up until you click the Start recording button. Bad GUI design?

I can't see any way to set the mp3 parameters that mhWaveEdit will use when it saves an audio file as an mp3.