Bacon Recorder - simple audio recorder

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#101 Post by don570 »

I think that putting a pause button in the window would be difficult.
I use the arecord command which does support pause however
it has to be done in the terminal. :cry:
Options
-i, --interactive
Allow interactive operation via stdin. Currently only pause/resume via space or enter key is implemented.
What I do to pause is click the stop button. Then wait for something
interesting on the radio.

When my favorite show begins then I set the length of recording
and click "Begin recording"

Two files are created rather than one but
that make no difference.
________________________________________

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#102 Post by SFR »

Hey Don

You should be able to "pause" arecord using SIGSTOP and "unpause" it with SIGCONT signals.
Here's an example that works for me:

Code: Select all

#!/bin/sh

# sh won't recognize "literal" signals' names, but in bash it would be ok
SIGSTOP=19
SIGCONT=18
SIGTERM=15

f_pause () {
  kill -s ${SIGSTOP} ${A_PID}
}

f_unpause () {
  kill -s ${SIGCONT} ${A_PID}
}

f_stop () {
  kill -s ${SIGTERM} ${A_PID}
}

# start recording (alter it, if additional options are needed)
arecord /root/testrec.wav & A_PID=$!

sleep 3
f_pause
sleep 3
f_unpause
sleep 3
f_pause
sleep 3
f_unpause
sleep 3
f_stop
exit
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#103 Post by don570 »

I never knew about SIGSTOP :oops:
I'll use it if I can get it to work.

_________________________________

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#104 Post by charlie6 »

Hi Don,
this is an awesome app! thanks for it ! :D
I've just moved to 4.4 coming from 3.1 ...
...and got a so-called 4.3 which is 4.4 as reported in its script.
just edited line 78 of /usr/sbin/baconrecorder like:

Code: Select all

export VERSION=4.4
deleted folder /root/.baconrecorder and start again and its done.

In the NLS-4.2, the french translation is missing ...here got the spanish translation instead .. :?

HTH
Charlie
[/code]
Attachments
BC4.4.png
(26.78 KiB) Downloaded 208 times

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

record level control ?

#105 Post by charlie6 »

Hi again Don,

Btw, do you happen to have a workaround to control the record volume level ?
I once record some music and the replay sound was somewhat distorded ...i then struggled (using arecord) to try to reduce the capture level (using retrovol) ... but did not found major improvments ;
how do you do it ?

I remember an earlier recording app where there were two record level analogic indicators ... but this would lead to a less-simple-audio-recorder ... :?

Thanks for any advice :) !

Charlie

edited:
to get a more persistent display of the Vu-meters MAX , i modified the arecords rxvt geometry and behaviour like this around line 852:

Code: Select all

<action>rxvt -geometry "64x2-0+172" -e arecord -V stereo /dev/null 2>/dev/null &</action>
then opened the retrovol dialog box:
set the PCM button to adjust the record volume

last edited:
- in the above code, "stereo" might also be "mono".
- i noticed that the code has to be as displayed in the below screenshot: i mean that "do not copy-and-comment" the existing line code for conservative purpose: this would add one more line to the script and somewhat mess up the script ( experienced ... :shock: ) ... so i did not have kept-and-commented the original line code.

One suggestion ...
when clicking on VUmeter image.gif ... opening retrovol together with arecord's console would be a «nice to have»

again edited ... :P
got retrovol displayed just adding this line code:

Code: Select all

<action>retrovol &</action>
under the above added line code (see below shot)

So far so good ... i currently just ignore if these addons would bring some BC-4.4s misworking ... :?

Have fun :D
HTH
Attachments
BC-4.4_VuMeter_retrovol.jpg
(16.93 KiB) Downloaded 216 times
BC4.4_presistent_VUmeter.jpg
(88.69 KiB) Downloaded 204 times

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#106 Post by don570 »

I noticed the animated gif
doesn't work properly while using Precise Puppy :cry:

I'll try your line to see will solve that problem. I hope it does.

I could check which distro is being used in /etc/Distro_specs
and change the line appropriately if that is necessary.

As for your suggestion of popping up two windows at a time,
that's a No-No. :(
__________________________________________

BTW Dimitry will include your french locale for mtpaint
when he's finished converting the project to v-code
because it's a lot of work (he says).
_________________________________________

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#107 Post by charlie6 »

Don,
Thanks for replying :)
In the NLS-4.2, the french translation is missing ...here got the spanish translation instead ..
Did you lost the french baconrecorder.mo ...?
Cheers, Charlie

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#108 Post by don570 »

Would you check my right click version as well?
http://www.murga-linux.com/puppy/viewto ... 002#761002
_______________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#109 Post by don570 »

Rightclick version does have a French translation.
________________________________________



new version 4.5

-wider date field
-Charlie's new volume indicator is used when clicking on animated gif
- French translation put back in NLS package
____________________________________________

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#110 Post by charlie6 »

Hi Don,
thanks for your quick reply !
as also for the new right click options ... i can imagine how much time it needs to put together all these options (just have a look inside its pet by clicking extract pet ... :wink: )
Would you check my right click version as well?
I'm currently running wheezy-3.5.2.5 and 3.5.2.11 which come with- and where there already are a bunch on right-click options.
So i wouldn't want the new right-click options to interfere with them.
Although I've installed it and it looks to run OK . Uninstallation returns the original options, except that i've now redundant "Extract here" and "Extraire ici", "MD5sum check" and "Vérification MD5sum" options displayed :? - i don't know where they come from ... maybe from the french langpack already installed .. . it doesn't matter anyway.

It also has handy apps in it :D
Cheers, Charlie

last edited:
on the way to 4.6 ...? :wink:
here is a pet ... just ... a suggestion for an explicit VU meter icon :? enjoy ! :D

last last edited: just a little extra tuning .. have recompiled aplay to get bars "|" instead of squares "#" vu-meters display ... :D
Attachments
BC-4.5_VuMeter_retrovol.jpg
aplay recompiled displaying bars
(17.99 KiB) Downloaded 532 times
BCVU_gif-140617.pet
(4.77 KiB) Downloaded 417 times
anime.gif
(5.11 KiB) Downloaded 622 times

gcmartin

#111 Post by gcmartin »

This VU meter (any meter) is a good idea for use in recording. Make easy to spot operation/non-operation of mic/recording.

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

#112 Post by mcewanw »

gcmartin wrote:This VU meter (any meter) is a good idea for use in recording. Make easy to spot operation/non-operation of mic/recording.
This is just an animated gif, not a VU meter.

Unfortunately, it isn't easy to arrange for a VU meter to actively work during recording via arecord. The arecord option that provides a VU meter can be used only during playback, without additional software, or prior to making any recording - not during recording.

Puppy forum member SFR has alerted me to the fact that the following code line, originally and currently used in Precord, is causing /dev/null to be overwritten with a normal txt file, which prevents some other software operating correctly: Fixes itself on reboot of course:

Code: Select all

rxvt -geometry "64x2-0+172" -e arecord -V stereo /dev/null 2>/dev/null &
It is an old fault, dependent on arecord version, first discussed on murga forum in 2009 here:

http://murga-linux.com/puppy/viewtopic. ... 193#373193

The error occurrence or effect appeared to depend on the version of arecord on the system. Version 1.0.25 (as used in Precise and DebianDog mixes stdout and stderr, which is a flaw; version 1.0.26, as used in latest Slacko doesn't)

I note that the same VU code line has since been used in Bacon recorder.

I'm currently working, along with SFR, on a fix/workaround for Precord and will let you know what is decided upon. If anyone comes up with alternative possible 'fixes' would be good to know (particularly if it appears to work for both arecord versions 1.0.25 and 1.0.26, i.e. for Precise and Slacko 5.7).

Cheers, William
github mcewanw

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#113 Post by charlie6 »

Hi William,
mcewanw wrote:...Puppy forum member SFR has alerted me to the fact that the following code line, originally and currently used in Precord, is causing /dev/null to be overwritten with a normal txt file, which prevents some other software operating correctly: Fixes itself on reboot of course:

Code: Select all

rxvt -geometry "64x2-0+172" -e arecord -V stereo /dev/null 2>/dev/null &
...
The error occurrence or effect appeared to depend on the version of arecord ...
I'm currently working, along with SFR, on a fix/workaround for Precord and will let you know what is decided upon. If anyone comes up with alternative possible 'fixes' would be good to know (particularly if it appears to work for both arecord versions 1.0.25 and 1.0.26, i.e. for Precise and Slacko 5.7).
Many thanks for warning ... :) i was totally ignorant of that ..!
Here running wheezy-3.5.2.5 which has alsa-utils-1.0.25 in it ...
I indeed use to avoid using other softwares while recording.

Charlie

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#114 Post by don570 »

I haven't changed my right click utility package to the new baconrecorder.
There's no need to rush changing it now.
____________________________________________________

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

Early precord version exemplar on implementing PAUSE control

#115 Post by mcewanw »

don570 wrote:I think that putting a pause button in the window would be difficult.
I use the arecord command which does support pause however
it has to be done in the terminal. :cry:
Attached is one of the early versions of precord from 2009 (which I should really revamp since its nice and simple, being mp3 only, and the code, just 400 lines long and all in one script and split into simple functions, relatively easily understood, I think, for adaption by others). Being a very slimmed-down precord, it should be easy to follow in terms of how STOP and CONT are used to effect pause button. The first gtkdialog-based audio app with pause control on Puppy forum was 2007 wiakrecord I believe, though the pause functionality (using STOP and CONT) in that was written in C.

That early precord also contains the original arecord VU attempt, which was partly suggested to me by Flash for an even earlier recorder in 2007. Unfortunately that attempt also overwrites /dev/null for some versions of arecord as we discovered back then. I'll be publishing precord with fix from SFR (Jake) shortly, but here is what he suggested as the general concept, which works:

Code: Select all

arecord -V stereo /root/arecord_temp & { sleep 1; rm -f /root/arecord_temp; }
Since the existing code overwrites the system file /dev/null, this is a critical fix for anyone using any recorder that is using the older arecord VU code, so it is best if fixed versions are published soon.

Cheers, William

NOTE: If pause is implemented by STOP/CONT method, it is probably worth mentioning that it is important to always issue a CONT signal to the process when the program is terminated. Otherwise any STOPped arecord process will be left running in the background and not correctly cleaned up. The reason is that you can't terminate the STOPped process unless a CONT signal has first been issued.
Attachments
precord-1.0.2.pet.tar.gz
Just extract the archive for reading code. Best not to install since could interfere with any later version installed.
(3.44 KiB) Downloaded 409 times
Last edited by mcewanw on Fri 20 Jun 2014, 02:37, edited 2 times in total.
github mcewanw

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#116 Post by charlie6 »

Hi William,
many thanks to you as also to Jake (as SFR) :D
that new script works nice !
Charlie

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

#117 Post by mcewanw »

That extra bit script was just the general concept charlie. It does work fine but you might like to use /tmp instead of /root for the temporary file, and we are currently preferring the alternative syntax for arecord vu meter thus:

Code: Select all

rxvt -e arecord -vv /tmp/vu_tmp & { sleep 1; rm -f /tmp/vu_tmp; }
You might also like to position the vu meter on your screen via the rxvt -geometry parameter and to give it a title with rxvt -title parameter. You can check the code in the newly updated revised precord to see exactly what that uses (though precord splits the above command into two parts because it stores the process ID inbetween each half).
github mcewanw

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#118 Post by don570 »

NOTE: If pause is implemented by STOP/CONT method, it is probably worth mentioning that it is important to always issue a CONT signal to the process when the program is terminated. Otherwise any STOPped arecord process will be left running in the background and not correctly cleaned up. The reason is that you can't terminate the STOPped process unless a CONT signal has first been issued.
Thanks for the explanation. I'll try to modify baconrecorder in the
upcoming week.
_____________________________________________________-

Pelo

french translation of the wikki (To be moved)

#119 Post by Pelo »

Bacon Recorder Bacon Recorder est une application simple pour enregistrer de l'audio en format WAV et MP3
Don 570, nice tool. Only missing fonction 'pause" :) and that would be perfect ! You make usefull and nice pets, be proud of it !

moved
Last edited by Pelo on Fri 21 Nov 2014, 06:37, edited 1 time in total.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#120 Post by don570 »

version 4.6

-added Charlie6 suggestion for launching volume mixer

-yellow warning windows are used for problems that need attention

Post Reply