Precord (wreckedleg mp3 recorder for Puppy 4 Dingo)

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Precord (wreckedleg mp3 recorder for Puppy 4 Dingo)

#1 Post by Lobster »

This is based on older code that did not work in Puppy Dingo

Below is the code which I have modified also uploaded as a tar file
It now works

Code: Select all

#!/bin/sh

#/***************************************************************************/
#/* Program: based on wreckedleg Version: 0.5.0alpha2_bash */
#/* Creation date (YMD): 2007/09/29 */
#/* (C) Copyright 2007 William McEwan (mcewanw @ murga puppy forum) */
# mods Lobster June 2008
#/***************************************************************************/

cd /root/my-documents

export MAIN_DIALOG="
 <window title=\"Precord \"icon-name=\"gtk-media-record\">
  <hbox>
   <frame Lock:>
    <checkbox>
      <label>\"\" </label>
      <variable>LOCKCHOICE</variable>
      <action>if true disable:DIRFILE</action>
      <action>if false enable:DIRFILE</action>
    </checkbox>
   </frame>
   <frame output directory and filename                                     >\
      <entry>
      <default>\"/root/my-documents/out.mp3\"</default>
      <variable>DIRFILE</variable>
      </entry>
   </frame>
   <frame dir>
      <button>
       <input file stock=\"gtk-open\"></input>
       <variable>PATHTOFILE</variable>
       <action type=\"fileselect\">DIRFILE</action>
      </button>
   </frame>
   <button>
    <input file stock=\"gtk-media-record\"></input>
    <label>REC</label>
    <action>\"arecord -f cd -t raw | lame -x - \$DIRFILE &\"</action>
   </button>
   <button>
    <input file stock=\"gtk-media-stop\"></input>
    <label>STOP</label>
    <action>sleep 2;killall lame</action>
   </button>
   <button>
    <input file stock=\"gtk-quit\"></input>
    <label>QUIT</label>
    <action>killall lame</action>
    <action type=\"exit\">EXIT-QUIT</action>
   </button>
     </hbox>
 </window>
"

MAIN_DIALOG="`gtkdialog3 --program=MAIN_DIALOG --center`"
exit 0 
This is the critical command line addition

Code: Select all

 <action>\"arecord -f cd -t raw | lame -x - \$DIRFILE &\"</action>
That will also work from the command line
use ctrl + c to finish recording . . .
It is not very efficient (produces large sound files)
but creates working mp3 files . . .

I did play with the parameters a little but it ended up sounding like chipmunks
Any ideas welcome :)
At the moment the sound is too quiet and recorded files are too large . . .

these are the arecord parameters (also 'arecord --h' on command line)
http://linuxcommand.org/man_pages/arecord1.html
Attachments
precord.tar.gz
(783 Bytes) Downloaded 622 times
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

pupmate
Posts: 20
Joined: Fri 12 Oct 2007, 08:23

Precord

#2 Post by pupmate »

Can I make a plea to whoever writes an audio recording gui to incorporate facilities for external audio cards eg Sound Blaster MP3+ USB, for those who only have a mic in socket on their computer. I refer to my HOWTO for details but this is only for CLI usage. My programing skills leave a lot to be desired. Please see :-
http://www.murga-linux.com/puppy/viewto ... 06&t=29335

Terry

Post Reply