IPB

Welcome Guest ( Log In | Register )

> Hydrogenaudio Forum Rules

- No Warez. This includes warez links, cracks and/or requests for help in getting illegal software or copyrighted music tracks!
- No Spamming or Trolling on the boards, this includes useless posts, trying to only increase post count or trying to deliberately create a flame war.
- No Hateful or Disrespectful posts. This includes: bashing, name-calling or insults directed at a board member.
- Click here for complete Hydrogenaudio Terms of Service

[DOUBLE POST] 'Intelligent' Random proposition, Randomise a playlist so the same artist does not appear too often
Spanky Monkey
post Oct 15 2012, 12:10
Post #1





Group: Members
Posts: 20
Joined: 23-September 12
Member No.: 103348



Hey all,

I started a topic here, asking if it was possible and if I missed something, but I don't think it currently is with what is built into foobar2000.
http://www.hydrogenaudio.org/forums/index....showtopic=97152

What I am looking for is an intelligent randomisation to create a playlist that doesn't have songs by the same artist cropping up too often after each other.

For instance say, we load our entire music library as a playlist, Sort>Randomise the list and have just played a Fleetwood Mac track. We do not want to hear another Fleetwood Mac track for at least 10 tracks from different artists.

I put forward this proposition to anyone who knows how to write this sort of thing: Basic web design is a challenge for me, and "echo" and "print" commands on a c64 aren't going to cut it here!

I tried installing MS Express C++, and got very confused, very quickly with dependencies and libraries and stuff. I think the tutorial written (somewhere on here) is a little outdated, and I couldn't follow it exactly step by step. Bottom line, it's beyond me to program it - but....

=======================================================

I've tried to explain it in human written form and sort of semi-computery way:

I've thought of a different approach to just continually randomising batches that are not 'random' enough.

OK so here's the plan in human (H) and Computer terms:

1H: We have a hat filled with strips of paper which contain TITLE - ARTIST for each track. A pool of our music list.
1C: This is what we have already, a pool of files with correctly meta tagging. A pool of our music library.

2H: We pull out a strip of paper - its random selection
2C: Randomise entire library order save a "randomised_temporary_list". Take first item - its random selection

3H: Put it at the top of our list.
3C: Copy to new playlist, and delete from "randomised_temporary_list"

4Ha: Select another strip of paper (second).
4Hb: If it has different info to first (Artist), add to list, under the first strip.
4Hc: If it has the same info as the first (Artist), leave to one side

4Ca: Select first item on random "randomised_temporary_list". Analyse meta data.
4Cb: $if[selection]<ARTIST> = [first playlist item] then copy to "hold_list" and delete from "randomised_temporary_list"
4Cc: $if[selection]<ARTIST> not equal to [first playlist item] then copy to "playlist" and delete from "randomised_temporary_list"

5Ha: Select another strip of paper (third).
5Hb: If it has different info to first or second (Artist), add to list, under the second strip.
5Hc: If it has the same info as the first or second (Artist), leave to one side, underneath any previous strips.

5Ca: Select first item on random "randomised_temporary_list". Analyse meta data.
5Cb: $if[selection]<ARTIST> = [first playlist item] or [second playlist item] then copy to "hold_list" and delete from "randomised_temporary_list"
5Cc: $if[selection]<ARTIST> not equal to [first playlist item] or [second [playlist item] then copy to "playlist" and delete from "randomised_temporary_list"

This would then continue, with a range of playlist items to keep artists/albums/genres separate by any number of tracks.

6Ha: Select a strip of paper (the tenth in succession).
6Hb: If it has different info to first to ninth strips, inclusive, (Artist), add to list, under the second strip.
6Hc: If it has the same info as the first to ninth, inclusive, (Artist), leave to one side, underneath any previous strips.

6Ca: Select first item on random "randomised_temporary_list". Analyse meta data.
6Cb: $if[selection]<ARTIST> = [bottom 9 playlist items] then copy to "hold_list" and delete from "randomised_temporary_list"
6Cc: $if[selection]<ARTIST> not equal to [bottom 9 playlist item] then copy to "playlist" and delete from "randomised_temporary_list"

This is now happily randomising and checking to make sure tracks that are from the same artist/genre do not appear within a close proximity. This proximity can be adjusted by using the [bottom X playlist items]. If there are less than X number then it will keep the next item different from all of the playlist items.


Now, there is an issue of what to do with those tracks that were too similar. What would need to be employed as part of the script is to check the "hold_list" after every 11 successful items get added to playlist.
Or the hold list could be removed all together, and the unsuccessful track could be shifted down the "randomised_temporary_list" 11 places.

*I choose 11 places as we are using 10 items as the proximity range of same artist tracks.



OK, there is definitely as issue in this setup, and probably any kind of setup, where if the pool of tracks is too samey - in an extreme example: 3 artists, 20 albums, 18 albums by one artist. This scenario would leave many many tracks not played because they occur far to frequently. The above processing could and probably would crash in this scenario. So a fail safe would need to be employed - to stop looking after say 30 recursive fails (remember the pool is still random - its highly unlikely that you sort>randomise your library and end up with 30 items in a row that belong to the same artist - genre perhaps.).

The source data for the randomised list could be made by copying the current playlist, and randomising that, or by having a GUI to select locations. Either way it shouldn't be all that hard to use.

Cheers for any input on this, it'd be much appreciated biggrin.gif

I found a link to a plugin for the Squeezbox which looks like it does something very similar:
http://wiki.slimdevices.com/index.php/Dyna...Playlist_plugin
Look to the bottom of the wiki for "Integration with Custom Skip plugin" - "recently added artist"

If I have placed this in the wrong section I am sorry. Pease move it and let me know, thanks.
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st July 2014 - 10:53