Precord0.9.5 audio recorder

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

#101 Post by mcewanw »

mikeb wrote:
gtkdialog3 --program=MAIN_DIALOG --center

but not...

MAIN_DIALOG=$(gtkdialog3 --program=MAIN_DIALOG --center)
hhmm getting lost in the bash handling then...I'm tending towards the former anyway....some ways of using gtkdialog make me go crosseyed even when awake

regards and get some sleep

mike
Hmmm... yes I'd better get some sleep: I'm going cuckoo:

It is the above that works for some reason; nothing to do with signal="hide", which doesn't seem to do anything in this context afterall... I need to rethink what is going on methinks...
github mcewanw

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

#102 Post by mcewanw »

command substitution [i.e. backticks or $(...)] invokes a subshell, so that must be somthing to do with it. Even caffeine isn't helping at the moment. Anyway, it will be done.
github mcewanw

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

#103 Post by mcewanw »

Oh well... all that detective work effort when all that was causing the problem was command substitution resulting in gtkdialog being run in a subshell! Anyway, I seem to have it all going properly now, but I won't make a pet of it until tomorrow because my mind is a bit blown now and I'd likely make a hash of it...

Very worth while remembering that though: run gtkdialog in a subshell and long-running processes won't close if the jwm wm [X] button is used to close the GUI... Nothing to do with signal="hide" in this case.

Answer: don't run gtkdialog in a subshell.
github mcewanw

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

#104 Post by mikeb »

It's amazing how much effort it takes to come to the tiniest of conclusions :D
Took me several days to fix fonts in puppy 4 and the fix was one additional stanza in font.conf...but worth it....at least answers can be found...something that always bugged me with windows was those unanswered questions

mike

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

Uploaded version 5.0.2

#105 Post by mcewanw »

******Latest Version 5.0.2******
# Changes:
# Version 5.0.2: Fixed rec/play processes left running after jwm [X] pressed.
# mp3 vbr now uses combination of minimum bitrate + quality settings to determine compression and quality.
# running VU meter and alsamixer close on exit.
# changed commandline args (run: precord --help)
github mcewanw

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

#106 Post by mikeb »

Wow a new version before I get to play with the previous one....... :D

mike

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

The end of Christmas

#107 Post by mcewanw »

Flash wrote: 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. :)
Christmas is over.

I intend that no horrible. cpu eating, gtkdialog progressbar kludges for up/down display timers will pollute the simple, but hopefully flexible and reasonably efficient, precord. But note how I use Pschedule as an adjunct to the existing incarnations.

I think you may like the soon to arrive Precord version 6.0.0, even if it does not provide "quite" what you ask for. Actually, in a way, it provides more.
github mcewanw

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

Precord revolutionary version 6.0.0 about to be uploaded

#108 Post by mcewanw »

Precord 'revolutionary' version 6.0.0 about to be uploaded
But first here is the info you will need to use the added facility:

Well, Precord's automatic add/hide Pschedule button methodology has already been used successfully in the great wee pupRadio app (to hide the Precord button of all things!).

But that was nothing: Precord version 6.0.0 brings a really, revolutionary, much likely to be copied facility (I hate to sound like ttuuxxx, but this is a simple but powerful new approach for extending gtkdialog apps):

slave plugins (external applications) for every major Precord function (all plugins sent an automatic terminate process signal on re-use or quit). So you want a progress bar, or up/down progress timer, or some external VU meter: just add the external app to the appropriate function buttons via the plugin folder facility...

I haven't written any useful plugin as yet (too busy just getting the idea working) but I do supply a simple demo to show how to use it. Here is the blurb from the header file of that (the demo happens to be a simple bash script, but it doesn't have to be):

#**************************************************************************
# Program: PrecordDemoPluginSlave version 1.0.0
# Creation date (YMD): 2009/12/07 (original version 1.0.0)
# Revision date (YMD): 2009/12/30
# (C) Copyright 2009 William McEwan (http://wiak.org)
#***************************************************************************
#
# Changes:
# Version 1.0.0: First version.

# Notes:
#
# To quickly try the supplied demo, rename it in Rox filemanager to
# stopplayslave, run precord, press play and then press stop...
# To stop the stupid popup app, just rename the file back to
# PrecordDemoPluginSlave.
#
# This slave is just a simple demo of how to create a function slave for
# precord. Actually any program can be used for a slave. Indeed, a symlink
# placed in /usr/share/precord to any existing application is a slave, though
# you may find it better to use small shell scripts which call up existing
# applications instead, since that way you can control the termination of the
# called-up applications.
#
# Precord slaves need to be stored in directory /usr/share/precord. The slave
# application, if it exists, is typically loaded on the press of the
# associated function button, or in response to that function being given
# from the commandline (e.g. precord rec outfile.mp3 would check to see if
# there is an executable, or link to an executable, called
# /usr/share/precord/recslave). If there is no such slave, no attempt is made
# by precord to execute it (so you can add and remove slaves as and when you
# like, even when precord is actually running...).
#
# The plugin slave application (or, for example,
# symlink) must be given one of the following names (which match the available
# precord functions):
#
# recslave (which is executed on push of record button, or via commandline call of form: precord rec outfile...)

# stoprecslave (executed on push of the record stop button and/or the quit button etc)

# stoprecnowslave (executed whenever a switch is made between precord small and config GUI's)

# pauserecslave0 (executed on record pause being first pressed, and
on every second press thereafter)

# pauserecslave1 (executed on record pause being pressed the second time, and on every second press thereafter)

# playslave (executed on play selected)

# stopplayslave (executed on stop play selected)
#
# pauseplayslave0 (as per record, but for play)
#
# pauseplayslave1 (as per record, but for play)
#
# quitslave (executed on quit selected)
#
# vuslave (executed on vu/mixer button pressed/selected)
#
# Note that pressing the associated precord button may or may not call up the slave program. The stopplay button, for example, only looks for an associated slave application if an audio file is already playing.
#
# Note that precord automatically, temporarily saves the called up slave application's Program ID, in /tmp/precord, in the form,
# for example: /tmp/precord/PIDrecslave
# However, many applications start up several processes, so it is up to the slave application plugin designer to make sure the slave applications processes are all terminated at the time desired. Precord only sends a simple TERM signal to the first slave process (the plugin designer may need to trap that signal and then ensure all plugin child processes are terminated).
#

# Sorry, this first slave is the ultra in simplicity. It has no useful
# precord-related function (it just pops up an rxvt terminal and displays the date... I'm too busy to write a useful plugin at the moment.
# Forum member Flash would like a simple progress counter; you could write that, for example, as a shell script and call it up, and control it, as per above or you could wait until someone who understands what I am talking about writes it for you.

# Note that, to use this demo, you need to put it in folder /usr/share/precord/, or make a symlink to it from there, and rename it according to which of the above functions you want to automatically call it up (being half a sleep for days now, it took me ages to get it right...).

Have fun, but do realise that the 'tricky' part in writing/using plugins is in keeping track of the process IDs; the supplied demonstration plugin gives strong hints on how to do that.
github mcewanw

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

version 6.0.0 uploaded

#109 Post by mcewanw »

By the way, you might imagine that the main precord program has gained a lot of extra bloat compared to the 5.0.2 dotpet size. That is not the case. The dotpet without the demo plugin is less than 400 bytes larger. Indeed the actual demo plugin itself is absolutely tiny (half a dozen lines of bash code); it's just that I've included tons of text documentation in the plugin demo app's header... Precord itself will always be a tiny application, which I intend keeping in the form of one executable script...! :-)

[though I might also write a client/server version, because that coding model can be advantageous when it comes to fast commandline as well as GUI control and usage].

Note that an easier way to test the new plugin system is to simply put a symlink to the PrecordDemoPluginSlave shell script into /usr/share/precord alongside it. If you want the plugin app to popup everytime you press the play button, for example, simply call the plugin symlink "playslave" (i.e. right click /usr/local/precord/PrecordDemoPluginSlave in Rox filemanager and select Link... relative - and name the link playslave).

Being a shell script you can of course get the plugin to start up any number of other apps (and if you copy the technique used in the demo, each and every one of them can be shut down automatically when precord closes, or some other of its buttons are pressed, and so on...)
github mcewanw

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

Automatically terminating the demo with another button...

#110 Post by mcewanw »

Code: Select all

#!/bin/sh
# If you make a symlink called playslave to the demo plugin,
# you could, for example name this simple script here: "stopplayslave"
# You will then find that the demo starts with the play button and
# terminates with the stop button...

kill -TERM $(cat /tmp/precord/PIDplayslave)
Just make sure the script is made executable and placed in /usr/share/precord (and is named "stopplayslave"); and the symlink to /usr/share/precord/PrecordDemoPluginSlave should be called "playslave" and also placed in /usr/share/precord

Hope you get the idea...
github mcewanw

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

#111 Post by mikeb »

Hope you get the idea...
several reads later perhaps....
so what you are saying is puppy could eventually be one giant shell script with plugins (or is it already?) :D

You've got me at it again...a folder sync utilty that does not take a week...coded up the precord way....very neat...the bash not the utility :)

regards

mike

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

Precord version 6.0.1 uploaded

#112 Post by mcewanw »

# Changes:
# Version 6.0.1: Provides revolutionary (!) slave applications "plugin"
# facility. Documentation on usage is provided as a separate download.
# Now passes "Command" details directly to Pschedule version 0.8-1 and above
# when that program is available and activated by Precord.
github mcewanw

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

Version 6.1.2 uploaded

#113 Post by mcewanw »

*****Latest Version 6.1.2 uploaded to first post in thread.

# Usual GUI, but can also now read commandline args [action][filename][duration] via stdin (e.g. pipe).

For example:

Code: Select all

precord [with no args starts GUI version]
or
echo "gui" | precord - [note the space then minus at the end meaning: read from stdin]

precord play /root/out.mp3 [plays without GUI]
or
echo play /root/out.mp3 | precord -
[also plays without GUI; useful for quickly playing an mp3, or ogg, or wav - depending on how last configured]

If no outfile or duration parameter is supplied, precord uses previous configuration as defaults.

precord --help
or
echo --help | precord -
for commandline usage 
I considered using getopts/longoptions and so on, but decided against it in favour of keeping command line usage very simple and quick, whilst being compatible with the GUI saved configuration.
github mcewanw

Ron
Posts: 184
Joined: Sun 03 Aug 2008, 17:36
Location: Around Seattle

#114 Post by Ron »

I wonder what happened to this thread? It suddenly died. Does that mean it's perfect now? LOL. I just came on this thread because I have been trying to find a simple stream recorder that will record directly into mp3 without fuss and muss. This looked perfect and does work for me, but:

I don't understand the filing system. I would like it to put the recorded file into a location of my choosing. I was able to drag my folder into the file location window ok but the program didn't put it there. It keeps putting it into the root location. EDIT: I just realized that I could rename and drag the root file to my own folder, which is ok, but an extra step, but that's no big deal.

The config file seems to keep my selections for the current session, but rebuilds it every time I reopen the program. Again, no big deal, but inconvenient, especially if the file location has to be changed each time, presuming this function works properly.

The play mode is very choppy. I wonder why? Again, I usually would use AquaLung or some other player anyway, so not a huge problem.

What is the function of two file controls? It seems that if the record button on either of them is pushed, both are active, but only one file is recorded. Maybe for future development?

I think this will work quite nicely for me, especially my wish list is fulfilled. Thanks for the app.

Ron

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#115 Post by edoc »

Barry included precord in spup 040 but it does not seem to work.

Anyone tried it?

I may need to download and install Audacity for my son, though precord seems a smaller and more elegant simple-solution.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

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

Precord 6.1.3 and 7.0.0 uploaded. No new funtionality though

#116 Post by mcewanw »

Versions 6.1.3 and 7.0.0.
Last edited by mcewanw on Sun 08 May 2011, 23:02, edited 1 time in total.
github mcewanw

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#117 Post by edoc »

Wow, it has been a while since the prior post, good to see things are happening with this.

We are using only Fluppy (current version is 013) as it just got too complicated and time-consuming to try to support multiple versions of Puppy across several laptops and netbooks.

Do you have any thoughts as to the compatibility of Wary-based apps, esp. Precord 7.0.0, with Fluppy 013, please?

We can test but it would need to be in Fluppy.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

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

#118 Post by mcewanw »

edoc wrote:Wow, it has been a while since the prior post, good to see things are happening with this.

We are using only Fluppy (current version is 013) as it just got too complicated and time-consuming to try to support multiple versions of Puppy across several laptops and netbooks.

Do you have any thoughts as to the compatibility of Wary-based apps, esp. Precord 7.0.0, with Fluppy 013, please?

We can test but it would need to be in Fluppy.
I think there is a good chance Precord (and Pcreole with nme for that matter) should be compatible with Fluppy. I don't know about other Wary apps, but many might be fine. If you haven't used Precord the main problem you might have is nothing to do with Precord itself but with setting up alsamixer before hand (or with the help of Precord). Precord can't record anything if alsa isn't correctly set up to record, and it is a bit tricky doing that and different sound cards have different volume controls etc that you may need to set up.

You might first like to give Pcreole-2.0.3 a whirl, since though that is a complicated program because it is very multi-purpose, I think it should work "out-of-the-box" on Fluppy (hopefully), with nothing to set up first: http://www.murga-linux.com/puppy/viewto ... 446#370446

Note that Pcreole brings the power of the commandline into a GUI so be careful with it. But you can simply press some of the buttons labelled "X" and try some of the combobox inbuilt commands first (especially CMD3_, CMD4_ andf CMD5_ combo command lists). The usual disclaimers apply... If you make webpages ever, you would also maybe find the wikicreole markup facilities useful (but their use is entirely optional). For info on creole markup: http://www.wikicreole.org. Creole is just a simple text markup language (tags for bold etc). You don't need a wiki to use it. The program converts simple marked up text into straight html for whatever use you want.

I'd be delighted to know of any and all successes with Precord version 7.0.0 in particular since, with the help of forum member L18L, I'm hoping to internationalise it (adding language German first).
github mcewanw

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#119 Post by vovchik »

Dear William,

I notice that the precord.desktop file has the exec as /usr/loca/bin/precord while the pet places the executable in /usr/bin - hence no entry in the Multimedia menu.

With kind regards,
vovchik

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

#120 Post by mcewanw »

Thanks vovchik

I forgot about that after moving the 7.0.0 script from /usr/local/bin to /usr/bin. I'll fix and re-upload as 7.0.1
github mcewanw

Post Reply