pCD 1.5 - CD-audio player

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

#166 Post by esmourguit »

Bonjour à tous,
@Zigbert,
Thank you very much, it works in french now.
Cordialement ;)
[url=http://moulinier.net/][color=blue][b]Toutou Linux[/b][/color][/url] - [url=http://toutoulinux.free.fr/pet.php][color=blue][b]Paquets français[/b][/color][/url]

User avatar
BobSongs
Posts: 86
Joined: Wed 06 Feb 2008, 19:21

pcd - CD-audio player

#167 Post by BobSongs »

I'm using Puppy Linux 4.x on a RAM drive. I am using pcd (simple, sweet, effective) to listen to an audio CD. It pulled in the track names and all. Very nice!

This PC has two optical drives. pcd has no option to switch from one to the next. Is this feature added for puppy 5.x?

Thanks

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

#168 Post by zigbert »

BobSongs
Pcd always read the default CD-device (/dev/cdrom). You can change this by redefining your preferred device in the CD/DVD-wizard. See setup-menu.


Sigmund

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

#169 Post by zigbert »

Version 1.2
See main post

Changelog
- Progress bar
- 'Copy CD' goes directly to burn-options dialog in Pburn
- improved language detection (thanks to wow)
- Bugfix: Check internet connection when not using LANG=en_US (thanks to wow)
- Bugfix: 'Stop', 'next' and 'previous' button froze playing-song-info.
- Bugfix: Clear info when eject.

Important
Pmusic 1.3 includes playback (and simple ripping) of audio-CD. Pmusic will also show a complete progressbar, and give the possibility to jump forward/back in playback time. Pcd has a sweet and simple ui, but Pmusic will simulate pCD by using the -c switch. - 'pmusic -c' will read cd and start playing the first song. So why bother continue the development of pCD. The answer is simply system-usage. While pCD pipes the rip directly into the player (cdda2wav | aplay), pmusic first rip, then starts the universal converter that pipes the result into the player (cdda2wav; ffmpeg | aplay). This gives more use of both cpu and temporary storage / memory. The reason why doing it so complex in Pmusic is to achieve more flexibility of the output stream.


Sigmund

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#170 Post by Karl Godt »

Hi zigbert !

like pfind I like pCD very much !

but I'd like to have pCD starting from menu without autoprobing for CD drives and contents.
so I made a little pCDmenustart.sh :
usr-local-bin

#!/bin/bash
## this is a shellscript to not search automatically for CD drives running pCD from the menu

export MENUSTART=1
exec pcd
exit

and added this to
usr-local-pcd-pcd

line 27+

if [ $MENUSTART = 1 ]; then
. $APPDIR/func -stop
else
. $APPDIR/func -probe
fi

but most annoying is the "Hickup" after finishing the last song.
so I added this to
usr-local-pcd-func
-play) line 125 +
lines 140+

Code: Select all

   TTR=`cat $WORKDIR/pcd-cddb | grep "total tracks:" | cut -f 5 -d " " | tr "," ":" | cut -f 2 -d ":" | tr -d ":"` #; echo $TTR
	WASPLAYING=`cat $WORKDIR/pcd-nr`
	if [ $TTR -gt $WASPLAYING ]; then  
	$APPDIR/func -next
	else
	$APPDIR/func -stop
	fi
	;;
I modified pCD Version=1.2 running Quirky 1.3 and posting from it now

Thank you again very much for your work!

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

#171 Post by zigbert »

Karl Godt
Great stuff!
I will look at it when I am back home from holiday


Sigmund

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#172 Post by Karl Godt »

I should change the code to something like

echo forHELLved... > /tmp/pcd.menustart

instead of using export : I had to realize that export just works inside its shell and not even at a later opened terminal.

and accordingly

if test -f /tmp/pcd.menustart; then
. $APPDIR/func -stop
else
. $APPDIR/func -probe
fi

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

#173 Post by zigbert »

Version 1.3
See main post

changelog
- Set pCD to defaultcdplayer (thanks to BarryK)
- parameter -x skips disc to spin at startup. (thanks to Karl Godt)
- Bugfix: pCD tries to read next song after played the last song. (thanks to Karl Godt)

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

#174 Post by zigbert »

Karl Godt
I added your hickup fix, but used an alternative solution for the anti-spinup. Using parameters makes life easier if we later want more options.....


Thank you, and sorry for taking so long
Sigmund

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#175 Post by Karl Godt »

NEXT : pcd-1.3 :

is working well on dpup-008
(I also kicked out confusing or buggy gnome-mplayer and replaced it with gxine from dpup-005 )

unfortunately 2 things to report :
/usr/share/applications/pcd.desktop
Exec=pcd
should be
Exec=pcd -x

/root/Downloads/pcd-1.3/pinstall.sh
the syntax seems to be confusing

Code: Select all

#!/bin/sh
#post-install script.
if [ "`pwd`" != "/" ];then
  echo '#!/bin/sh' > ./usr/local/bin/defaultcdplayer
  echo 'exec pcd' >> ./usr/local/bin/defaultcdplayer
  chmod 755 ./usr/local/bin/defaultcdplayer
fi
1.: if [ "`pwd`" != "/" ];then
can it be omitted ?

2.: ./usr/local/bin/defaultcdplayer
shouldn't it be just
/usr/local/bin/defaultcdplayer
without the dot ?

I would prefer
a whole
/pcd-1.3/usr/local/bin/defaultcdplayer
#!/bin/sh
exec pcd "$@"
inside the directory before doing dir2pet.

I am learning to create pets also and can only say that tgz2pet didn't worked properly for me
but dir2pet did.
To create pre- or post-install scripts that create a backup of the old defaultmediaplayer script I have just a misty imagination of
something like that :
if test -f /FILE; then
cp /FILE /FILE.PET.bak

pCD is the best CD player I know because gxine is very noisy on using the cd/dvd drive.

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

#176 Post by zigbert »

Karl Godt
I would like /usr/share/applications/pcd.desktop to execute pCD the normal way (with spin-up) by default. I think that this is the best solution for most users. You can manually edit the .desktop file, or make a symlink on your desktop to include the -x switch.

The pinstall script is not my code. Barry asked me to include it, and I don't mess with that guy, else I got very good reasons :D


Sigmund

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#177 Post by BarryK »

Karl Godt wrote:/root/Downloads/pcd-1.3/pinstall.sh
the syntax seems to be confusing

Code: Select all

#!/bin/sh
#post-install script.
if [ "`pwd`" != "/" ];then
  echo '#!/bin/sh' > ./usr/local/bin/defaultcdplayer
  echo 'exec pcd' >> ./usr/local/bin/defaultcdplayer
  chmod 755 ./usr/local/bin/defaultcdplayer
fi
1.: if [ "`pwd`" != "/" ];then
can it be omitted ?
It is that way for very good reason. If a PET is to be installed when building a Puppy in Woof, the current-directory when 'pinstall.sh' is run is not '/', hence the '.' in front is essential (or just usr/localbin/defaultcdplayer).

The 'if' test is testing if installing in Woof. It depends what you want. If you only want to change the default CD player when installing in Woof, then need that test.
[url]https://bkhome.org/news/[/url]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

SED and DOUBLE QUOTES

#178 Post by Karl Godt »

Thanks for the clarification !

It seems that

Code: Select all

#!/bin/bash
# post-install script.
# if [ "`pwd`" != "/" ];then
if test -f /etc/xdg/templates/_root_.jwmrc ; then
cp /etc/xdg/templates/_root_.jwmrc /etc/xdg/templates/_root_.jwmrc.acpitool.bak
cp /etc/xdg/templates/_root_.jwmrc /tmp

S1=`cat -n /tmp/_root_.jwmrc | grep -n '<\!-- <Exit confirm="false" label="Exit to prompt" icon="prompt16.xpm" /> -->'`
S1LN=`echo $S1 | cut -f 1 -d ":"`
S9=`cat -n /tmp/_root_.jwmrc | grep -n '</JWM>'`
S9LLN=`echo $S9 | cut -f 1 -d ":"`
TP=`expr $S9LLN - $S1LN`
TAIL=`tail -n $TP /tmp/_root_.jwmrc`
HEAD=`head -n $S1LN /tmp/_root_.jwmrc`

NEWMENUP='  <Program label=\"Suspend to RAM -- light sleep\" icon=\"zz.png\">rxvt -e acpitool -s</Program>'

SEDINSL=`expr $S1LN + 1`

# sed '45i\newline' file | sed '45inewline' file 
# use -i to edit in place redirect using '> outfile' to copy it to another file.
# Also the backslash isn't necessary, I just put it there for clarity. 

sed -i "$SEDINSL i\ $NEWMENUP" /etc/xdg/templates/_root_.jwmrc 
# ' prevents sed from using Variables

fixmenus
`jwm -restart`
fi
exit
is working well for me !

It is a pet that contains 2 icons and the simple debian-squeeze acpitool binary.

It took me perhaps 24 hours to find out about the sed syntax to write a line somewhere into a file.
head and tail had been the first attempt of mine but echo $TAIL or $HEAD > FILE converted it to one string.

awk I was trying also , perhaps it also needed Double Quotes to use $VARIABLES.

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#179 Post by abushcrafter »

In the pinstall.sh in the current package for pcd 1.3. You forgot to add ""$@"". So you should have this: "/usr/local/bin/defaultcdplayer":

Code: Select all

#!/bin/sh
exec pcd "$@"
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

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

tracks don't show in window

#180 Post by don570 »

I'm not sure which version of pcd

Tested versions in wary 098 and luci 239

I launched pcd with no CD in tray
and got the message in window 'No disc inserted'

When I inserted Audio CD, then clicked 'Read CD'
then clicked play icon , the window still showed
'No disc inserted'. The entire CD did play to the end.

Note : I don't have internet access so it can't search
for names of tracks on the internet.

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

#181 Post by zigbert »

Version 1.4
See main post

Changelog
- Bugfix: New disc-scan after 'No disc insterted' message (thanks to don570)

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

no change noticed in pcd 1.4

#182 Post by don570 »

I didn't notice any change in the new version pcd 1.4
I still get the 'no disc inserted' message in the window
if I launch pcd and then insert the Audio CD.
Tested on luci 241 . I have no internet access.

________________________________________

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

#183 Post by zigbert »

don570
So there is more....... :)

I have added a 1 sec sleep in line 20 (/usr/local/pcd/func), to wait for the disc to spin up. Does it help you? Please try pCD-1.4-1 in the main post.


Sigmund

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

Take your time

#184 Post by Karl Godt »

Spider mode enabled. Check if remote file exists.
--2010-12-08 19:43:18-- http://puppylinux.com/
Resolving puppylinux.com... failed: Connection timed out.
wget: unable to resolve host address `puppylinux.com'

AND ANOTHER TRY 'Read CD' >
# LANG=C wget -S --spider -T 1 puppylinux.com
Spider mode enabled. Check if remote file exists.
--2010-12-08 19:28:50-- http://puppylinux.com/
Resolving puppylinux.com... 74.53.27.162
Connecting to puppylinux.com|74.53.27.162|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Wed, 08 Dec 2010 18:26:55 GMT
Server: Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Last-Modified: Fri, 26 Nov 2010 12:45:35 GMT
ETag: "5bb4003-15b4-495f4193f99c0"
Accept-Ranges: bytes
Content-Length: 5556
Content-Type: text/html
Connection: keep-alive
Length: 5556 (5.4K) [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.

It seems that the disk drive icon has to appear on the desktop before clicking 'Read CD' which can take sometimes several seconds. Clicking 'Read CD' immediately after inserting the CD `pcd` showed no disk inserted, Clicking 'Read CD' another time before the drive icon appeared also no disk inserted, Clicking 'Read CD' immediately after the drive icon appeared just unknown artist and track #Nrs. The FOURTH Clicking 'Read CD' then showed the retrieved Data.

I also looked into the code and gtkdialog is poorly documented ... google for gtkdialog3 and you'll find zigbert and murga linux 8)

Code: Select all

<button>
     <label>$LOC204</label>
     <action>$APPDIR/func -stop</action>
     <action>eject</action>
     <action>for i in \`ls /root/.pcd/tmp\` ; do echo > /root/.pcd/tmp/\"\$i\" ; done</action>
     <action>sleep 1.4</action>
     <action type=\"clear\">ENTRY_ARTIST</action>
     <action>refresh:ENTRY_ARTIST</action>
     <action type=\"clear\">ENTRY_ALBUM</action>
     <action>Refresh:ENTRY_ALBUM</action>
     <action type=\"clear\">CDDA</action>
     <action>Refresh:CDDA</action>
     <action type=\"clear\">PB</action>
     <action>Refresh:PB</action>
    </button>
is working on dpup-005 but with warnings ( of which I get a lot from seamonkey, abiword and other apps here )
** (gtkdialog3:4382): WARNING **: gtkdialog: Warning: Clear not implemented for this widget..

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

no disc inserted

#185 Post by don570 »

I tried pcd 1.4.1 and I'm still getting 'no disc inserted'
messages if I launch pcd first.

I tried terminating my DVD burner differently to see
if that would change anything, but no difference.

I wait to see desktop drive icon before clicking 'Read CD'
Am I the only one with this problem?
I have an IBM M41 desktop machine.

_________________________________________________

Post Reply