Simple audio player needed

Audio editors, music players, video players, burning software, etc.
Message
Author
PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

Simple audio player needed

#1 Post by PaulR »

I need a very simple audio player that will just play the contents of a directory (i.e no playlists, visualisation or any 'add-ons').

All that is required is to be able to browse to a directory and choose play with the ability to pause/stop/next/previous.

PlayMusic (http://puppylinux.info/topic/playmusic- ... io-players) is pretty much what I'm after - it works but for some reason it always stops after playing the first track.

I don't want to install anthing >10Mb !

TIA

Paul

User avatar
session
Posts: 89
Joined: Mon 07 Feb 2011, 23:11
Location: Valley of the Sun

#2 Post by session »

OscarTalks has compiled the latest DeaDBeeF player for various Puppies here. It may be more feature-rich than what you want, but it's a reasonable 2.5mb and it plays directories via SendTo in Rox flawlessly.
Attachments
capture9777.png
(12.03 KiB) Downloaded 1186 times
[color=green]Primary[/color] - Intel Pentium 4 2.40GHz, 571MB RAM, ATI Radeon 7000. Linux Mint 17 Qiana installed.
[color=blue]Secondary[/color] - Pentium 3 533MHz, 385MB RAM, ATI Rage 128 Pro ULTRA TF. Precise Puppy 5.7.1 Retro full install.

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

#3 Post by zigbert »

This should be handled by pMusic, so I made a brief test (pmusic /root), but it fails to use a directory as music source. This is a bug, and will be fixed for the upcoming pMusic 4. On the other hand - pmusic /root/*.mp3 works well.

How the gui looks, is handled by the frontend, and can be whatever you like.


Sigmund

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#4 Post by PaulR »

Thanks both :D

Session, I'll give that a try.

Zigbert, I thought PMusic required tracks to be added to a playlist? (I'm sure I read that on the wiki??). Ideally I just want the user to use a gui to browse to the folder she requires and click play. Personally I like PMusic but I need something uber-simple for this person.

Cheers

Paul

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

#5 Post by zigbert »

Paul
There is no problem building a pMusic after your specifications.
Of course it require an evening with work to build the frontend, but all in all that should not be a hard task.

If you get what you want with Deadbeaf (or anything else), go for it. Maybe Thunor want to fix PlayMusic...

But if you don't get what you want, please make a draft of how you want the gui to look/work, and I can take a look...


Sigmund

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#6 Post by PaulR »

zigbert wrote: But if you don't get what you want, please make a draft of how you want the gui to look/work, and I can take a look...
That's great thank you - I'll report back here :D

Paul

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#7 Post by rcrsn51 »

@PaulR: Is this the kind of thing you are looking for?

--------------------------------

Discussion moved here.

----------------------------------
Last edited by rcrsn51 on Sat 15 Jun 2013, 09:57, edited 56 times in total.

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#8 Post by PaulR »

Thanks rcrsn51 - that is pretty much precisely what is needed and beautifully compact! (I started bulding a quick version using BaCon but knowing nothing about aply/ffplay etc couldn't figure out how to pause/resume).

I'd add one request if you ever fancy modifying it - is it possible to kill the volume temporarily when resuming to avoid the 'fast forward' noise? (I'm guessing that it's seeking the nearest sort of 'key frame')

EDIT: Showing a list of mp3 files in the directory in a list or combo box might be useful (or maybe showing the current song in the window titlebar and track titles as tooltips over the next/prev buttons - sorry I have no idea if any of that is possible using gtk etc)

Many thanks

Paul

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

PaulR wrote:is it possible to kill the volume temporarily when resuming to avoid the 'fast forward' noise?
I don't hear anything like this. Maybe it's an artifact of your particular sound card. There is no difference in the code between playing a file normally and resuming it.
(i.e no playlists, visualisation or any 'add-ons').
Showing a list of mp3 files in the directory in a list or combo box might be useful (or maybe showing the current song in the window titlebar and track titles as tooltips over the next/prev buttons - sorry I have no idea if any of that is possible using gtk etc)
Make up your mind. :wink:

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#10 Post by PaulR »

Yes, I thought that wouldn't slip by you :D

The difference between what I meant and a 'normal' playlist:

You wouldn't need (or be able) to add, delete or re-order tracks but you would have a visual indication of the running order (or what's next/before if shown as tooltips or somesuch). Essentially the program would just list any mp3 files in the directory in a listbox - and possibly indicate the current track by highlighting an item in that list.

You could add a simple on/off toggle or radio button labelled 'repeat' for when there's lots of washing up to do or wallpaper to be hung :D

My it's getting fancy now! :P

Paul
Attachments
screenie2.jpg
(25.33 KiB) Downloaded 990 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#11 Post by musher0 »

Hi, PaulR.

Your playlist is funny. How many "salty dogs"* did you have before writing it?! :lol: (To continue the dog metaphor!)

Cheers!

musher0

~~~~~~~
* http://www.drinxo.com/cocktail-salty-dog-2178.html
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#12 Post by PaulR »

musher0 wrote: Your playlist is funny. How many "salty dogs"* did you have before writing it?! :lol: (To continue the dog metaphor!)
:D
Last edited by PaulR on Mon 10 Jun 2013, 21:02, edited 1 time in total.

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#13 Post by PaulR »

rcrsn51:

The milestone version works perfectly for me - it does just what I need it to and will be much used I'm sure. Thank you very much :D

One idea for more functionality -> allow skipping to a track by selecting it in the playlist window as the user currently has to 'work out' where the jump function will land.

I suspect this may not be possible as multiple instances of the playlist dialog are possible (actually is there a way to prevent that? Maybe disable/enable the button as the playlist is opened/closed?) and I'm not sure what those dialogs can feed back to the main program.

Probably too involved for the minimalist aims of the program.

Cheers

Paul

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#14 Post by rcrsn51 »

Thanks for testing this.

I looked at many ways of handling the playlist while keeping the code as simple as possible. Currently, the Playlist window disconnects from the main program so you can browse it without affecting the playback. It is meant to be read-only. You will notice that when you select Jump, the playback stops in preparation for selecting a new track. Maybe the Playlist screen should have a message that explains this.

In spite of my claiming that v2.5 is a milestone, there will soon be a v2.6. It will auto-play a file when you select it in ROX. Now you can set PeasyMP3 as your default audio/video player in /usr/local/bin and play files by left-clicking on them.

Bill

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#15 Post by disciple »

Perhaps a bit off-topic, but one thing I've always missed in Linux is the "directory player" 1by1. When I saw the "file browser" plugin for deadbeef I hoped that was it, but unfortunately not :(
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

disciple wrote:... one thing I've always missed in Linux is the "directory player" 1by1.
Me too. That's the point of PeasyMP3. Have you tried it?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#17 Post by disciple »

It doesn't automatically progress onto the next directory in the filesystem, does it?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

PeasyMP3 deserves own thread

#18 Post by mcewanw »

rcrsn51 wrote:PeasyMP3 was originally designed as an MP3 player. But it can now play any format that MPlayer recognizes.

PeasyMP3 works with folders of media files. Drag a folder into the input box or click the Folder Chooser button.
This is a great idea. Fills a void in what Puppy provides. I'm using your program now to play some music videos. May I suggest that you start a new thread especially for PeasyMP3 - easier to keep track of for following PeasyMP3 developments.

Also - don't know if you mentioned that pressing P on the keyboard will toggle Pause/Continue in Mplayer window. Lots of other Mplayer control keys for other effects (e.g. Left/Right curson keys for jumping back and forwards to different parts of a playing video; key F toggles Fullscreen video)

mcewanw
github mcewanw

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

controlling mplayer

#19 Post by mcewanw »

These links might prove useful:

http://www.mplayerhq.hu/DOCS/HTML/en/control.html

http://www.mplayerhq.hu/DOCS/man/en/mpl ... %20CONTROL

In theory I suppose you should be able to use gnome-mplayer for much of PeasyMP3 functionality, but the version I've tried in Slacko533 seemed to be a bit buggy at folder playing.

Also Peasy could be a less resource-intensive frontend and easily modified. I'd change the name from PeasyMP3 to something more media generic though, since that would highlight its main advantages. Pmusic probably the least resource intensive currently for music playing in Puppy.

EDIT: Having had a quick glance at your code I see that you are using lame | aplay for mp3 playback and not mplayer so PeasyMP3 is even less resource intensive than I thought, sorry. Peasy probably also the least resource intensive mp3 player for Puppy afterall. Great! Any particular reason why you store the program in /usr/sbin rather than /usr/bin?
Last edited by mcewanw on Thu 13 Jun 2013, 03:39, edited 1 time in total.
github mcewanw

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

retrovol?

#20 Post by mcewanw »

I modified Peasy, for my own use, to use retrovol mixer full window when volume button pressed (but why not call the button MIXER?), or alsamixer if retrovol not available. This needs worked on though, cos as it stands it doesn't close retrovol (or alsamixer) when Peasy closes (not that that may matter). In case useful to anyone:

Code: Select all

VOLUME () {
if [ $(which retrovol 2>/dev/null) ];then
   killall retrovol 2>/dev/null
   retrovol &
else
   	rxvt -geometry "80x24-0-25" -e alsamixer -V all &
fi
}
export -f VOLUME
(In precord I use similar code as above but store the PIDs of the alsamixer process ,in /tmp/precord, for killing when the application is quit).

and in gtkdialog part:

Code: Select all

      <button>
        <label>$(gettext 'Volume')</label>
        <action>VOLUME</action>
      </button>
I do think using lame provides lowest resource usage, but I'm sure you know you could alternatively use ffmpeg, which is normally compiled to use libmp3lame. Perhaps no point in this case, but ffmpeg can play a variety of formats including mp3 and ogg with a line such as:

Code: Select all

ffmpeg -i "$MP3FOLDER/$TRACKNAME" -f au - 2>/dev/null | aplay >/dev/null 2>&1
github mcewanw

Post Reply