Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: Zardoz on July 06, 2008, 09:14:00 PM

Title: playlist generator
Post by: Zardoz on July 06, 2008, 09:14:00 PM
I'd like to be able to generate a 'random' playlist of a set number of files from a set number of directories.
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 02:37:50 AM
Sorry, I must not be understanding this request very well - what feature is missing from Rockbox which is currently preventing you from doing this?

I'd do it by adding the folders I want to include to a playlist, and then shuffling it...
Title: Re: playlist generator
Post by: Zardoz on July 07, 2008, 03:13:53 AM
I have a fairly large number of music files on my player (18,000 +), arranged in folders from A to Z. What I was suggesting was a feature whereby one could add/make a playlist of say 200 tracks, selected at 'random' from all folders
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 04:11:43 AM
Well can you explain how you'd make this feature work (from an interface point of view, I'm not asking you to implement it in code!) differently from how I suggested ?
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 12:15:57 PM
How would this be any different from shuffling all the "possible" songs, then simply having a sleep time stop playback after the right time/number?
Title: Re: playlist generator
Post by: Zardoz on July 07, 2008, 12:40:49 PM
I was thinking of a time when I didn't want to choose anything and instead would like to hear 20 (for instance) random tracks. In practical terms maybe an option on the playlist menu to create a random playlist of x number of tracks selected from all files and folders or from specified folders
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 12:42:01 PM
You just repeated what you originally asked for. Again, how would that be any different?
Title: Re: playlist generator
Post by: Zardoz on July 07, 2008, 01:01:55 PM
ok imagine you have 5000 music tracks on your mp3player and you don't know what you want to listen to. so you 'ask' rockbox to choose 10, 20, 500 whatever, 'random' tunes and play them. (it's not a feature of rockbox currently. it's just a suggestion not a 'demand'. i can appreciate you people have better things to do than respond to, reply to or even think about lame ideas like mine)
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 01:22:47 PM
Yes, but you've still not answered my question about how you'd show this in the interface ?
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 01:41:54 PM
And I asked "what's the difference between saying 'choose 50 random songs' and 'randomize all the songs I want you to choose from, then play the first 50'"?
Title: Re: playlist generator
Post by: robin0800 on July 07, 2008, 01:48:24 PM
If you had 50 folders and wanted 50 songs perhaps what he wants is 1 song from each folder.
That's random in the folder but the 50 songs are certainly not random
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 01:49:46 PM
That's not what he's described at all.
Title: Re: playlist generator
Post by: robin0800 on July 07, 2008, 01:54:17 PM
Quote
a set number of files from a set number of directories

How do you know thats not what he wanted?
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 01:54:48 PM
Read his other posts where he clarifies?
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 02:03:22 PM
He's also still not suggested how you'd access this feature - which is the tricky bit if you ask me.
Title: Re: playlist generator
Post by: Zardoz on July 07, 2008, 02:52:51 PM
It might be an option on the playlist menu. So maybe a 'long select' would bring up an option to add a playlist
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 02:55:26 PM
And this "add to playlist" option would do what then ?

How do you tell it which subset of folders you want to choose from?

How do you tell it how many folders you want it to pick from ?

You need to consider these things.
Title: Re: playlist generator
Post by: MarcGuay on July 07, 2008, 03:16:05 PM
It seems to me like making a random playlist of all the files on the player, which Rockbox can already do, and then turning it off when you've had enough or setting the sleep timer to do it for you is close enough, no?
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 03:20:44 PM
That's what I think too - but clearly others feel differently. What I can't see though is an easy way to bring this into the UI to do exactly what they want...
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 03:26:03 PM
I can.

Two options: One determines whether the sleep timer causes shutdown, or just stop (or always make it just stop, and trust in the idle timeout to shutdown the player). The second allows the sleep timer to be set in "number of tracks" rather than "number of minutes" (assuming we don't already have that, I don't use it).

Then, you just queue/insert all the tracks you want it to select from, shuffle them, and set your sleep timer.
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 03:29:46 PM
I don't even think you need the "shutdown in a certain number of tracks" - most people can work out how long they want to listen to music for I would have thought.
Title: Re: playlist generator
Post by: Llorean on July 07, 2008, 03:30:59 PM
Yeah, time does make more sense, but there's actually a fairly solid argument for having it stop at a track end (the discontinuity of music being cut off mid-note can wake you if you're not entirely asleep, while letting a song end naturally can be less disruptive) so either a set number of tracks, or "when a time is set, have an option to wait until track end after that time is up" might make sense.
Title: Re: playlist generator
Post by: Zardoz on July 07, 2008, 04:44:40 PM
ahhh you crazy people. how is this explained
Title: Re: playlist generator
Post by: GodEater on July 07, 2008, 05:33:29 PM
Pardon?
Title: Re: playlist generator
Post by: BdN3504 on July 07, 2008, 05:44:13 PM
I think i under stand what he wants.
Imagine you have a list like this on your player that looks like this (each entry represents one album):

Code: [Select]
94 Sekt - On Rêve
113 - 113 Degrés
113 - Dans L'urgence
113 - Les Princes de La Ville
213 - The Hard Way
A Taste of Honey - A Taste of Honey
A Tribe Called Quest - Anthology
A Tribe Called Quest - Hits Rarities and Remixes
A Tribe Called Quest - Low End Theory
A Tribe Called Quest - Midnight Marauders
A Tribe Called Quest - People's Instinctive Travels And The Paths Of Rhythm*
A. Keys - Diary
Aaliyah - Age Ain't Nothing But A Number*
Aaliyah - I Care 4 U
Aaliyah - One In A Million
Aceyalone - A Book Of Human Language
Aceyalone - Accepted Eclectic 2001
Aceyalone - All Balls Don't Bounce
Aceyalone - Lost Tapes
Aceyalone - Love and Hate
Aceyalone - Magnificent City
Adès - Chasse a L'homme*
Aebersold - Vol 009 - Woody Shaw
Aesop Rock - Bazooka Tooth
Aesop Rock - Fast Cars Danger Fire And Knives
Aesop Rock - Float
Aesop Rock - Labor Days
Aesop Rock - Music For Earthworms
Africa Bambaataa and Family - The Light
Afro Celt Sound System - Seed
Afro Cuban Allstars - A Toda Cuba le Gusta
Afu-Ra - Body Of The Life Force
Afu-Ra - Life Force Radio
Afu-Ra - State of the art
AG - The Dirty Version*
Aimee Mann - I'm With Stupid*
Aimee Mann - Lost in Space
Aimee Mann - The Forgotten Arm
Air - 10 000 Hz Legend*
Air - Everybody Hertz
Air - Moon Safari*
Air - Premiers Symptomes
Air - Surfing On A Rocket EP
Air - Talkie Walkie*
Air & Alessandro Baricco - City Reading
Akhenaton - Black Album
Akhenaton - Double Chill Burger
Akhenaton - Electro Cypher
Akhenaton - Métèque et Mat*
Akhenaton - Sol Invictus
Akhenaton - Soldats de Fortune
Akinyele - Aktapuss
Akinyele - Anakonda*
Akinyele - Live At The Barbecue
Akinyele - Vagina Diner*
2 Pac - 2Pacalypse Now
2 Pac - All Eyes On Me
2 Pac - Better Dayz*
2 Pac - Black Jesuz
2 Pac - Classic Collection Vol.1
2 Pac - Heart Of A Thug... A Ghetto Gospel
2 Pac - In His Own Words
2 Pac - Loyal To The Game
2 Pac - Makaveli & Mussolini - Closest Road Doggz*
2 Pac - Me Against The World
2 Pac - Mix Em Up Mixtape Vol. 1*
2 Pac - Nu-Mixx Klazzics
2 Pac - R U Still Down
2 Pac - Resurrection*
2 Pac - Still I Rise*
2for5 - Broke Minds Think Alike
3rd Bass - The Cactus Album
7L & Esoteric - Dangerous Connection*
7L & Esoteric - DC2 - Bars of Death
7L & Esoteric - Moment Of Rarities
7L & Esoteric - Soul Purpose*
7L & Esoteric - Speaking Real Words EP
7L & Esoteric - Warning Dangerous Exclusives
8Ball - Lost
8Ball & MJG - Comin' Out Hard
8Ball & MJG - In Our Lifetime*
8Ball & MJG - Living Legends
8Ball & MJG - On Top of The World*
8Ball & MJG - Space Age 4 Eva
8Ball & MJG - The Remix Album
9th Wonder - The Dream Merchant Vol. 1
9th Wonder & Buckshot - Chemistry
9th Wonder vs Chops - 9th Year Freshman Mixtape
16 Horsepower - Hoarse
16 Horsepower - Low Estate*
16 Horsepower - Sackcloth 'n' Ashes
24-Carat Black - Ghetto Misfortune's Wealth
50 Cent - Get Rich Or Die Tryin'
50 Cent - Guess Who's Back
50 Cent - Guess Who's Back Again*
50 Cent - Power Of The Dollar*
50 Cent - The Massacre

choose marked dirs*

Now the implementation should look something like this:
you have a new entry somewhere in the main menu which has the name 'create a semi random playlist' or something alike. if you choose that option you will be asked to enter a number from 1-1000. the plugin first checks, how many albums there are on the player and then makes suggestions. In our case, we have around 100 albums so the suggestion would be between 1 and 50. after having specified this number, the plugin only looks into 50 folders on the player.

then it generates a random number which determines which folders to leave out (haven't figured that part out).

then you specify the number of songs you want to have in your playlist.

the plugin now looks into the list of 50 directories it has picked out and adds all the tracks up.

if the number of the tracks you want to have in your playlist is greater than the number of the added up tracks, you receive an error and have to input a smaller value.

then you define a number of max files you want to have from one directory.

and then you're done. But i think this is rather complicated, is that sleeptimer after a set number of tracks already available, or was that just a proposal?
Title: Re: playlist generator
Post by: Zardoz on July 07, 2008, 08:09:47 PM
And this "add to playlist" option would do what then ?

How do you tell it which subset of folders you want to choose from?

How do you tell it how many folders you want it to pick from ?

You need to consider these things.

I put the suggestion on a feature request on flyspray once.

Ok I'm imagining a separate option in the context menu. (under New Playlist perhaps) Say it's 'create playlist'. options might be 'number of tracks' from 'folders A to Z'
Title: Re: playlist generator
Post by: GodEater on July 08, 2008, 02:49:59 AM
you have a new entry somewhere in the main menu which has the name 'create a semi random playlist' or something alike. if you choose that option you will be asked to enter a number from 1-1000. the plugin first checks, how many albums there are on the player and then makes suggestions. In our case, we have around 100 albums so the suggestion would be between 1 and 50. after having specified this number, the plugin only looks into 50 folders on the player.

Why 1000, is this some completely arbitrary number you've come up with, or was there a reason for it ?
How does the player know how many albums there are on the player? Are you getting this information from the database? Because just because you and I organise our folder structure in terms of Albums, doesn't mean everyone else does.

In your example, where does the "between 1 and 50" come into it? I don't understand that either. Why not "between 1 and 75" or "1 and 5" ?

Quote
if the number of the tracks you want to have in your playlist is greater than the number of the added up tracks, you receive an error and have to input a smaller value.

This is just dreadful UI design.

Quote
then you define a number of max files you want to have from one directory.

As is this.

Quote
and then you're done. But i think this is rather complicated, is that sleeptimer after a set number of tracks already available, or was that just a proposal?

I don't know - I've never used the sleeptimer - but I suspect it's not implemented yet.


Options might be 'number of tracks' from 'folders A to Z'

I think you need to consider more strongly not what the options "might be" to "what they definitely should be".

"Folders A-Z"? So you mean "all folders on the player" then? In which case, how is this different from just creating a random playlist in the manner Llorean and I originally described, which is a feature that's been in Rockbox for aeons?
Title: Re: playlist generator
Post by: BdN3504 on July 08, 2008, 03:09:34 AM
[...]1000[...]completely arbitrary number[...] How does the player know how many albums there are on the player? Are you getting this information from the database?
->is that impossible?

Quote from: GodEater
In your example, where does the "between 1 and 50" come into it? I don't understand that either. Why not "between 1 and 75" or "1 and 5" ?
i thought you divide the number of albums by half... but you can go for any number. it should just be smaller than the number of albums there actually are on the player. this goes along with some
Quote
dreadful UI design.
again :)
Quote
I don't know - I've never used the sleeptimer - but I suspect it's not implemented yet.
I think that's a good feature. Implement that in the current build! New option menu looks like this: System-> Sleep Timer
Title: Re: playlist generator
Post by: GodEater on July 08, 2008, 03:18:45 AM
->is that impossible?
No, but then this feature *depends* on using the database, which not all users do. For example - I don't.

Quote
i thought you divide the number of albums by half...

Why just half? Why not some other fraction?


Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 09:16:22 AM
I don't use the database either. This suggestion has nothing to do with the database. I was imagining an option to create a playlist from the playlist menu. suboptions might be 'number of tracks'  'include all' or 'specify'
Title: Re: playlist generator
Post by: GodEater on July 08, 2008, 09:22:47 AM
and how would "Specify" work ?
Title: Re: playlist generator
Post by: robin0800 on July 08, 2008, 10:45:28 AM
How about use the existing system to get the random tracks and increase playing options to;

Play All
Play No.
Play Time

No. and Time would have to be configurable
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 04:43:37 PM
What I had in mind was this: A menu item 'Create Playlist'. A submenu 'Number of tracks'. Another 'Include' 'All' or 'Specify' and if 'Specify' is chosen you're brought to the file browser to select which folders to include (With respect to the setting recursively insert directories)
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 04:52:02 PM
So again, I repeat, how is that different from just creating the playlist the normal way and then limiting the number of tracks that get played? That's what you've just described, just in the other order...
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 04:59:11 PM
Well I thought if you created a playlist in the normal way and limited the number of tracks (to say 500) then you would end up with a playlist including only the first 500 tracks on the player?
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 05:09:35 PM
Not if you shuffled it... Plus you can pick and choose to create it from just certain folders, etc...
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 05:25:28 PM
But shuffling it will just rearrange the play order. If i have a directory on my player called 'music' which contains in nested directories all of my music files and I set maximum playlist size to 50, browse to the 'music' directory, invoke the context menu and 'insert shuffled' I will end up with playlist of the first 50 tracks in that directory, albeit in a 'random' order. Whereas what I was suggesting was the ability to select 50 tracks entirely at random from all of the tracks on the player.
Title: Re: playlist generator
Post by: Chronon on July 08, 2008, 05:38:29 PM
That's not what Llorean suggested.  Create a shuffled playlist of all tracks, then truncate the list or halt playback after a given number of tracks.
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 05:53:47 PM
ok but that creates a playlist of 18000 tracks plus which takes time to load and display. It was just an idea. sorry
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 06:11:46 PM
To randomly select from 18000 tracks, you need to know all 18000 tracks and their locations anyway. Thus your method wouldn't really be any faster for selecting 50 out of 18000 than the other method.
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 06:43:24 PM
I don't understand? What other method? Say I want to listen to 50 random tracks. I want those 50 tracks to be selected by rockbox from among all the tracks on my player. The idea is I have very little input and that I don't know what tracks are being selected. (I appreciate that 'random' is a mathematical impossibility but I fail to see what's so difficult to understand about this proposal. Equally I understand you people are very busy, generous of your time, and that this is essentially your project, but I was just suggesting something.)
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 08:21:47 PM
What you're not understanding is that we DO understand your proposal. It's not difficult to understand at all.

What I've asked, several times, is what's different between "pick 50 random tracks and play them" and "shuffle all the tracks and then play 50" since, for the first one, you have to have a list of all the tracks anyway? They're the same thing, but you can already essentially do the second one.
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 08:59:03 PM
the difference is time and resource. Adding 18000 tracks, shuffling and then limiting the tracklist to 50 makes no sense to me
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 09:00:56 PM
You don't seem to understand what I've said: You can't pick 50 out of the 18,000 without first knowing about the 18,000. It's not going to waste any more time or resources because you more or less have to do it that way already.

Let me ask you, can you pick 10 random cards out of a deck of cards without first having a deck of cards to pick from?

It's the same idea. To choose a random 50 songs from all of them, you first have to have a list of all of them.
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 09:18:01 PM
Explain this further. Of course you have to have all the files to choose from. I have no idea what you're talking about.

so creating a 50 track playlist is no different to creating an 18000 track playlist?
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 09:20:15 PM
Okay, seriously, what are you confused about?

You've agreed you need a list to choose from. Yet when I suggest doing it by MAKING a list and playing the first 50, you seem to think that will take more resources than your suggestion of picking 50 out of a list and playing them?

There is no difference in what has to happen in the background. The only difference is that in one you choose the number first, and then where it picks from second. In the other you choose where it picks from first, and the number second.
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 09:31:27 PM
so as it stands, how can I choose 50 songs at random from among all my songs?
Title: Re: playlist generator
Post by: Llorean on July 08, 2008, 09:34:11 PM
You can't yet. As I said much earlier in this thread, you'd currently use a sleep timer, and it would make most sense for this to just evolve from the sleep timer by allowing it to stop instead of shutting down, and play a number rather than just a time.
Title: Re: playlist generator
Post by: Zardoz on July 08, 2008, 09:41:26 PM
and play a number rather than just a time.
precisely. Thanks for your replies dude.
Title: Re: playlist generator
Post by: bzavala on July 11, 2008, 02:00:03 AM
I also like the idea. How about using the DataBase and the tagnavi.config file?

You know how we have to define a format to display the data? We already have a %limit modifier. So we need a new modifier, kinda like the %sort. It could be called %random, for instance.

So in your tagnavi_custom.config file, you'd define this format entry:

%format "fmt_random_50"  "%s - %s" artist title %random %limit = "50"

Then you can define as many menu items you want. For example:

"Random 50"    -> title = "fmt_random_50"
"Beatles 50 Random" -> title = "fmt_random_50" ? artist = "The Beatles"
"Alternative Random 50" -> title = "fmt_random_50" ? genre ~ "Alternative"


"Random 50" would bring 50 random songs from all your songs.
"Beatles 50 Random" brings 50 random Beatles songs.
"Alternative Random 50" well.. you get the idea.

You can add multiple formats if you want 50, 100 or 1000 instead of only 50.

Oh... I could have so much fun with this!!!


just my 2 cents...


Ben
Title: Re: playlist generator
Post by: Llorean on July 11, 2008, 02:16:29 AM
Again, what functionality does this offer that simply making the sleep timer accept a number of songs, and have an option to stop, wouldn't have?
Title: Re: playlist generator
Post by: bzavala on July 11, 2008, 02:26:51 AM

The tagnavi_custom.config file would be a one time setup, and each time you want to listen your songs at random, it'd be as simple as selecting an option from the Database menu items.



Title: Re: playlist generator
Post by: Llorean on July 11, 2008, 02:31:17 AM
And it would make the feature dependent on the database, and completely useless for people who won't or can't use it.

Meanwhile, you can reproduce it globally, and more flexibly, with the other method.
Title: Re: playlist generator
Post by: Zardoz on July 11, 2008, 04:56:18 AM
how about making it a context only feature so that when a folder is long selected, under the Playlist option there's another option to 'Create Random' and then to choose a number of files to include?
Title: Re: playlist generator
Post by: Febs on July 11, 2008, 07:26:47 AM
I think that the point that Llorean has already made repeatedly, and which you haven't really addressed, is that you can already do this by using the "INSERT SHUFFLED" function.  The only functionality that would need to be added is the ability to stop after X number of songs, which could be addressed through the sleep timer.
Title: Re: playlist generator
Post by: Zardoz on July 11, 2008, 08:14:02 AM
but hang on it's not a 'stop after x number of tracks' it's an add 'x number of tracks, randomly'. as it stands if one chooses to 'add',shuffled'  to a playlist and has specified 'x' number of tracks in the limits setting, then one gets a playlist of the first 'x' number of tracks in that directory, shuffled. Am I completely wrong in my understanding?
Title: Re: playlist generator
Post by: GodEater on July 11, 2008, 09:38:55 AM
I'm locking this thread now. I think those that understand what the rockbox experts have said have got the gist of it, and Zardoz is clearly never going to understand what we've said.