Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 30 Sep 2014, 18:30
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Precord mp3,wav,ogg,aac,flac recorder/player.
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 12 [177 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 Next
Author Message
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Thu 24 Dec 2009, 10:50    Post subject:  

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/viewtopic.php?p=347964#347964

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
tasmod


Joined: 04 Dec 2008
Posts: 1461
Location: North Lincolnshire. UK

PostPosted: Thu 24 Dec 2009, 12:11    Post subject:  

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. Confused

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 Cool
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8257

PostPosted: Thu 24 Dec 2009, 12:12    Post subject:  

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
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 25 Dec 2009, 06:46    Post subject: version 4.0.2 uploaded  

4.0.2 adds "Pschedule task on time" button (but only if Pschedule available on your Puppy distribution). Also includes updated Help info.
_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5728
Location: Valåmoen, Norway

PostPosted: Fri 25 Dec 2009, 08:08    Post subject:  

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">



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:
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

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 25 Dec 2009, 08:18    Post subject:  

zigbert wrote:
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.
. . .

6. If wanted, it is possible to skip button decoration for some buttons with <button relief="2">
. . .
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:

. . . [snippits extracted from the structured precord GPLv3 code, as re-arranged and published by Signmund  (mcewanw)]



Sigmund


Thankyou for your criticisms.

Personally I prefer radio buttons to combobox for this application. It is a matter of taste in application design I suppose, so the idea of changing that... egentlig, önsker jeg ikke ä gjöre det... [I've no idea what a google translate will make of that and I couldn't find the symbol for stroke through the 'o', so used umlaut]

I purposively included separate pause and stop controls for Record and Play, after some earlier consideration, because these are two separate functions which I occasionally use separately. I can play a track (listening via headphones) whilst recording something different. I can also play, for example [EDIT] a music-only audio file, and record a voice track whilst it is playing (via mixer). I also use the separate functions when running or controlling precord from the commandline.

Actually, I wish everyone would endeavour to make their gtkdialog/bash apps also runnable from the commandline to at least some extent: that facility automatically provides accessibility (to a visually impaired user for example), and also fits in with UNIX philosophy in terms of allowing programs to be more easily chained together. Of course, you need to re-think your GUI designs to purposively incorporate commandline driving capability, when you want that; admittedly that is one of my interests (and when it comes to GUI's, I'm a one-click radiobox man, by preference, to some extent!)

But, I'm not asking others to write their apps differently; they put the effort into writing them afterall... (though occasionally I might request new features, if they have time and are willing to incorporate them...:-).

I had planned to reduce the duration seconds box, but forgot about it. Thanks for reminding me! :-)

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Sat 26 Dec 2009, 01:33    Post subject: Version 5.0.0 uploaded  

Precord version 5.0.0 uploaded

Changes:

Minor cosmetic alterations.

The Config GUI now also fits on 640x480 screens.

Added some extra tooltips for those who don't know their a(dam) from their e(ve) yet. Not too much additional bloat.
=============

Notes:

For many people, who only have one soundcard (and not a usb one) you probably can ignore the soundcard config checkboxes (unchecked means use plughw:0.0, where 0,0 is often the default sound card). Otherwise just try all the combinations of checked "card, device" until you hopefully find your card (assuming you don't know its location already...). No, I won't be writing a treatise on soundcards :-).

And yes, there are two record and two playback buttons (as before); if, for example, you are recording, the first record button is for recording to the file indicated in the entry to its left. Actually, it is the same for the second recording button (so simple really...:-) but that entry to the left is named automatically to the date of the recording. The tooltips that come up when you hover your mouse over the buttons should keep the vikings amongst you straight.

No I won't be causing yet another menu to open up in order to set whether normal or date stamp recording. I just want to be able to record date-stamped files immediately, as and when required - that's a provided facility! - quick recording of short notes without having to bother entering filenames... The double playback entry slots is another facility: you can have any two files just sitting in there ready to play back - I find it very handy anyway and that's why I wrote the program this way.

Take it or leave it! :-) Anyway, since the program can also be driven/controlled via the commandline, you can write your own scripts to run and control it in any way you want (without having to cut and paste or rearrange any of my code). For commandline usage, start up a console and enter:

Code:

precord --help


But I suggest you try the provided GUI (from Start -> Multimedia -> Precord). I think it is quite handy and flexible.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5728
Location: Valåmoen, Norway

PostPosted: Sat 26 Dec 2009, 05:39    Post subject:  

mcewanw
Thank for this upgrade


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Sat 26 Dec 2009, 09:55    Post subject: Version 5.0.1 uploaded
Subject description: Bug fix release
 

Latest Version:
***** Version 5.0.1: Bug fix to initialising pause flags, and to stop functions.

One of the advantages of having entirely separate pause and stop buttons is that you can start up two instances of Precord and play one file whilst recording another.

(You can also open a console and use commandline control too... or have any script calling the appropriate precord control commands... If you start precord from the commandline, you can also control that session from the GUI at any time. And of course you can use Pschedule or crontab to start a precord session, in the background, at any time...).

Of course it is possible to combine the two pause and stop buttons for record and play, but then, for example, pause would pause both the playing process and the recording one. For the sake of two extra buttons, I prefer being able to run both simulataneously.

[It is actually very easy to merge the buttons in code though; you don't actually need to cut and paste the related code parts together, as was suggested. Since these are functions, you just need to call them up one after the other at the appropriate time (e.g. a single pause button press would cause the action to call function playpause and then recpause, and so on... but it does pause both play and rec then of course...)].

Last edited by mcewanw on Sat 26 Dec 2009, 10:03; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11081
Location: Arizona USA

PostPosted: Sat 26 Dec 2009, 10:01    Post subject:  

Mcewanw, for what it's worth, I like Precord's GUI design. Everything appears in one window once I click the config button, rather than options being hidden in drop-down menus or behind tabs. In this case the program is simple enough that there just aren't that many options, so it works well to have them all visible in one window.

An elapsed time meter or stopwatch that starts with the Record button and stops with the Pause or Stop buttons would be a useful addition for me. Smile

I tried vbr yesterday and found that it seems to switch the settings from 22050 kHz, 32 kbps, to 44100 kHz, 130 kbps (or something like that.), although still mono. I discovered this by playing a file created with vbr and noticing the properties. Oddly enough, the resulting vbr file is the same size as a cbr file at 22050, 32. The reason for this seems to be that the level is very low. Even though I have Alsa set so that some clipping occurs, when I open a Precord vbr mp3 file in mhWaveEdit, the wiggles are very small. If I tell mhWaveEdit to Normalize the file, then Save it, the file plays much louder with the same volume control settings. The file also becomes noticeably bigger; from, for instance, 11 MB to about 17 MB.

Some mp3 files are so weak that I have to turn the volume of my mp3 player all the way up and even then I can't hear them clearly over the loud music at the gym. I guess now that Normalizing them would make them play louder, but there are so many that it would be tedious in the extreme to use mhWaveEdit for the job. Audio books on CD usually have hundreds of tracks. I'll have to look for a batch Normalizer. Laughing
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Sat 26 Dec 2009, 10:19    Post subject: Normalising  

Flash wrote:

I tried vbr yesterday and found that it seems to switch the settings from 22050 kHz, 32 kbps, to 44100 kHz, 130 kbps (or something like that.), although still mono.


It is possible to alter the code a bit to allow vbr to go down to lower bitrates, but it would mess up the current code quite a bit and add a bit further bloat, so I don't feel its worthwhile to do that. My code feeds a 44.1 kHz signal into lame which is told to then use vbr at the selected bitrate of 32kB/s, but I notice that it does seem to encode as 44.1kHz regardless - I presume that is just how it works - the average bitrate is probably 32kB/s, hence the same file size as cbr mode?

I do 'cheat' a little bit for ogg_mm encoding: that encoder only goes down to a bit rate of 64kbit/s, so I've just made it that value for any radio box checked below that... Better that, I felt, than a blank recording.

I actually get quite loud recordings, on my system, regardless of the encoder I use. I presume you have your capture input amplitude turned up (and Mic Boost when using a microphone?). Sounds to me like you could do with an external preamplifier; would give better quality than Normalising a low amplitude signal.

As for the GUI... Yes, I'm not about to change that significantly. I often play about with sound recording, and having all the config settings one-click accessible in one window is a major reason for the program existing. The less tabs, menus and comboboxes I have to access to set things up, the better.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8257

PostPosted: Sat 26 Dec 2009, 10:39    Post subject:  

[rant] I hate vbr audio , not worth the savings particularly on videos....like we have terabyte drives and 32GB flash sticks, is there any need to use this awkward mode? [/rant]...ooo that feels better.

I made a gui for handbrake.....it only makes xvid and lame avi's cos that what I use and they play with far less cpu than mp4 whilst giving a near dvd quality with no major size penalty (see rant above)...but the point is I won't include any other format as I'm comfortable with it and do not see the point...the coders perrogative.
I like the slim vu meter so I just alter the relevant bit in precord for myself.
Otherwise one ends up trying to make a program that includes the kitchen sink trying to please everybody's wants and basic functions get neglected or buried.(seen it happen with other puppy projects)....one must draw one's own line as a general rule to keeps the concept and the result pure.
Indeed making precord a potential building block is a concept that makes sense and one I never thought could be applied to gtkdialog scripts...you learn somethng new every day Smile

regards

mike
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Sat 26 Dec 2009, 10:43    Post subject:  

I will have a look at "Normalising" though, since the lame encoder seems to have options to do that. Don't know when I'll get round to it though; I've got a lot of things piling up that I've got to deal with imminently, so I've been developing Precord with temporary haste, whilst I could.
_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
tasmod


Joined: 04 Dec 2008
Posts: 1461
Location: North Lincolnshire. UK

PostPosted: Sat 26 Dec 2009, 10:55    Post subject:  

Hi, just thought I would report back.

Well, I've had some odd results and no success recording a soundtrack from a youtube flv.

I have managed it in Audacity using the mix control as capture, this however doesn't work for me in precord.
Setting it in Alsa Mixer doesn't work. In Audacity it is one of a dropdown menu entries, it doesn't call Alsa Mixer so maybe that is why it works there.

Playing back a pre-recorded mp3 does so without VU showing anything, also setting any of the alsa controls whilst it is playing does nothing. (It is playing sound and taskbar vol control works)
Older problem is that using window close control instead of quit leaves mp3 playing as arecord is backgrounded. I forget this so I usually just close process.

I have had success with a mic recording though.

I'm sure it's all Alsa related. Sad

_________________
Rob
-
The moment after you press "Post" is the moment you actually see the typso Cool
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Sat 26 Dec 2009, 10:57    Post subject: daemon  

The only problem with using precord from the commandline/other_scripts is that recording takes a couple of seconds to start going. The pause, stop and play work quickly though. I tried a cut down version which didn't contain any gtkdialog inside it, but that made no noticable difference.

Writing the functions in C would probably work (and that would be easy for Precord); the other possibility is to embed it with the capability to run as a daemon, which I'll explore at some stage. [Of course a running daemon occupies memory, but if it is designed to "block" it doesn't actually need to consume any CPU resources until it receives a command to process].

However, a bash/gtkdialog version is relatively easy to maintain (even though gtkdialog can be a bit limiting and painful at times...) and I'm happy enough with the existing model generally.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 6 of 12 [177 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1299s ][ Queries: 12 (0.0199s) ][ GZIP on ]