pMusic 6.0.0

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#81 Post by zigbert »

Béèm wrote:will there be such thing as a library in future, in which songs canbe sorted by album/name/artist etc...?
The world is full of opinions of how music should be organized, and Pmusic are made with the focus on my way. This doesn't say we can't support other ways, 'DreamsToGo' gave her input, and we made some tweaks. You should describe the way you use your music collection. It is also great to hear in detail what you would Pmusic to do for you. When I hear that you add 250 songs to the playlist, I think 'this man is used to winamp' :) . Add many songs to Pmusic playlist will quick lead you to speed issues, because of the way Pmusic use gtkdialog. It is just not meant to keep the complete music collection in the playlist. Winamp has another approach, and doesn't use indexing like Pmusic of wxMusik.

Sigmund

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#82 Post by Béèm »

I have indeed used amongst those kind of app's Winamp and now RealPlayer in XP.
Indeed I am more looking for a program which can import the tittles and present it in I have headings with artist/album/year/length/tittle etc..

So PMusic is similar to gxine and totem (gnome) f.e.

Also you know now that 250 tittles can be imported in the playlist.

But I will still watch the space here.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Pmusic 0.2.1

#83 Post by WhoDo »

zigbert wrote:Requirements
No! Everything is already in Puppy 4. Puppy 3 misses id3lib.
Great. So can you please include a link to that here? Thanks.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

Re: Pmusic 0.2.1

#84 Post by ttuuxxx »

WhoDo wrote:
zigbert wrote:Requirements
No! Everything is already in Puppy 4. Puppy 3 misses id3lib.
Great. So can you please include a link to that here? Thanks.
Heres id3lib full package I just compiled on puppy 3.0.1
http://www.puppylinux.ca/tpp/ttuuxxx/pr ... -3.8.3.pet
enjoy
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

#85 Post by zigbert »

Main post is updated with link to id3lib. Thanks!!!

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

#86 Post by zigbert »

Version 0.2.2
See main post

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

#87 Post by zigbert »

Better support of music collections
I'm here showing an idea how to better support music collections which are organized in directories. - Like /band/album/song.mp3. The attached test version of Pmusic generates a playlist of any directory containing music files. These playlists get the extension *.dir to separate them from ordinary playlists like *.m3u and *.pls. Choosing 'Collections' (see pic) shows both playlists and directories (artist / album). And, you can search for your artist/album directory. When indexing you have to check for complete index (see pic). This will be slow the first time. Later Pmusic can treat only new files (checkbox).

If you have a music collection organized this way, please test and give feedback. Maybe you have other suggestions. Remember to either uncheck the button 'update only news...' or delete the directory /root/.pmusic.

Thanks for your help
Sigmund


Image
Attachments
pmusic-0.2.2b.pet
(15.38 KiB) Downloaded 499 times

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

#88 Post by zigbert »

Version 0.3.0
See main post

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#89 Post by linuxcbon »

#pmusic

endless going

cat: /root/.pmusic/tmp/pmusic-ffmpeg_output: No such file or directory

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

#90 Post by zigbert »

The backend is endless asking for some ffmpeg activity. If there is, - make some useful info for progressbar.

But, I'll see if I can get rid of that error to terminal. I hope the player worked for you ???

Sigmund

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

#91 Post by zigbert »

Michalis
I noticed today that my pmusic had 3 instances of func_progressbar running at the same time. I have done an approach to try to fix it, but it is a bit too early to ship a new release. Can you try to explain why progressbar is hungry for your resources.
- Are your machinery old?
- Does 'top' show that progressbar stealing too much cpu?
- Are there several func_progressbar shown in pprocess?
- Are you using the latest Pmusic - version 0.3.0?
- Is it Puppy 4.1 or ... ?

I disable progressbar on my music-station to avoid fan is running constantly (a PIII 600 laptop anno 1999).

Edit: Version 0.3.0 reduces the cpu-priority for func_progressbar.

Sigmund

Michalis
Posts: 237
Joined: Tue 08 Jan 2008, 14:50
Location: Greece

#92 Post by Michalis »

I'm running pmusic 0.3.0 in puppy 3.1

The machine I usually use is old, also I use many programs simultaneously, at least 4-5 (usually much more). When having the progress bar pmusic cpu usage is doubling and generally I like to use programs and functions as less resource hungry as possible, so I have always progress bar disable. A strange thing is that the system isn't showing any difference at pmusic's cpu usage, but I can see that throughout the total cpu usage every time.

Anyway, what I would like isn't a progress bar using less resources (actually I don't mind whether I see a progress bar or not) rather than just to see the title of the song which is playing (statically) in the position of the progress bar.

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

#93 Post by zigbert »

A strange thing is that the system isn't showing any difference at pmusic's cpu usage, but I can see that throughout the total cpu usage every time.
The progressbar runs as an unique process.
Anyway, what I would like isn't a progress bar using less resources (actually I don't mind whether I see a progress bar or not) rather than just to see the title of the song which is playing (statically) in the position of the progress bar.
I have tried get this, but either I'm not skilled enough, or the limitation in the gtkdialog library are strict.

Sigmund

User avatar
peppyy
Posts: 443
Joined: Mon 27 Jun 2005, 23:49
Location: VT USA
Contact:

#94 Post by peppyy »

Hi again Zidbert.
Is there a chance that the progress bar could be replaced with a text counter which uses percent? I don't understand how the whole dialog works :oops: but I was sure I saw a gtk gui that had a percentage counter.

Of course I could be completely wrong :lol:
Puppy Linux...
It just works!

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

#95 Post by zigbert »

If you could active send a percent status to that textbox, it would be easy. But since the Pmusic gui has nothing to do with the actual playback, it only reads outputs from the player. As far as I know, the only way gtkdialog supports an idle gui (no user activity) waiting for system input is via the pregressbar widget.

I don't think a textbox would use lesser cpu. The problem is not the progressbar widget itself, but that pmusic constantly runs a loop to check for new outputs from ffpmeg. If the output of ffmpeg could be used directly in Pmusic progressbar, this wouldn't be necessary.

Sigmund

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#96 Post by HairyWill »

Code: Select all

while [ a != b ]; do if [ "`cat '"$WORKDIR"'/pmusic-ffmpeg_output`" ]; then nice -18 '"$APPDIR"'/func_progressbar; usleep 100000; fi; done
Zigbert as I copied this approach in psip I have a couple of suggestions.
Do you really need to poll 10 tens a second surely twice a second would be adequate, even less if all you display is the title?
I changed the while condition to something like
while [ "$(ps | grep [p]music)" ]
this should help to ensure that the loop terminates properly when all the other pmusic processes are closed.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

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

#97 Post by zigbert »

HairyWill

1. while [ "$(ps | grep [p]music)" ] is a great improvement. I will add it at once.

2. usleep 100000 gives a smooth 'clock' in the bar. But it could be an option to update the progressbar every 2 seconds instead of hiding the progressbar.

Thanks for great feedback.
Sigmund

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

#98 Post by zigbert »

It seems to me that the actual cpu-eater is the while-loop started inside gtkdialog. I tried to set nice -18 in front of 'while', but no joy.

Sigmund

Michalis
Posts: 237
Joined: Tue 08 Jan 2008, 14:50
Location: Greece

#99 Post by Michalis »

I think that I managed to make something which with your knowledge maybe you can make it even better

First of all I changed:

Code: Select all

while [ a != b ]; do if [ "`cat '"$WORKDIR"'/pmusic-ffmpeg_output`" ]; then nice -18 '"$APPDIR"'/func_progressbar; usleep 100000; fi; done
To

Code: Select all

while [ "$(ps | grep [p]music)" ]; do if [ "`cat '"$WORKDIR"'/pmusic-ffmpeg_output`" ]; then nice -18 '"$APPDIR"'/func_progressbar; usleep 100000; fi; done
according to HairyWills' suggestion

Then I copied and renamed func_progressbar file to a new one called func_noprogressbar in the same directory.

Afterwards I did some cleaning in the file and so this is what is now left:

Code: Select all

#!/bin/bash

WORKDIR=$HOME/.pmusic/tmp
#show tool-info instead of song
TMP=`cat $WORKDIR/pmusic-PERCENT_BAR`
case "`cat $WORKDIR/pmusic-progressbar_status`" in
	undo) echo $TMP; echo 'Go BACK in playlist history'; exit ;;
	redo) echo $TMP; echo 'Go FORWARD in playlist history'; exit ;;
esac
#make sure to give some output
if [ "`cat $WORKDIR/pmusic-ffmpeg_output`" = "pmusic_stop" ] || [ ! "`cat $WORKDIR/pmusic-ffmpeg_output`" ]; then
	echo " " > $WORKDIR/pmusic-OLD_TIME
	echo 0
	echo "»»» Pmusic «««"
else
	#read ffmpeg output
	FILE=`cat $WORKDIR/pmusic-ffmpeg_output | grep "from '" | cut -d "'" -f 2- | sed -e "s/'://g"`
	#show metainfo of file if exist. (in indexlist)
	FILE2="`cat $HOME/.pmusic/index_all | grep -w "$FILE" | cut -d '|' -f 2`"
	if [ "$FILE2" ]; then FILE="$FILE2"; fi
	#---
	NOW_PLAYING=`basename "$FILE" 2> /dev/null | sed -e 's/\.[^\.]*$//'`
		FFMPEG_OUTPUT=`tail -c 120 $WORKDIR/pmusic-ffmpeg_output` #check for invalid output
	if [ "$FILE" ] && [ ! "`echo "$FFMPEG_OUTPUT" | grep 'invalid'`" ];	 then # expr + 1 checks if it's a number
		#find percent for progress bar
	
		#calculate time of seconds played
		
		if [ `echo $NOW_PLAYING | cut -b 1` -lt 9 2> /dev/null ]; then #first char is a number. This bugs progress bar.
			echo "|  $NOW_PLAYING  |"
		else
			echo "$NOW_PLAYING  "
		fi
		#keep values incase of invalid output next loop
		
	else #no time is detected
		cat $WORKDIR/pmusic-PERCENT_BAR
		if [ "$FILE" ]; then
			echo "$NOW_PLAYING$TMP"
		else
			echo "»»» Pmusic «««"
		fi
	fi
fi
exit 0
then I changed pmusic to:

Code: Select all

if [ $SHOW_PROGRESS_BAR = true ]; then
	GUI_PROGRESS_BAR="
	<progressbar>
	 <label>\" \"</label>
	 <input>"'while [ "$(ps | grep [p]music)" ]; do if [ "`cat '"$WORKDIR"'/pmusic-ffmpeg_output`" ]; then nice -18 '"$APPDIR"'/func_progressbar; usleep 100000; fi; done'"</input>
	</progressbar>"
else
	GUI_PROGRESS_BAR="
	<progressbar>
	 <label>\" \"</label>
	 <input>"'while [ "$(ps | grep [p]music)" ]; do if [ "`cat '"$WORKDIR"'/pmusic-ffmpeg_output`" ]; then nice -18 '"$APPDIR"'/func_noprogressbar; usleep 1000000; fi; done'"</input>
	</progressbar>"
fi
So what have I achieved from that?
I can see only the title without the red progress bar and the time.

What haven't I achieved from that?
No significant reduction in the cpu usage. That's maybe because the cleaning is very primitive and because of lack of knowledge I have produced many mistakes which I can see when running pmusic from console and in kp.

Maybe If you can fix those problems then you could achieved what we are asking? Not sure I just hope I gave you some help, or I at least I want to believe so :? :roll:

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

#100 Post by zigbert »

Michalis
Thanks a lot for your investigating.

My conclusion (at this moment) is that; it doesn't matter how much we strip func_progressbar. Running this function once a second or 10 times a second shouldn't steal much cpu even on older systems. The problem seems to be the 'while' loop itself. It's running constantly, and sleep/func_progressbar doesn't seem to affect the cpu hunger. (Please correct me if I'm wrong.) Why it acts like this is a mystery for me. I'm not a skilled person, so it could be just me. Like I told in my previous post, I have also tried to set a lower cpu-priority with 'nice' in front of the 'while' loop. But either is it not allowed, or I didn't fixed the syntax?

Sigmund

Post Reply