⬆️ ⬇️

About omnipotent random

image

Smart shuffle for players





In the topic I would like to share my thoughts about what should be "random play" in the players (especially for portable players like iPod)

I myself own the iPod touch and constantly use it in my car, connecting it via AUX to the radio.

Apple has invented some sort of “smart playlist” - the so-called genius, but it somehow uses the Internet and the opinions of other iTunes users.



I would like to hear and listen to exactly what I want to hear. Under the cut is the essence of the idea.



So take for a start the simplest "shuflay"

(after the end of the track, the player issues a random number from one to the length of the playlist and switches to the track with this random number).

Used in most modern players.

')

image



image



Of course, you can save the last few tracks in memory and not let them choose randomly (as winamp does with the appropriate settings). But the difference is only in time, through which not the favorite song will again fit.



The second option:

pre-shuffle the list and play by turns.

In this way, I used it in Winamp until the pseudo-randomness control lever appeared there :)

image





image





3. Rating system itunes and dj-playlist in it



Allows you to put down ratings for the works, and the DJ automatically makes a playlist based on these ratings. And it only works in itunes, ipods do not have this chip.



image





image





So far, nothing more clever, I have not met.



The basics



So, in the topic, I wanted to share my ideas about what should be “shuflay” on the players (both kompovyh and multimedia)



The essence of the idea:

Enter a few parameters for each song, on the basis of which “shuflay” and will choose when which song to cut.

Develop a system of "interactive" rating, where you do not need to put as many asterisks product. Yes, and vaasche nothing to exhibit.

Use the concept of “annoying songs” - so you would like your favorite song (with five stars) to play every hour, but not once? After all, get bored!



Interactive rating


So how can you rate a song without asking the user about the number of stars?

Having observed myself and some acquaintances, I identified several actions that everyone performs when the work being played is like:



I do not like:



Naturally, each of these parameters should to some extent affect the overall rating. For example, switching a track will significantly lower the rating, and lowering the volume quite a bit.



The rating will be set by number: from 0 to 100, by default all tracks will have a rating of 50 (neutral).

When manually switching the track in the first 30 seconds, the rating will drop by 10, more than 30 seconds - by 5.

All figures are approximate, you will need to be customized after implementation.

image

Listening to the song in full does not mean that we liked it somehow, because we could not even listen to it at the moment, one additional interface button that can be accessed even on a locked player (for example, on iPod touch, double pressing the home button will help three playback control buttons).

Just instead of the “previous track” button, it would be convenient to place this new button, which increases the rating once, and it can look like an up arrow or an asterisk.

Pressing this button one-time adds 10 points to the rating. For one audition more than one time you can not raise the rating, a second press should lower the rating back (in doubt)



Molestation


Any song can not be so beloved to listen to it 10 times in an hour. This must be taken into account.

To account for annoyance, you must enter another variable, which will increase each time the song is turned on and decrease with time.

So, we introduce a variable from 0 to ... even though, I think a byte is enough (255).

When the song is completely played, we will add 2 there, with partial (we turned off the player, switched the track, pressed “stop”), but more than 20% of the track was lost - we add 1.

Every single day all tracks are diminished by one unit.



Calculations


The most important thing is to calculate which track will be next in playback. We can not forget even the tracks with a lower rating: suddenly our tastes have changed, they have the right to increase their rating.



First you need to calculate the resulting figure, taking into account the rating and annoyance. More precisely, it will be “the effect of annoyance on the rating,” but since annoyance changes with time, this value will have to be calculated constantly.



Get



Result = Rating - annoying * annoying coefficient



Coefficient each user must choose himself individually (in the player settings). For example, a coefficient of 50 will not allow you to listen to the same track on the same day, because the very first audition will immediately drop the rating to zero even on top tracks. In my opinion, the optimal ratio will be about 5 ...



Sample


Now we’re actually moving on to the most important thing - choosing the next track to play.

The simplest option would be to go on the top, that is, we are looking for works with the maximum resulting rating, we reproduce them, the resulting rating automatically drops for them (as they “bother”), etc.

But in this way we will get that having stuck headphones in the morning and sleeping on the way to work, we will listen to all the top songs and in the afternoon we will listen to second-rate :) I think that this is not rational.



It is necessary to separate the top songs (10 percent of the total heap, having the maximum rating) from the rest. Sampling is done from the general heap, and every fifth track is taken from the top (optional).

Then we get a uniform load of your favorite songs throughout the day.



As patent


_______________________________________

Thanks to those who mastered this topic, please share your thoughts on this topic.



I understand that we cannot produce a player with such a chip. But programmatically sew in the usual kompovye players I think it is not so difficult.

I know that amarok has similar rating systems, but it is difficult to use and it does not take into account the annoyance.

I know that Apple is not fools, and if they put the previous track button, then it is necessary. But I own the player for about 2 years and have never clicked on it.

Source: https://habr.com/ru/post/60019/



All Articles