INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Smarffle - Looking for beta testers  (Read 2696 times)

Qythyx

  • Galactic Citizen
  • ****
  • Posts: 390
Smarffle - Looking for beta testers
« on: November 02, 2005, 05:54:21 am »

I'm finally ready for beta testers for my MC plug-in, Smarffle. Below is a description of it, but first, a warning: It is written in .NET and requires the .NET Framework version 2.0. This has just been released by Microsoft and is not yet publicly available for download. It should be soon, but until it is you probably need to be a Microsoft developer in order to have it.

Now, the description.

History
I wanted a way to play all of my music continuously without messign with playlists. Basically, I wanted a shuffle mode that I could tune to play songs I like more often than songs I like less. In addition I wanted a way to play songs I haven't heard in a long time sooner than ones I've heard recently. I couldn't find a good way to do this with MC's native functions.

So, I created Smarffle (Smart Shuffle) - yes, I think it is a silly name too

Summary
Simply put, Smarffle allows you to create a mathematical formula that is used to order your tracks and stores the value in a custom field called Weight. The formula can use any of the numerical fields of a track like Last Playen, Number of Plays, Rating, etc. Additionally, Smarffle can reapply the formula to the now playing track when it finishes playing and reorder it according to the newly calculated value.

Screen Shot


Walkthrough
  • Ignore the "Unload Control" button, that's for faster testing during development
  • Formula - this is the key, this is where you enter the mathematical formula you want to use, the one I have is described below
  • Fields - this is just a helpful list of all of the numerical fields available and their value for the selected track in the Tracks area
  • Functions - these are mathematical functions you can use in your formula, they're basically self explanatory, but some day I'll create a help file that describes them
  • Actions - these are the things you can do: Apply Sorting uses the current formula and recalculates the value for all tracks, Apply To Playing Now says that when the currently playing track is done its formula is recalculated and it is reordered in the Playing Now playlist, Refresh All reloads all of the tracks in the playlist selected on the left, this can take a while
  • Playlists - this is a mirror image of the playlists you have defined, selecting one allows you to apply the formula to the tracks in a particular play list; since the formula's value is stored in a custom field, "Weight", if you apply different formulas to different playlists but the same track is in both lists, then the last applied value will be stored in Weight
  • Tracks - this is all of the tracks in the currently selected playlig
  • That box above the Playlists - for those of you with sharp eyes, this says, "Start From the Dark moved from 0 to 4862"; this is just an information message that says that when the track "Start From the Dark" was done playing as the playing now track, its newly calculated value sorted it down to track number 4862

My Formula
Since it is a bit hard to read, here's my formula:
( EQUALTO( Last_Played; 0; DATE( ) - 60 * 60 * 24 * 110 ) / 60 / 60 / 24 / 60 - EQUALTO( Rating; 0; 3 ) / 2 + Number_Plays / 20 + RANDOM( 1; Last_Played + File_Size ) / 60 - 110 ) * 1000

and here is what it means

  • 1. First, the Last Played value is the number of seconds since January 1, 1970 since the track was played, i.e., a big honking number. If the Last Played date is 0 (never played), then use the value of today's date (in seconds) minus 110 days (in seconds), if it isn't 0 then use the Last Played date. Why'd I use 110 days? Because when I played around with the formula is seemed to work. I tried 90 days, but it was too short.
  • 2. Divide the Last Played value by 60 days. Why 60 days? Again, trial and error. But this converts the number into the number of 2-month periods since January 1, 1970 instead of the number of seconds since then. I do this to make the numbers smaller and easier to visually compare. It is not 100% necessary.
  • 3. From this value, subtract the Rating (or 3 if it is 0) divided by 2. The number 2 basically weights how important the Rating is. If you want a 5 rated track to be much more highly weighted than a 4 rated track, the you would decrease this number. If you want the difference between them to be less then you can increase this number.
  • 4. From this value, add the Number of Plays divided by 20. This part of the formula says that I want to, slightly, play less played songs more than often played songs. This helps play newly added tracks more often. Changing the 20 value will weight how important this is.
  • 5. From this value, add a random fraction of 2-month periods (remember, that's the unit we're now working in) divided by 60, i.e., 2 months / 60 = 1 day. So, this adds a random number of days (between 0 and 60) to the value. Note the "seed" value, this means that the random number will always be the same for the same track until it is playe (and its Last Played value changes).
  • 6. From this value, subtract 110. This is another magic number that I used to reduce the number to something easier for me to compare with others. This is not needed.
  • 7. Finally, multiply the total so far by 1000. Another magic number that just moves the decimal point in the final result.

So, what does it all mean?
  • EQUALTO( Last_Played; 0; DATE( ) - 60 * 60 * 24 * 110 ) / 60 / 60 / 24 / 60 - how long ago was it played, the lower the number (the longer ago) the lower the Weight, hence I will play it sooner
  • - EQUALTO( Rating; 0; 3 ) / 2 - subtract a number, the higher the rating the more I subtract, hence the sooner I play it
  • + Number_Plays / 20 - add a number, the more I've played it the more I add, hence the later I play it
  • + RANDOM(1; Last_Played + File_Size ) / 60 - add a random number, this has 1 purpose, mix up things so that I don't always listen to tracks in the same order

Summary
The key is that you can create your own formulas according to what's important to you. I realize the math is a bit hard to follow, but if you play around with it a bit begins to make sence. Anyway, if you're interested in testing, and you ready to give me lots of feedback, and you have access to the .NET Framework version 2.0. Let me know.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smarffle - Looking for beta testers
« Reply #1 on: November 02, 2005, 06:23:31 am »

History
I wanted a way to play all of my music continuously without messign with playlists. Basically, I wanted a shuffle mode that I could tune to play songs I like more often than songs I like less. In addition I wanted a way to play songs I haven't heard in a long time sooner than ones I've heard recently. I couldn't find a good way to do this with MC's native functions.
2 smartlists
A smartlist that gets tracks > 6 months old and one that gets tracks of ratings >=3

The ~mix modifier to pick various percentages of tracks out of the 2 smartlists.

Throw in random sorting for effect. Just one smartlist that calls a cpl others, each time you refresh it, you get a new selection.

How is this less capable that what you have just created ?

OK we got more math with your plugin, but i'm at a loss as to what use i can make with that.

Not knocking your work here, you must have put a good deal of thought into it.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Smarffle - Looking for beta testers
« Reply #2 on: November 02, 2005, 09:16:23 am »

Interesting Plug-In I Am Sure It Will Fill A Need

Thanks For Working On It
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Galley

  • Galactic Citizen
  • ****
  • Posts: 323
  • Insert witty text here
Logged

Qythyx

  • Galactic Citizen
  • ****
  • Posts: 390
Re: Smarffle - Looking for beta testers
« Reply #4 on: November 03, 2005, 03:58:03 am »

hit_ny,

You're right, you can accomplish close to what my formula does, but I'd say there are a few differences. First, your method only works if  playing through your entire library takes more than 6 months. I listen to my library about 6-8 hours per day and it seems to take about 4 or 5 months. Obviously I could tune the 6-months time, but as my library changes over time I'd have to retune it.

The other thing is that the formula I use maintains the sort order, except when a track is played. Why is this important? Well, for me it is important because I also listen to tracks on my iPod, and I prefer to not listen to tracks in the same way there that I do on my PC. So, what I do is sync (after running Smarffle on my library) tracks 500-1000 to my iPod. This means that at about the same time I've listened to 1-500 on my PC, I've worked through about 500-1000 on my iPod. I then clear my iPod and sync the new set of 500-1000 tracks. This wouldn't be possible if the order changed everything I refreshed the list.

I am kind of hoping that MC adds a similar feature natively, though. There are a few limitations in the plug-in APIs that my my plug-in slow in some cases.


BTW, Galley, thanks for the link. I knew it would be out soon, didn't realize it was already.
Logged

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: Smarffle - Looking for beta testers
« Reply #5 on: November 05, 2005, 07:52:52 pm »

Qythyx--
IMO, you're really on to something here.  But it still seems to be for/by someone who loves expressions.  I love music, and expressions give me the shakes.  Can you put a GUI on your expression variables?  Sliders, maybe 1-10, for the weight to give to your major variables?
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smarffle - Looking for beta testers
« Reply #6 on: November 06, 2005, 02:24:45 am »

The other thing is that the formula I use maintains the sort order, except when a track is played. Why is this important? Well, for me it is important because I also listen to tracks on my iPod, and I prefer to not listen to tracks in the same way there that I do on my PC. So, what I do is sync (after running Smarffle on my library) tracks 500-1000 to my iPod. This means that at about the same time I've listened to 1-500 on my PC, I've worked through about 500-1000 on my iPod. I then clear my iPod and sync the new set of 500-1000 tracks. This wouldn't be possible if the order changed everything I refreshed the list.
Trying to understand what you are saying here...

Does the iPod update the last played date on the track ? If not how do you ensure you dont hear a track in MC that you already heard on the iPod. You don't, i'm assuming thats why you have 1-500 only for MC and what falls beyond goes to the iPod.

In which case im trying to understand why the sort order is important. You want to make sure you get tracks onto the iPod that you have not heard yet right ?

Thing is how do you make sure you don't get tracks from MC that you already heard on the iPod ?
Logged

Qythyx

  • Galactic Citizen
  • ****
  • Posts: 390
Re: Smarffle - Looking for beta testers
« Reply #7 on: November 09, 2005, 07:15:18 pm »

jgreen,

I'll eventually look into making a more friendly US for the expressions, I don't expect that to be in there soon, though. On the other hand, if I create a few expressions you could just try them and then woulnd't have to come up with them yourself.



hit_ny,

The key is that when you sync with the iPod you get it's updated Playcount and LastPlayed data. When this goes into MC you can then recalculate the values for the tracks and those ones that you played in the iPod would be sorted down so you won't get the repeats. If the portable player you're using does not support syncing this data then you're right, you won't be able to know what you played.

I'm actually looked at a semi-solution for that. I'm thinking that it might be nice to select a set of tracks in your portable player and explicitly tell MC to increment the playcount for each of them and then delete them off of the portable at the same time. This wouldn't be perfect and you'd have to select the tracks on the portable by hand, but I can't think of any other solution.

Logged
Pages: [1]   Go Up