acm-uiuc / beats

Beats by ACM
11 stars 19 forks source link

Improved playback shuffle #59

Closed logiconcepts819 closed 7 years ago

logiconcepts819 commented 9 years ago

I present to you a modified (psuedo-)random sampler to help prevent Beats from playing the same song back-to-back. In the beats.cfg.sample file, you will see two new settings: 'dont_repeat_for' and 'max_dont_repeat_for'. The setting value for 'max_dont_repeat_for' is a non-negative integer representing the maximum number of most recently played songs to prevent Beats from playing back. The setting value for 'dont_repeat_for' is a real number greater than or equal to 0 and less than 1 representing a fraction (or percentage) of the total number of songs in the database, which is the number of songs to prevent Beats from playing back, provided that number doesn't exceed 'max_dont_repeat_for'. Both settings are optional, so Beats will run even with one or both of these settings omitted from the config file. If 'max_dont_repeat_for' is omitted, then there is no restriction on 'dont_repeat_for'. The default setting value for 'dont_repeat_for' is 0, so if 'dont_repeat_for' is omitted, then songs are (psuedo-)randomly selected like how they are now.