Precord0.9.5 audio recorder

Audio editors, music players, video players, burning software, etc.
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Precord 3.0.0 uploaded

#61 Post by mcewanw »

Precord 3.0.0 uploaded to first post in thread.

Changes: user can input duration (in seconds).
i.e. simple timed record and playback (no progress indicator as of now though - and I may or may not ever bother implementing one...:-)
mikeb wrote:
Odd one I know but can this be used to record audio from a Youtube playback?
I would say yes if you can select pcm or master as a capture input in alsamixer..I tried a web radio station on beep and it worked just fine.
Note: I can't select pcm or master for Capture in alsamixer on my system, but I have an input called "Mono Mix" and another called "Mix" and either of these work fine for capturing pcm stuff coming through my soundcard (I can even record in precord from precord playing an audio file if you see what I mean!)
github mcewanw

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#62 Post by mikeb »

Wow more updates....and I haven't even tracked down that app yet but I did fill some draughts in the Out house.

As for recording sound from vids and such the simple answer is if you can get the vu meter to jiggle then you can

mike

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#63 Post by mcewanw »

mikeb wrote: There was a small mp3 splicing program on here a while ago but the name escapes me....could work on the mp3 without making wav files.
Maybe you mean this:

http://www.murga-linux.com/puppy/viewtopic.php?p=342544

or more likely, mpgedit, further down the same page:

http://www.murga-linux.com/puppy/viewto ... 561#342561

These look very interesting. Mind you mpgedit seems to be quite a few hundred kBytes in size, so maybe not so much more useful than mhwaveedit. However, might indeed provide some useful tips for cutting out the blanks at the beginning and end of a recording.
github mcewanw

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#64 Post by mikeb »

Oh was just looking and getting nowhere......and you beat me to it...mpcut seems closer to the mark...as I said there may be some clues in the code

Mike

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#65 Post by tasmod »

Hmm, hadn't actually tested it out properly. I have now and it won't work for me at all. I had been fooled by trying to record and playback the resultant file, which was always zero bytes.

I've attached a screenshot of the alsamixer, precord and what should be a VU meter I suspect.
I get a very fast scrolling arecord mini window.

Alsamixer window is a mystery to me as to what means what with the capture etc.
Attachments
precalsa.jpg
(144.83 KiB) Downloaded 537 times
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#66 Post by mikeb »

hmm assuming vu meter was not running when recording as that makes blank files I would try setting capture to mix (spacebar)

mike

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#67 Post by mcewanw »

tasmod wrote:Hmm, hadn't actually tested it out properly. I have now and it won't work for me at all. I had been fooled by trying to record and playback the resultant file, which was always zero bytes.

I've attached a screenshot of the alsamixer, precord and what should be a VU meter I suspect.
I get a very fast scrolling arecord mini window.

Alsamixer window is a mystery to me as to what means what with the capture etc.
[In the screenshot tasmod posted, neither his Mic nor Mix controls are currently activated mikeb]

Hello tasmod

Yes, it wouldn't work at all with the settings shown in your screenshot.

According to that, neither your microphone (Mic) or Mixer (Mix) is activated. Which are you trying to use?

The screenshot you sent is for the default 'All' controls being shown in alsamixer. For simplicity, whilst in alsamixer, I suggest you press your keyboard Tab key until you come to the alsamixer 'Capture' window, though the following can also be done in the 'All' window.

Either way, assuming you want to record from your computer's Microphone: whilst in alsamixer move along using your keyboard cursor keys to the Mic control and press the space bar to activate it (sometimes you need to press it twice to activate (L)eft and (R)ight channels). The fast scrolling mini-window is the VU meter and, all going well, once you have activated the Mic, that mini-window should now show that your Mic is now working (but remember to close that VU meter window before actually trying to record since it conflicts with the actual recording process otherwise and prevents that working).
For higher volume recording, go back to alsamixer 'All' screen, move along to the Mic Boost control and press keyboard key 'M' to activate it: that provides a lot of onboard amplification.


If you are trying to record from Youtube sound, then you should move to your Mix control instead and press space bar to activate it instead of Mic.

Finally, if recording from Microphone you shouldn't have your Mic control volume turned up the way you have or whatever comes out of your speakers whilst recording will feedback into the recording and that gives very bad quality. Also, for best recording quality, I suggest trying mono (which only effects record; playback will use whatever channels the source provides anyway).

Hope that helps. The help button on precord brings up similar information albeit necessarily in brief.

NOTE that is doesn't matter which of the uploaded pcrecord versions you use, but I recommend you try the latest newly uploaded 3.0.0 version because that is what I do my own testing on now.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Version 4.0.0 uploaded

#68 Post by mcewanw »

This Version 4.0.0 brings the ultimate in flexibility.

You can run it from the GUI, as before, or...

run it or control its main functions from the commandline or another script/program or from all at the same time!

I designed it with that in mind so that I could use it with the likes of motion detection security software such as Zonealarm or Motion (so that a recording can be started on the detection of motion). i.e. precord becomes a utility for other programs as well as standalone.

Before running its functions from the commandline or another script, you can use the GUI to configure it (or edit its config file $HOME/.precordrc directly).

Using on the commandline (or calling precord functions from another script):

In a console window, enter:

Code: Select all

precord --help
for brief usage instructions.

You can actually control it from the GUI and from the commandline or script in parallel with each other.

If you use it from outside the GUI though, remember to shut it down cleanly by using the command:

Code: Select all

precord quit
I'm not actually planning to add a lot more to this program in its bash/gtkdialog form - though I may still investigate a few small possible additions. I think Precord is close to being pretty much complex and full-featured enough now for an application based on a shell script. Anyway, it has now become a building block for other utilities to call up as and when so desired...

I don't plan to turn it into a full-featured audio editor!
github mcewanw

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#69 Post by mikeb »

Neat stuff :) ..and fast too..

As an aside...since you mentioned security at one place I worked this guy had made a security system...started with the motion detectors but apart from calling up the police it flashed spot lights on and off every second..ie darkened room to full light to totally disorientate intruders...plus some nice mega decibel peizo alarms.....and every time the spotlights were on a camera took a really nice full color photo for the police when they arrived....seemed a neat system :)

mike

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

ver 4.0.1 uploaded

#70 Post by mcewanw »

Ver 4.0.1 changes:

# Added the optional commandline argument [duration] for record or playback time-limit.

Duration should be entered in seconds.
Duration of 0 means: no time limit

Note that you can leave out the duration if you wish. You can also leave out both the filename and the duration (the pre-configured values of previous GUI operation will be used). However, if you want to include duration you must also include filename.

i.e. precord rec filename duration
precord play filename duration

For example:

Code: Select all

precord rec /anywhere/mynewfile.mp3 0

will record until commanded to recstop

and

precord rec /anywhere/mynewfile.mp3 5

will record for 5 seconds only
Note that since precord can now be started and controlled from the commandline, you can also use it in conjunction with "Pschedule task on time" (or cron) for full time control of when precord operates (or drive it from your own script) - provides a powerful time-controlled recording facility!

Pschedule task on time is in JWM start menu -> System, on Puppy Linux 4.3.1. Good chance/time for you to practice using that/cron more generally - cron is a very powerful facility that many people probably haven't heard of.

EDIT: NOTE further, that with cron (or Pschedule task on time, which is very easy to use) the command[s] above will cause precord to start up invisibly and work away in the background. Your family may not appreciate that if you play that trick on them, which I do not recommend!
Last edited by mcewanw on Wed 23 Dec 2009, 22:23, edited 1 time in total.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#71 Post by mikeb »

You are storming :)

mike

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#72 Post by tasmod »

Well I've tried and tried to get it to just playback a mp3 but no joy. Record just doesn't work for me at all.

It will playback for approx. 2-3 secs of a 3 minute mp3 and then goes silent.

I understand the VU now and it shows playback and then a tail off at 3 secs.

I'm using 4.2.1 by the way, hope that doesn't mean there's any difference.

I'll try it in Quirky.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#73 Post by mcewanw »

tasmod wrote: I'm using 4.2.1 by the way, hope that doesn't mean there's any difference.
I installed 4.2.1 to find out! In short, precord works fine on Puppy 4.2.1 on my old machine. Alsa itself wasn't working correctly by default though, on my machine. Details below including how I fixed that:

Apart from 4.2.1 being slow to boot (and generally) on my old machine the installation and boot went fine.

I then installed Precord version 4.0.1 and tried to start up the VU meter and alsamixer by pressing MIX, but they wouldn't stay up.

Not a fault in precord though, just that alsa wasn't working. However, I got alsa working by opening an rxvt console and entering the command:

Code: Select all

alsaconf
[/conf]

and letting the system detect my sound card.

Precord then worked fine for both recording and playback. I had none of the problems you describe. I did of course need to set up alsamixer (using the VU meter as a help) as I have previously described to you. And, as I mentioned previously, you have to close the VU meter window before trying to record (or you'll get a blank recording).

Playback worked fine too. I can't imagine why your system starts playing back but then cuts out after 3 seconds unless you have entered the value "3" in your playback duration window, in which case 3 seconds is what you would get! Duration is in seconds, and a value of 0 gives no time-limit. i.e. continuous playback (or record), which is what you probably want.

So I suggest running alsaconf to make sure your soundcard has been detected properly, and then double check your alsamixer controls are as described to you in my last post (and make sure you close the VU meter window when trying to record). And make sure you have Duration windows = 0

If you still have problems, post up a new screenshot of all your alsamixer settings. 

Also, try gxine to make sure mp3 playback is working generally. The problem is something to do with your system setup since precord just controls some underlying audio utilities (arecord, lame, ffmpeg and aplay) and these all work fine in Puppy 4.2.1 on my system (and thus, so does precord).
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

alsaconf

#74 Post by mcewanw »

Refer to my previous post for background to this:

On further testing I've discovered that Puppy version 4.2.1 fails to store alsa configuration between boots on my system (Puppy 4.3.1 doesn't have that problem). i.e. I need to run alsaconf every time I reboot the Puppy 4.2.1 system .... Precord (all functions) works fine though, once you've set up alsa using alsaconf .

So, although Precord works fine on Puppy 4.2.1, once your sound system has been set up using alsaconf, nevertheless, at least on my machine: alsa doesn't work out of the box. Nor does alsa's configuration survive reboots. You may have better luck with Quirky (and, as I've indicated, I have no such problems with Puppy 4.3.1 - just with Puppy version 4.2.1).

None of the above is a problem with Precord itself though, so I'd advice you to search any/all Puppy 4.2.1 threads to see if anyone else has had a sound problem with that system and have posted any fix.
github mcewanw

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#75 Post by mikeb »

4.2x did unfortunately have some system bugs in there ...there may even be fixes for it. I have built on 4.12 for now as that behaves well.

Indeed I have mostly tested on 2.12 on the basis of if it works on there it should work on anything (plus its my day to day system) ...

mike

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#76 Post by mcewanw »

The following post seems to offer some kind of fix (or fix advice) for alsa problems in Puppy version 4.2.1:

http://www.murga-linux.com/puppy/viewto ... 964#347964
github mcewanw

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#77 Post by tasmod »

Yep fixed. 421 was the problem with alsa.

Strange I've used it on all sorts of audio with no problem till now.

Reloaded 431 again and now will keep that as main version whilst I'm still testing Quirky.
Need to reset all my links and themes though now. :?

I had all the settings correct in 421 it was alsa that had me fooled.

Just about to try youtube sound record with the mix capture.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#78 Post by mikeb »

If a better alsa is needed then Patriots compiles are good...I used one on 4.12 of 1.1.20...the three in one pet
http://www.murga-linux.com/puppy/viewtopic.php?t=45326
mike

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

version 4.0.2 uploaded

#79 Post by mcewanw »

4.0.2 adds "Pschedule task on time" button (but only if Pschedule available on your Puppy distribution). Also includes updated Help info.
github mcewanw

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#80 Post by zigbert »

mcewanw
You're doing great development here. Thanks a lot.
I have some suggestions:

1. I personally think that using <combobox> instead of <radiobuttons> for quality and bitrate would simplify the advanced gui.

2. Could you please include tooltips for every button. There is a lot of options I don't know which to pick. abr, cbr or vbr ???? card or device ??? ogg_mm or ogg_q ???? quality N1 ????? quality 00 ????

3. 'date stamped file' now includes a lot of gui. It could be that I'm not getting this right, but wouldn't it be easy to have an option/menu to choose the layout of output filename. User could add her/his default prefix.

4. The advanced gui contains 2 'Quit' buttons ????

5. The <entry> for seconds could be shrunk in width to keep gui clean.
<hbox>
<hbox width-request="30">
<entry xalign="1">
<variable>DURATION1</variable>
<input>echo $DURATION1</input>
</entry>

</hbox>
<button>
<input file stock="gtk-media-record"></input>
........


6. If wanted, it is possible to skip button decoration for some buttons with <button relief="2">

Image

7. I don't see the point of having 2 pause/stop buttons. I think it could be solved easily with combining some functions:

Code: Select all

function _stop (){
    if [ -e /tmp/precordPIDrec ];then
		sleep 2
		kill -CONT $(cat /tmp/precordPIDrec 2>/dev/null) 2>/dev/null
		kill -TERM $(cat /tmp/precordPIDrec 2>/dev/null) 2>/dev/null
		rm /tmp/precordPIDrec 2>/dev/null
		echo 0 > /tmp/precordPIDpauserec
	fi
    if [ -e /tmp/precordPIDplay ];then
		kill -CONT $(cat /tmp/precordPIDplay 2>/dev/null) 2>/dev/null
		kill -TERM $(cat /tmp/precordPIDplay 2>/dev/null) 2>/dev/null
		rm /tmp/precordPIDplay 2>/dev/null
		echo 0 > /tmp/precordPIDpauseplay
	fi
}

function _pause (){
    if [ -e /tmp/precordPIDrec ];then
      precordPIDrec=$(cat /tmp/precordPIDrec 2>/dev/null)
      if [ $(cat /tmp/precordPIDpauserec 2>/dev/null) -eq 0 ];then
        kill -STOP $precordPIDrec 2>/dev/null
        echo 1 > /tmp/precordPIDpauserec
      else
        kill -CONT $precordPIDrec 2>/dev/null
        echo 0 > /tmp/precordPIDpauserec
      fi
    fi
    if [ -e /tmp/precordPIDplay ];then
      precordPIDplay=$(cat /tmp/precordPIDplay 2>/dev/null)
      if [ $(cat /tmp/precordPIDpauseplay 2>/dev/null) -eq 0 ];then
        kill -STOP $precordPIDplay 2>/dev/null
        echo 1 > /tmp/precordPIDpauseplay
      else
        kill -CONT $precordPIDplay 2>/dev/null
        echo 0 > /tmp/precordPIDpauseplay
      fi
    fi
}

Sigmund

Post Reply