You are not logged in.

#26 2014-07-07 17:57:31

progandy
Member
Registered: 2012-05-17
Posts: 5,317

Re: whistle - a minimalistic curses based audio player

ap0calypse wrote:

but what about ratings in ogg-vobis? flac? are there any?

There are inofficial extensions to the vorbiscomment format (used in ogg and flac), often there is a RATING field, but the format is not constant. Some use 0-5 (for stars), others 0-100 in percent. I once even read a suggestion for 0-255 just like ID3v2, but that is probably not used in the wild.
Edit: Adding unofficial fields to vorbiscomments is common practice. If a player does not understand the field, it skips it.

Last edited by progandy (2014-07-07 17:58:23)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#27 2014-07-08 08:05:12

smiszym
Member
Registered: 2014-04-04
Posts: 14

Re: whistle - a minimalistic curses based audio player

Well, perhaps you could mix embedded-in-tags ratings with whistle-only ratings. These two would be completely independent sets of ratings and it would work this way:
1. the player uses only whistle-only ratings to choose a song and to sort songs and to do whatever else,
2. whistle-only ratings default to 0 (or unknown) and can be changed at any time without altering audio files,
3. users can "import" or "copy" embedded-in-tags ratings from certain files into whistle-only ratings.

Just suggesting wink

Offline

#28 2014-07-08 09:25:55

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

smiszym wrote:

Well, perhaps you could mix embedded-in-tags ratings with whistle-only ratings. These two would be completely independent sets of ratings and it would work this way:
1. the player uses only whistle-only ratings to choose a song and to sort songs and to do whatever else,
2. whistle-only ratings default to 0 (or unknown) and can be changed at any time without altering audio files,
3. users can "import" or "copy" embedded-in-tags ratings from certain files into whistle-only ratings.

Just suggesting wink


Although it might be correct and common practice to write such ratings into tags, I really am not sure if this practice is really a good practice ... How am I supposed to know which tag field represents the ranking if they are called, .... I don't know .... EXAILE_RANKING, or banshee-rank, or whatever ... wink

I think the most sane and secure way is to create a separate data structure to hold ratings for every song (like progandy and you recommended).
Because other players could write these ranking-tag in whatever fashion they like best, I can't think of a better way to make this happen.

In the near future I will most likely implement this ranking (additionally to some other features wink ), but first I'm going to implement equalizer presets, and a dynamic equalizer setting, which can be used to save equalizer settings over restarts and gives the user the possibility to apply a specific equalizer to a specific album/song/artist.

I think this is crucial, because I don't know any player, that let's you do that. smile

Thanks for the ideas!


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#29 2014-07-08 10:20:07

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: whistle - a minimalistic curses based audio player

I like that clean mp3 player you've created here. I guess I've found a bug:
If I just started whistle and select a song hit p there seems to be somre error message but I can't read it fast enough before the program simply quits.
Maybe connected to that: when I stop the playing using S and then pressing p there is no sound.

Also a request:
When using the shuffle mode it is sometimes hard to find the song it is playing in the list, therefore it would be nice if the list scrolls down to the song playing when starting a new song. At least in the shuffle mode


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#30 2014-07-08 10:32:52

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

dice wrote:

I like that clean mp3 player you've created here. I guess I've found a bug:
If I just started whistle and select a song hit p there seems to be somre error message but I can't read it fast enough before the program simply quits.
Maybe connected to that: when I stop the playing using S and then pressing p there is no sound.

Also a request:
When using the shuffle mode it is sometimes hard to find the song it is playing in the list, therefore it would be nice if the list scrolls down to the song playing when starting a new song. At least in the shuffle mode

Hi there! smile

lowercase 'p' is for PAUSE, not for play, that's uppercase 'P' smile but thanks for noticing. There is although nothing wrong in the behavior of that. What you maybe did is "Stop - Pause" which does presumably nothing smile

I will test it out, it shouldn't just simply quit due to wrong user input .... I will have a look at it smile

EDIT: forgot to mention the reason for not 'jumping-to-track':
If you are sorting your playlists, adding and deleting stuff, and the song changes, you would be kicked right out of your work and to the position currently playing. this may annoy users (at least, that was my opinion and the opinion of another tester). So I decided to not jump to the current track in the playlist. Maybe I could make a 'jump-to-selected' toggle switch if enough people are interested in such a feature wink

EDIT2: .... or even easier. keybind 'j' -> jump to currently playing song. that would be a solution I could most certainly live with. What do you think?

thanks!

Last edited by ap0calypse (2014-07-08 10:50:14)


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#31 2014-07-08 11:57:59

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

dice wrote:

If I just started whistle and select a song hit p there seems to be somre error message but I can't read it fast enough before the program simply quits.

FIXED! pause does nothing unless a song is really playing. Pausing a not-playing track doesn't really make that much sense wink


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#32 2014-07-08 16:55:48

smiszym
Member
Registered: 2014-04-04
Posts: 14

Re: whistle - a minimalistic curses based audio player

ap0calypse wrote:

keybind 'j' -> jump to currently playing song

Thumb up.

ap0calypse wrote:

FIXED! pause does nothing unless a song is really playing. Pausing a not-playing track doesn't really make that much sense wink

Some players always pause under 'p' and others toggle play/pause. I think that's a matter of preference. I personally don't mind smile

Offline

#33 2014-07-08 18:57:40

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

Heyho! smile

another day with fixes and features wink ... today I implemented the possibility to save your current equalizer settings per song/artist/album. This way, you have the unique possibility to really fine-tune your music smile The normal approach to do this would be:

- select song and play it
- change equalizer with F1 - F10
- select songs you want to apply these settings to (multiselect is possible)
- press 'v'
- > you will be prompted if you want to apply these equalizer to the selected songs only, the complete albums of the selected songs or the selected artists.

done!

depending on your choice, either the songs or the albums/artists selected now all have the equalizer settings and will still have them after a restart, because they are saved in .whistle.dat.

have fun!


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#34 2014-07-09 10:46:09

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: whistle - a minimalistic curses based audio player

ap0calypse wrote:

lowercase 'p' is for PAUSE, not for play, that's uppercase 'P' smile but thanks for noticing. There is although nothing wrong in the behavior of that. What you maybe did is "Stop - Pause" which does presumably nothing smile

Ah, I see....I didn't read the help that exact, sorry for that. I just saw 'okay it is a 'p' for pause and a 'p' for play. I didn't notice the difference, but now it's clear thank you.

ap0calypse wrote:

keybind 'j' -> jump to currently playing song. that would be a solution I could most certainly live with. What do you think?

I like that. Gives most control without being in the way


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#35 2014-07-09 11:09:02

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

smiszym wrote:

Some players always pause under 'p' and others toggle play/pause. I think that's a matter of preference. I personally don't mind smile

whistle also toggles play/pause with 'p', but it doesn't if nothing is loaded. If you loaded a file and play it, you can toggle the pause-switch as much as you want smile

dice wrote:

I like that. Gives most control without being in the way

I think so too. I will implement this as soon as I can smile

EDIT: pheewww ... looks like this 'j'-switch is harder to implement than I thought.

Unfortunately, Curses::UI::Listbox (which is the container for the playlist), doesn't support any method to just 'jump' to an index-point. That sucks ... I have to work through the Curses::UI::Listbox source code, to find out, if there is any possibility in doing so. (so far I have seen some things that look promising -> $this->(-ypos) for example. I have to check it out.)

I tried to contact the author of the perl-module, but I only get an auto-responder back, that this adress is no longer in use ... hmpf ...


EDIT 2:  I have it now. the new 'j' switch is implemented in the latest version smile (I was right, I had to fiddle around with the -ypos param smile )

Last edited by ap0calypse (2014-07-09 12:03:41)


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#36 2014-07-10 18:12:33

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

minor update:
* progressbar now shows time additional to percentual value, because sometimes you just want to know at which second something is ... wink


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#37 2014-07-10 19:20:12

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: whistle - a minimalistic curses based audio player

while i havent tried whistle the screenshots show that it needs some design cleanup. (keyword aligning).

apart from that its always nice to see more multimedia cli apps tongue


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#38 2014-07-10 19:51:10

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

You shouldn't rely on (maybe old) screenshots wink try it now, and tell me how to improve it.

I just recently did a major cleanup, I think it's much prettier than in the beginning smile


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#39 2014-07-10 20:07:17

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: whistle - a minimalistic curses based audio player

In recent version i get a lot of "Missing argument in sprintf on line 453" and "Use of uninitialized value in concatenation (.) or string at line 451" errors when playing a song. It occurs on the initial 'P' to start playing and when I hit 'n' for the next song. In combination with shuffle and the new jump to song function(thanks for this smile) it completely destroys the ui sad Although resizing the window hides the error messages, I guess because the ui is repainted and therefore hides these messages.


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#40 2014-07-10 20:17:21

smiszym
Member
Registered: 2014-04-04
Posts: 14

Re: whistle - a minimalistic curses based audio player

@dice, I had this as well and figured out how to solve it. Just remove ~/.whistle.dat

It seems that after some recent update (involving change of .whistle.dat structure) whistle does not like older whistle.dat files ;)

Did that help?

PS or maybe backup whistle.dat somewhere before removing, just in case its data can be rescued

Offline

#41 2014-07-10 20:20:50

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

Maybe even a quick rescan could help, this rewrites the datfile smile

btw: sorry if recent updates fucked up your playlists ... sad I had to fix some bugs, and in some cases, this interferes with some datfiles.
but the latest version should work alright smile

Last edited by ap0calypse (2014-07-10 20:23:31)


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#42 2014-07-10 20:38:24

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: whistle - a minimalistic curses based audio player

smiszym wrote:

Just remove ~/.whistle.dat

It seems that after some recent update (involving change of .whistle.dat structure) whistle does not like older whistle.dat files wink

Did that help?

Yes, it works now thanks.

Another thing I'd like to suggest: Add something like

 undef $track

to the stop function because it is still possible to pause a stopped song now, and even resume it without playing...
Maybe there is a more elegant way to do this, but it seems to work here and I am a noob with perl so I don't really know what I am doing wink


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#43 2014-07-10 20:46:23

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

Thanks, I will look into it! smile

EDIT: done! -> https://github.com/ap0calypse/whistle/c … 74e5af204e

Last edited by ap0calypse (2014-07-10 20:50:58)


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#44 2014-07-11 14:05:36

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

Because of the extended input from my favorite beta-tester which has many playlists and a huge collection, I made some improvements again. I almost f***ed up the datfile, because of the parallel work with 2 different hashes in it. I forgot to delete old values from this hash, although I deleted it in the other one, which led to inconsistency and mysterious unexpected hickups. I _think_ I managed to fix this now.

If you encounter things like wrong amount of songs in playlist-window in the left, please re-add some songs to the specific playlist. I added a delete_dups function, which now handles the duplicates and deletes them.

Thanks! ... and sorry if you encounter any problems smile

Last edited by ap0calypse (2014-07-11 14:06:42)


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#45 2014-07-11 14:42:58

progandy
Member
Registered: 2012-05-17
Posts: 5,317

Re: whistle - a minimalistic curses based audio player

ap0calypse wrote:

Because of the extended input from my favorite beta-tester which has many playlists and a huge collection, I made some improvements again. I almost f***ed up the datfile, because of the parallel work with 2 different hashes in it. I forgot to delete old values from this hash, although I deleted it in the other one, which led to inconsistency and mysterious unexpected hickups. I _think_ I managed to fix this now.

maybe you should start to add a database version at the beginning of the file, and add an upgrade script that rewrites the old database into the new format.

Last edited by progandy (2014-07-11 14:43:29)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#46 2014-07-11 14:57:52

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: whistle - a minimalistic curses based audio player

It seems as if the datfile gains more and more complexity and managing the format becomes difficult. Maybe you should use something like SQLite? This could also give us some performance benefit for huge collections.


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#47 2014-07-11 16:48:46

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

progandy wrote:

maybe you should start to add a database version at the beginning of the file, and add an upgrade script that rewrites the old database into the new format.

+


dice wrote:

It seems as if the datfile gains more and more complexity and managing the format becomes difficult. Maybe you should use something like SQLite? This could also give us some performance benefit for huge collections.

I did something (from my point of view) better. I rewrote it again to not need the additional data structure. Users with old datfiles are not affected though, because the new version doesn't use the now-obsolete structure anymore. If you don't want that old garbage to be saved and loaded in future, there is unfortunately only one way: rm ~/.whistle.dat

Boy ... what a day .... I just wanted to add a little bugfix, and ended up rewriting much of the code tongue

EDIT: BTW, playlists are now FINALLY sorted. Really sorted. Artist - Album, alphabetically, always.

Last edited by ap0calypse (2014-07-11 16:49:43)


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#48 2014-11-06 17:03:51

causes
Member
From: Finland
Registered: 2014-09-24
Posts: 2
Website

Re: whistle - a minimalistic curses based audio player

Nice program. I made ebuild for Gentoo Linux[1]. I would like to see backend changed from mplayer to mpv.

[1] https://github.com/causes-/causelay/com … ec6bcb0434

Offline

#49 2015-09-19 13:26:56

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: whistle - a minimalistic curses based audio player

Thanks to thor77 there is now a new AUR-package for whistle-git.

THANKS AGAIN FOR THAT.

the only difference is one module dependency (perl-ogg-vorbis-header removed, perl-ogg-vorbis-header-pureperl added).

@causes:

Thanks for the ebuild, very much appreciated smile

Does mpv have a similar 'slave mode' like mplayer? Because I rely on it. If it has, it shouldn't be too hard to switch between mplayer and mpv.


projects: whistle | bazinga
open minds, open sources, open future.

Offline

Board footer

Powered by FluxBB