Script: Radio-DJ [MM3]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Post by uwuerfel » Tue May 27, 2008 3:13 pm

Hi,

I just want to inform you, that I will not be online for the next 5 weeks or so.
If there are any problems or questions you will either have to wait until I'm back or maybe someone from the community can answer...

CIAo, uwe..
Autor of Radio-DJ

bezukof
Posts: 27
Joined: Sat Sep 17, 2005 6:45 pm
Location: Northern California

Re: Script: Radio-DJ [MM3]

Post by bezukof » Tue Jul 08, 2008 4:27 pm

Just wanted to say thanks for writing this and taking the time to really flesh it out. After the inclusion of auto-dj and now this script, MM is now pretty much major-feature complete as far as I am concerned.

The one issue I have is the slowness of it. Maybe it's a problem specific to my setup but sometimes loading the next song will hang the program for a few seconds. And if I populate all ten of the upcoming tracks in the now playing list(by playing the track at the bottom of the list) MM will freeze entirely for about 15 seconds.
I don't really know scripting but maybe it would help if the script could somehow use a background process to pre-cache a list of at least 10 songs(as that is the max allowed in the autoDJ options) so that it wouldn't have to stop and think about which songs to play all at once when you ask it to.

Also it took me a little while to realize that the reason why the script was only playing recently played songs was that I was supposed to have the autoplaylist sorted from z-a instead of a-z, it might help to point that out somewhere.

And finally, this might be impossible, but...
I was originally going to request a favor factor for X category, and I noticed there were several similar requests already in this thread for various categories. Then I thought how great it would be if there was just a drop down list that let you pick any tag field and add a favor factor to it. Then I thought if this got made it would end up looking exactly like the auto-playlist edit page with one extra option. Soooo...

Would it be possible to just add a favor-factor field to the auto-playlist edit page? That way you could have this scripts functionality with every data set that MM has access to instead of just rating and play count, and you could bypass the whole second playlist thing and just query the DB directly.

I imagine it would look something like this:

[ Auto Playlist Criteria ]
-------------------------------------------------------------------------------------
[...Property.....][....Condition....][.....Value......][.......Favor Factor....]

Status..................is available..................................1
Rating......................>=................3 Stars................3
Rating.......................=................2 Stars.................0
Last Played............>(days ago)............1.....................4
Genre........................=.................polka.................10
etcetera.....


If this feature is not available to scripts then maybe this concept could at least be integrated into the Radio DJ interface.

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Re: Script: Radio-DJ [MM3]

Post by uwuerfel » Sat Jul 12, 2008 9:51 am

Hi bezukof,
bezukof wrote:Just wanted to say thanks for writing this and taking the time to really flesh it out. After the inclusion of auto-dj and now this script, MM is now pretty much major-feature complete as far as I am concerned.
Thanks. Nice to hear that :-)
And many thanks for your large feedback.
bezukof wrote:The one issue I have is the slowness of it. [...] if I populate all ten of the upcoming tracks in the now playing list(by playing the track at the bottom of the list) MM will freeze entirely for about 15 seconds.
Hm, that's strange. It really shouldn't do that.
After starting my scripts it needs a few seconds to initialize all internal data structures. But this should only happen once. On my machine this is about 4 seconds. The time depends on the amount of songs you use in your input play list. How many songs do you have in your input play list?
bezukof wrote:I don't really know scripting but maybe it would help if the script could somehow use a background process to pre-cache a list of at least 10 songs(as that is the max allowed in the autoDJ options) so that it wouldn't have to stop and think about which songs to play all at once when you ask it to.
I'm not convinced, that it is the process of getting the next song. The reason is the following: When you click on the Radio-DJ node, you have to wait for a few seconds (*1) and then the track list gets populated quite fast (*2). At least much faster than 10 songs in 15 seconds.

(*1) This happens because a new instance of my script is started when you click on the node and now the internal data structures are initialized.

(*2) The mechanism to fill the track list is the same as the one that is used by the Auto-DJ mechanism.

Anyway, I will play a little bit with the script, to see if there is any bug.

bezukof wrote: Also it took me a little while to realize that the reason why the script was only playing recently played songs was that I was supposed to have the autoplaylist sorted from z-a instead of a-z, it might help to point that out somewhere.
This is mentioned in the very first posting of this thread where I explain how Radio-DJ is used. I've copied it here for you.
For this feature to work, the input playlist must be sorted by the atribute "Last Played" from Z..A (songs just played are on top, songs not played for a long tome are on the bottom). When usin static playlist as input for Radio-DJ, this sorting is done by the script. But if you use auto playlists as input for Radio-DJ (as I do), than you have to make sure, that the auto playlist is sorted, by yourself.
I know that my English is not perfect. So if you find this is not explained good enough, please help me and post a better explanation. I will be happy to put it on the first posting.

bezukof wrote: And finally, this might be impossible, but...
I was originally going to request a favor factor for X category, [...] Then I thought if this got made it would end up looking exactly like the auto-playlist edit page with one extra option. Soooo...

Would it be possible to just add a favor-factor field to the auto-playlist edit page?
Unfortunately the auto-playlist is a built-in feature of MM. There no way to modify it using scripts. At least I don't know of any...
bezukof wrote:That way you could have this scripts functionality with every data set that MM has access to
Well this is possible to some extent.
You just have to sort the auto-playlist according to what ever data you would like to use for the favor factor.
(Of course you need to sort it always backwards (e.g. from Z..A))
The only thing you need to know is, that "Skip most recently played" will no longer work as expected in this case, since this feature *needs* the playlist sorted according to the attribute "Last Played". That means: When you use any other sorting criteria other than "Last Played" for the "Favor Factor" you *must* disable "Skip most recently played" by setting it to zero.
bezukof wrote:instead of just rating and play count, and you could bypass the whole second playlist thing and just query the DB directly.
Auto-playlists are not stored in the MM-database. Auto-playlists *are* database queries. Their results are not stored in the DB. In scripts I can only use them when using the internal data objects from MM. As long as MM is implemented that way, I see no way to implement my script just using DB queries.
bezukof wrote:If this feature is not available to scripts then maybe this concept could at least be integrated into the Radio DJ interface.
I will think about it. But right now I have no idea how this could be done.


CIAo, uwe..
Last edited by uwuerfel on Mon Aug 11, 2008 3:50 am, edited 1 time in total.
Autor of Radio-DJ

pirateg00
Posts: 8
Joined: Wed Jul 16, 2008 10:14 pm

Re: Script: Radio-DJ [MM3]

Post by pirateg00 » Wed Jul 16, 2008 10:25 pm

Hi Uwe

First off, I was very excited when I found this script! I have only been using MediaMonkey for a few months, but I love it and this makes it much better!

I was reading the description of your script about the weightings and how they are dependent on the number of songs for each rating. If I understand the logic right, that would mean a continuously changing set of probabilities each time the list was re-populated.

I was looking at the chart you posted about the correlation between rating, number of tracks, weighting, play probability, etc and was thinking instead of weighting the tracks by a somewhat arbitrary number, we weight them by selecting the probability out of 100% total. IE 1 star 0%; 2 star 10%; 3 star 15%; 4 star 35%; 5 star 40%. (i just used whole stars for simplicity!)

The thought process might be something like this:

I will assume a track list of 100 tracks and the rating percentage from above to keep it as simple as I can!

1. calculate how many songs of each star rating would be needed for the radioDJ list from the specified list length and given percentages. In this case it would be 0, 10, 15, 35, and 40 tracks for the stars 1-5 respectively.

2. read all the tracks from the specified playlist that you are pulling from to determine you have enough tracks from each to fill the radioDJ list.

3. If you do not, readjust the numbers from (1.) by filling up those stars that are lacking with all in the list (say there are only twenty 5 star tracks, we need 40, so put all 20 in the radioDJ list). then go back to 1 and recalculate the remaining. So since we now need 80 tracks still in the radioDJ list, that extra 20 tracks we are short from the 5 star tracks will be redistributed into the remaining stars. now this gets slightly tricky since the percentages will be not out of 100% but out of 60% because we do not consider 5 star anymore, so the new relative percentages would be 0%; 10%/60% = 16.67%; 15%/60% = 25%; 35%/60% = 58.33%; N/A% (for 1,2,3,4,5 stars respectively). OK so these new relavite percentages would be plugged back into whatever function used in 1 (which would obviously need some rounding scheme, like always round up to whole song and lowest rating gets the rest of the spots) but with 80 tracks instead of 100 . Then re-evaulate number 2 and repeat.

Anyway....

for the stars that have plenty of songs to fill up its requirement, they would obviously be chosen randomly from the playlist but after there are no stars lacking

Then if all goes well, you have the RadioDJ list filled up and good to go!!

for repetition elimination, I use autoplaylists now that specify last played greater than "bla" or playcount = 0. could these playlists be refreshed when radioDJ list is being refreshed? That might keep it from reusing songs over and over, or might there be a way to incorporate this into the script?, have an option box for not using songs that were played within a timeframe (or only play songs after a timeframe).

I think I will stop there for now...

Anyways, hope you (and everyone else!) will let me know what you think of the idea, I think that would be a nice way to play back tracks.

Thanks again for your great script and keep up the work!!

-pirateg00

pirateg00
Posts: 8
Joined: Wed Jul 16, 2008 10:14 pm

Re: Script: Radio-DJ [MM3]

Post by pirateg00 » Wed Jul 16, 2008 10:29 pm

*Thats keep up the GREAT work! :D

pirateg00
Posts: 8
Joined: Wed Jul 16, 2008 10:14 pm

Re: Script: Radio-DJ [MM3]

Post by pirateg00 » Thu Jul 17, 2008 3:58 pm

And another thought.... if the above were working, next to each percentage could be another option for specifying minimum number of days since the song was played for that rating. (this could replace the use of the autoplaylist with the restriction of not played in the last "bla" days). So, for example you could specify that higher rated songs could be played more frequently (higher percentage) as well as hearing the same songs more often (since you would like them more if they were higher rated)

Another thought I had was that perhaps there could be some sort of function or window that could be embedded into a toolbar or similar (like the search box for example) that you could specify on the go what criteria for the playlist you are pulling from. It would be similar to an autoplaylist or magic node perhaps, where you could specify criteria, but the benefit would be that you could change this easily instead of opening up the autoplaylist properties.

anyway, I was just brainstorming and hope that made sense!

-pirateg00

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Re: Script: Radio-DJ [MM3]

Post by uwuerfel » Fri Jul 18, 2008 12:18 pm

Hi pirateg00,

I'm not sure if I understood correctly what you are suggesting.
(My english knowledge is the limiting factor)

Anyway, I will try give answers.
pirateg00 wrote:First off, I was very excited when I found this script! I have only been using MediaMonkey for a few months, but I love it and this makes it much better!
Many thanks :-)
And also many thanks for posting your ideas.
pirateg00 wrote: I was reading the description of your script about the weightings and how they are dependent on the number of songs for each rating. If I understand the logic right, that would mean a continuously changing set of probabilities each time the list was re-populated.
Yes, you are right. But only, if the amount of songs per rating changes often and heavily.
If the amount of songs per rating is more or less the same, the probabilities should not change noticeable.
i.e. 10 songs more, when you already have 500 songs in a rating doesn't really matter.
After all, we are talking about probabilities. It needs need much more than just a few percent more or less probability to really notice a difference.

pirateg00 wrote:I was looking at the chart you posted about the correlation between rating, number of tracks, weighting, play probability, etc and was thinking instead of weighting the tracks by a somewhat arbitrary number, we weight them by selecting the probability out of 100% total. IE 1 star 0%; 2 star 10%; 3 star 15%; 4 star 35%; 5 star 40%. (i just used whole stars for simplicity!)
Hm. In the chart I tried to show, that there is a dependency between the probability of a rating and the (resulting) probability for each single song.
With my script you can only define weightings for the ratings, not for the songs.
If you want to define the weightings in a way, that you can see the percentage, the only thing you have to do is to make sure that the sum of all the weightings is 100.
Using your example from above, that would mean, just enter 0, 10, 15, 35, 40 respectively in the options for Radio-DJ.
Then about every 10th song would be a 2-star song.
Note, that this doesn't tell you anything about which song from within the 2-star songs it is.
(Does this help you?)

pirateg00 wrote: for the stars that have plenty of songs to fill up its requirement, they would obviously be chosen randomly from the playlist but after there are no stars lacking
Hm, I'm not quite sure, what you mean.
When there is a weighting for a specific rating (e.g. 1-star) and there is no song with this rating, what should I do?
Do you mean I should use songs with other ratings?

As long as there is at least one song within a rating, this song will be used.
Since I use a shuffle mechanism, I use a separate list for each rating.
At startup this list is filled with all songs within that rating.
When a rating gets randomly chosen, the song is removed from the list
until there is no song in that list anymore.
Then this list for that rating, that just got empty, gets filled again.
It uses the songs from the (auto-) playlist.
If the autoplaylist filters out all songs that have been played in the last 5 days,
these songs will not be used.
(N.B. this is similar to the feature "Skip most recently played" within Radio-DJ.
I just didn't realize that this could also be done by auto playlists)

pirateg00 wrote: for repetition elimination, I use autoplaylists now that specify last played greater than "bla" or playcount = 0. could these playlists be refreshed when radioDJ list is being refreshed?
As far is I know, this is exactly what should happen.
Have experienced other behaviour?
pirateg00 wrote: That might keep it from reusing songs over and over, or might there be a way to incorporate this into the script?, have an option box for not using songs that were played within a timeframe (or only play songs after a timeframe).
This is what "Skip most recently played" and "Favor Factor" do.
The only difference is, that the number you specify for "Skip most recently played" is in percent.
When you enter 30, that means, that for each rating, the most recently played 30% of the list are ignored.

"Favor factor" just defines some sort of emphasis.
When you enter 0, each song within the rating has the same probability.
When you enter 1, songs that have not been played for a long time get a slightly higher chance to get picked.
And when you enter 5, that means, that chances are very high, that the song that hasn't been played for the longest time, will be picked next.

pirateg00 wrote: Thanks again for your great script and keep up the work!!
I will do...


CIAo, uwe..
Last edited by uwuerfel on Sat Jul 19, 2008 1:31 pm, edited 1 time in total.
Autor of Radio-DJ

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Re: Script: Radio-DJ [MM3]

Post by uwuerfel » Fri Jul 18, 2008 12:27 pm

pirateg00 wrote:And another thought.... if the above were working, next to each percentage could be another option for specifying minimum number of days since the song was played for that rating. (this could replace the use of the autoplaylist with the restriction of not played in the last "bla" days). So, for example you could specify that higher rated songs could be played more frequently (higher percentage) as well as hearing the same songs more often (since you would like them more if they were higher rated)
I'm not sure, but maybe "Skip most recently played" and "Favor Factor" is just what you want?
Please have a look at it, and tell me.
pirateg00 wrote: Another thought I had was that perhaps there could be some sort of function or window that could be embedded into a toolbar or similar (like the search box for example) that you could specify on the go what criteria for the playlist you are pulling from. It would be similar to an autoplaylist or magic node perhaps, where you could specify criteria, but the benefit would be that you could change this easily instead of opening up the autoplaylist properties.
Yes, this is s.th. I also thought about in the last weeks.
I will probably create some sort of profiles.
Each profile has a name and has the option that you can use right now.
That way it will be possible to define different behaviour for different occasion.
I also thought about a toolbar element like the search box.
But within scripts I found no way to add this element to the toolbar.
I will have to find another way.

But this will take some time.
I'm quite busy at the moment and I hardly find some spare time to code :-(
pirateg00 wrote: anyway, I was just brainstorming and hope that made sense!
I'm very happy that you write down you ideas.
Please don't hesitate do it again.


CIAo, uwe..
Autor of Radio-DJ

pirateg00
Posts: 8
Joined: Wed Jul 16, 2008 10:14 pm

Re: Script: Radio-DJ [MM3]

Post by pirateg00 » Sat Jul 19, 2008 7:17 pm

HAHA OK yes I know im dumb!!

Anyway, I dont know what happened, when I wrote my origional it was getting late and I must have completely misread, Its all right there in front of my face! I didnt realize for some reason it was for every song, I should have kept scrolling down because after the first chart I thought the rest were other examples of the same thing, but they would have cleared it up right away!

Well anyway, lets see if any use can come out of my post now....
pirateg00 wrote:
for the stars that have plenty of songs to fill up its requirement, they would obviously be chosen randomly from the playlist but after there are no stars lacking


Hm, I'm not quite sure, what you mean.
When there is a weighting for a specific rating (e.g. 1-star) and there is no song with this rating, what should I do?
Do you mean I should use songs with other ratings?

As long as there is at least one song within a rating, this song will be used.
Since I use a shuffle mechanism, I use a separate list for each rating.
At startup this list is filled with all songs within that rating.
When a rating gets randomly chosen, the song is removed from the list
until there is no song in that list anymore.
Then this list for that rating, that just got empty, gets filled again.
It uses the songs from the (auto-) playlist.
If the autoplaylist filters out all songs that have been played in the last 5 days,
these songs will not be used.
(N.B. this is similar to the feature "Skip most recently played" within Radio-DJ.
I just didn't realize that this could also be done by auto playlists)
So if there is no song for that rating I would have the rest of the weighting apply to the rest of the songs that need to go in the list. For example, It seems that in the ratings that I have low in quantity (2 stars for example), I will get alot of repetitions of the song, even when I have the 'skip most recently played' feature on. I tested this and put it at 75%, and it is still pulling songs that are in that range if the requirement is not met. Does this make sense? This is what I was trying to get at when I said this:
3. If you do not, readjust the numbers from (1.) by filling up those stars that are lacking with all in the list (say there are only twenty 5 star tracks, we need 40, so put all 20 in the radioDJ list). then go back to 1 and recalculate the remaining. So since we now need 80 tracks still in the radioDJ list, that extra 20 tracks we are short from the 5 star tracks will be redistributed into the remaining stars. now this gets slightly tricky since the percentages will be not out of 100% but out of 60% because we do not consider 5 star anymore, so the new relative percentages would be 0%; 10%/60% = 16.67%; 15%/60% = 25%; 35%/60% = 58.33%; N/A% (for 1,2,3,4,5 stars respectively). OK so these new relavite percentages would be plugged back into whatever function used in 1 (which would obviously need some rounding scheme, like always round up to whole song and lowest rating gets the rest of the spots) but with 80 tracks instead of 100 . Then re-evaulate number 2 and repeat.
So instead of using a song that has played recently because it is 1 of few in that rating, skip that rating and readjust as if that rating did not exist. I hope this makes sense, from the little I have explored (I made sure the auto-playlist sorted) even though I have played several low rated songs (which I have few of in my library) they show up every time in the radiodj list. (I have skip most recently played set to 75% for test purposes).

I realize I could change the weightings, but I would like to set a scheme that works all the time for me and just change the playlist to get different sets of music. So I am proposing that the 'skip most recently played' be absolute.

Does this make sense??

That is all I can say for this moment, I gotta run, but I will respond about some of my later comments in a bit!

Thanks again!

Pirateg00

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Re: Script: Radio-DJ [MM3]

Post by uwuerfel » Sun Jul 20, 2008 7:37 am

Hi pirateg00,
pirateg00 wrote: So instead of using a song that has played recently because it is 1 of few in that rating, skip that rating and readjust as if that rating did not exist.

I realize I could change the weightings, but I would like to set a scheme that works all the time for me and just change the playlist to get different sets of music.

Does this make sense??
Yes, it makes sense.
I think I understand the idea you are suggesting.
You are right: what you want do do is not possible with the script right now.

For the moment, the only easy way I see is, that you adjust the weightings.

An other (more complicated) thing you could try is to the following:
The settings for Radio-DJ are saved in an .ini-file in the same directory where the script is.
Typically it is: <MediaMonkey-directory>\Scripts\Auto\RadioDJ.ini
What you could do is copy that .ini-file and rename it, e.g. RadioDJ_Ballads.ini.
Then you could create another setting for say top 10 hits and also copy these settings into a new ini-file.
That way you would get different settings for different occasions.
Whenever you want to switch the mode, all you have to do is to copy the correct .ini-file.
Then, for that .ini-file to be recognized by Radio-DJ, you have to restart Radio-DJ.
This could be done by
- deactivating and reactivation Auto-DJ
- closing and reopening MM
- open the options for Radio-DJ and close them using the OK-button.
Please note, that I have never tried this myself. So you will need to experiment a little bit.
I'm quite sure this would work, but I've not tested it.

I know this is not a perfect solution. But it is as close as it can get with the current script.

I will think about the problem of the repetition.

Right now I see one discrepancy in the idea you proposed:
That sort of repetition always occurs when there are only very few songs in a rating.
This is probably true for very low ratings (as 1-star) as well as for very high ratings (as 5-star).
I could imagine, that repetition is not wanted for low ratings but it *is* wanted for high ratings.
The problem is, that low and high are relative terms and probably every user of Radio-DJ would define it somehow different. So I must find a way how I can do this in the same way for all ratings...

If you (or anybody else) has some ideas about it, please post them.

Anyway, I will put it on my list and think about it.
Thanks for your idea and the explanations.


CIAo, uwe..
Autor of Radio-DJ

pirateg00
Posts: 8
Joined: Wed Jul 16, 2008 10:14 pm

Re: Script: Radio-DJ [MM3]

Post by pirateg00 » Sun Jul 20, 2008 11:58 am

Thanks for the response!

To respond to this:
pirateg00 wrote:
So instead of using a song that has played recently because it is 1 of few in that rating, skip that rating and readjust as if that rating did not exist.

I realize I could change the weightings, but I would like to set a scheme that works all the time for me and just change the playlist to get different sets of music.

Does this make sense??


Yes, it makes sense.
I think I understand the idea you are suggesting.
You are right: what you want do do is not possible with the script right now.

For the moment, the only easy way I see is, that you adjust the weightings.
Yea, its not a big deal right now, I have plenty of songs, just wanted to bring that to your attention, if it becomes an issue I will try the ini file solution you suggested (but again shouldnt be a problem). That said, if you can come up with another solution that is easier it would make the script that much better, but like I said its no big deal!

I think what I was describing in my origional post would be a potential solution:
1. calculate how many songs of each star rating would be needed for the radioDJ list from the specified list length and given percentages. In this case it would be 0, 10, 15, 35, and 40 tracks for the stars 1-5 respectively.

2. read all the tracks from the specified playlist that you are pulling from to determine you have enough tracks from each to fill the radioDJ list.

3. If you do not, readjust the numbers from (1.) by filling up those stars that are lacking with all in the list (say there are only twenty 5 star tracks, we need 40, so put all 20 in the radioDJ list). then go back to 1 and recalculate the remaining. So since we now need 80 tracks still in the radioDJ list, that extra 20 tracks we are short from the 5 star tracks will be redistributed into the remaining stars. now this gets slightly tricky since the percentages will be not out of 100% but out of 60% because we do not consider 5 star anymore, so the new relative percentages would be 0%; 10%/60% = 16.67%; 15%/60% = 25%; 35%/60% = 58.33%; N/A% (for 1,2,3,4,5 stars respectively). OK so these new relavite percentages would be plugged back into whatever function used in 1 (which would obviously need some rounding scheme, like always round up to whole song and lowest rating gets the rest of the spots) but with 80 tracks instead of 100 . Then re-evaulate number 2 and repeat.
However it may not be possible (or easy)? I dont know, but I do know it sounds like it would change the fundamental idea of the script from 'weightings' to an actual number of tracks(given that there are tracks for the needs). Just puttin my idea out there.

So what happens if there are no tracks for a given rating? I am asking because autoplaylists may be a solution at least for the immediate future, and I will explain below what may be a fix for both issues...

So with the repetition, the easiest thing to do right away would be to have a autoplaylist that limits the songs with your criteria as well as a last played status. This way, there would end up being no songs for a given rating and therefor could not play them (until they are past the minimum days of being last played.) This still presents the problem you mentioned here:
Right now I see one discrepancy in the idea you proposed:
That sort of repetition always occurs when there are only very few songs in a rating.
This is probably true for very low ratings (as 1-star) as well as for very high ratings (as 5-star).
I could imagine, that repetition is not wanted for low ratings but it *is* wanted for high ratings.
The problem is, that low and high are relative terms and probably every user of Radio-DJ would define it somehow different. So I must find a way how I can do this in the same way for all ratings...
So this is where my idea from earlier comes in...
And another thought.... if the above were working, next to each percentage could be another option for specifying minimum number of days since the song was played for that rating. (this could replace the use of the autoplaylist with the restriction of not played in the last "bla" days). So, for example you could specify that higher rated songs could be played more frequently (higher percentage) as well as hearing the same songs more often (since you would like them more if they were higher rated)
which would be the same thought as a set of autoplaylists, one for each rating that has whatever 'date last played' criteria. Then a single autoplaylist the combines all of those playlists. So you could say for 2 stars, dont include songs that have been played inthe last month, and for 5 stars dont include songs played in the last week, and you would have more repetition of the higher rated songs (or higher chance). Does this make sense?

I guess this is similar to favor factor, but I think (if my logic is correct) that this would favor repetition of better songs (if you set the playlists up the correct way).

I think that alot of my ideas are geared toward direct control vs probabilities, which i guess is just my preference, but I wanted to put out my ideas and see what you and everyone else thinks!

Thanks as always

Pirateg00

twinbee
Posts: 180
Joined: Tue May 13, 2008 2:36 am
Location: England
Contact:

Re: Script: Radio-DJ [MM3]

Post by twinbee » Tue Jul 22, 2008 2:23 am

If you (or anybody else) has some ideas about it, please post them.
Maybe another poster has mentioned this already, but how about if you give every track in the collection a weighting (rather than each rating a weighting). This way, they could all be set to say weight=1 each, and then you would naturally take the rating into account (using weight*rating or some other formula), and finally normalize the weights at the end to create a percentage. Therefore, if you only have a couple of 5 star tracks versus hundreds of 1 stars, the 1 star tracks are more likely to be played despite the high 5 star rating. Does that make sense?

This is what I did for MegaDJ, though maybe the method in Radio-DJ is quicker to compute?
MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Re: Script: Radio-DJ [MM3]

Post by uwuerfel » Sat Aug 02, 2008 4:16 am

Hi Bezukof,
bezukof wrote:The one issue I have is the slowness of it. Maybe it's a problem specific to my setup but sometimes loading the next song will hang the program for a few seconds. And if I populate all ten of the upcoming tracks in the now playing list(by playing the track at the bottom of the list) MM will freeze entirely for about 15 seconds.
I was not able reproduce this behavior on my machine.

Can you please give give me the following information.
Without it I will not be able to look in this any further.

- Amount of songs for each rating in you input playlist
- Total amount of songs in your input playlist
- Is it an auto-playlist or a static playlist?
- Your settings from the options page of Radio-DJ

CIAo, uwe..
Autor of Radio-DJ

pirateg00
Posts: 8
Joined: Wed Jul 16, 2008 10:14 pm

Re: Script: Radio-DJ [MM3]

Post by pirateg00 » Sat Aug 02, 2008 9:03 am

Hey Uwe,

I have experienced the same thing. It only happens when you have to repopulate the internal radiodj list, or when clicking the radiodj node. I think its just the machine repopulating, so when I first turn on MM, and I click on the last song in now playing with auto-DJ and radiodj enabled, it freezes for a number of seconds and then starts back up no problem.

-pirateg00

uwuerfel
Posts: 76
Joined: Tue Jan 08, 2008 3:29 pm
Location: Germany

Re: Script: Radio-DJ [MM3]

Post by uwuerfel » Mon Aug 11, 2008 4:37 am

Hi all,
uwuerfel wrote:
bezukof wrote: And finally, this might be impossible, but...
I was originally going to request a favor factor for X category, [...] Then I thought if this got made it would end up looking exactly like the auto-playlist edit page with one extra option. Soooo...

Would it be possible to just add a favor-factor field to the auto-playlist edit page?

[ Auto Playlist Criteria ]
-------------------------------------------------------------------------------------
[...Property.....][....Condition....][.....Value......][.......Favor Factor....]

Status..................is available..................................1
Rating......................>=................3 Stars................3
Rating.......................=................2 Stars.................0
Last Played............>(days ago)............1.....................4
Genre........................=.................polka.................10
etcetera.....


If this feature is not available to scripts then maybe this concept could at least be integrated into the Radio DJ interface.
I will think about it. But right now I have no idea how this could be done.
As promised, I spent some time on thinking about the suggestion of bezukof.
It looks to me that he wants more attributes where he can put a weighting on.
Those weightings can be used with any attribute whereas what I call favor factor
can only be used on attributes, that can be sorted in a useful way.
E.g. I can sort genres, but only alphabetical. This doesn't help to determine which
genre is favored over another...

Ok. Talking about weighting other attributes:
This can maybe be implemented. I say maybe, because it is possible, that the
performance of the initialization of the script would take even longer as it takes
now.

For now it would be interesting for me to know which attributes you would like
to see for additional weightings. Then I can try to experiment a little bit with it...

Note:
The less values an attribute has, the better it is useable for weightings.
And the values should be the same on every machine.
e.g. Artist would be a bad example for such an attribute.


CIAo, uwe..
Autor of Radio-DJ

Post Reply