All Projects → XunMengWinter → Randompicker

XunMengWinter / Randompicker

Licence: apache-2.0
一个动态权重的随机算法

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Randompicker

Nakplaybackindicatorview
A UIView that mimics the music playback indicator in the Music.app on iOS 7+
Stars: ✭ 394 (+1541.67%)
Mutual labels:  music, player
Tauonmusicbox
The Linux desktop music player from the future! 🌆
Stars: ✭ 494 (+1958.33%)
Mutual labels:  music, player
Aigames
use AI to play some games.
Stars: ✭ 422 (+1658.33%)
Mutual labels:  algorithm, game
Music Player
From UI Proposal to Code 🎶▶️
Stars: ✭ 3,459 (+14312.5%)
Mutual labels:  music, player
Opsu
opsu! ~ an open-source osu! client
Stars: ✭ 617 (+2470.83%)
Mutual labels:  game, music
Playpauseview
Let the play and pause button transition gracefully
Stars: ✭ 383 (+1495.83%)
Mutual labels:  music, player
Romplayer
AudioKit Sample Player (ROM Player) - EXS24, Sound Font, Wave Player
Stars: ✭ 445 (+1754.17%)
Mutual labels:  music, player
Roguesharp
A .NET Standard class library providing map generation, path-finding, and field-of-view utilities frequently used in roguelikes or 2D tile based games. Inspired by libtcod
Stars: ✭ 316 (+1216.67%)
Mutual labels:  game, random
Webaudiofont
Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
Stars: ✭ 600 (+2400%)
Mutual labels:  music, player
Monstercat Visualizer
A real time audio visualizer for Rainmeter similar to the ones used in the Monstercat videos.
Stars: ✭ 571 (+2279.17%)
Mutual labels:  music, player
React Music Player
🎵 Maybe the best beautiful HTML5 responsive player component for react :)
Stars: ✭ 321 (+1237.5%)
Mutual labels:  music, player
Vue 163 Music
【停止维护】网易云音乐web版,支持PC端常用功能,localStorage保存播放列表
Stars: ✭ 788 (+3183.33%)
Mutual labels:  music, player
Vinylmusicplayer
A material designed music player for Android
Stars: ✭ 323 (+1245.83%)
Mutual labels:  music, player
Khan
khan will drive all your enemies to the sea (and also take care of your game's clans)!
Stars: ✭ 22 (-8.33%)
Mutual labels:  game, player
Upnext
Chrome Extension for streaming music from SoundCloud & YouTube
Stars: ✭ 320 (+1233.33%)
Mutual labels:  music, player
Skplayer
🎵 A simple & beautiful HTML5 music player
Stars: ✭ 437 (+1720.83%)
Mutual labels:  music, player
Openwhyd
💎 Like Pinterest, for Music
Stars: ✭ 287 (+1095.83%)
Mutual labels:  music, player
Simple Music Player
Simple Music Player - SimpleMP - Keeps it simple and plays your music
Stars: ✭ 298 (+1141.67%)
Mutual labels:  music, player
Hexo Tag Aplayer
Embed aplayer in Hexo posts/pages
Stars: ✭ 552 (+2200%)
Mutual labels:  music, player
Aplayer
🍭 Wow, such a beautiful HTML5 music player
Stars: ✭ 5,887 (+24429.17%)
Mutual labels:  music, player

RandomPicker

简书中文

Idea:💡

Pseudo-random. There are some songs in your play list, each song's weight is 1 in the first. Each time you click the next button, each song's weight increases by 1, and the selected song's weight returns to 0. The song's weight is positively correlated with the chance of being picked.

- Love Story 东风破 Refrain Tassel
sequence weight weight weight weight picked
1 1 1 1 1 东风破
2 2 0 2 2 Love Story
3 0 1 3 3 Refrain
4 1 2 0 4 Tassel
5 2 3 1 0 Love Story
6 0 4 2 1 Tassel
7 1 5 3 0 东风破
8 2 0 4 1 Love Story
9 0 1 5 2 Tassel
10 1 2 6 0 ...
...

Demo

RandomPicker

How to use

Quick start:

RandomPicker randomPicker = new RandomPicker(12);
int nextPos = randomPicker.next();

More function:

randomPicker.setMultiplyNumber(3);
randomPicker.setAddNumber(2);
randomPicker.setNextPick(5);
randomPicker.add();
randomPicker.changeOriginWeight(0,3);
randomPicker.getHistoryList();

More functions: download this repo and take a look at the code.

Compile

The latest version

add this to the project level build.gradle file

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

add the dependency to the app level build.gradle file

// replace {x.y.z} with the latest version.
compile 'com.github.XunMengWinter:RandomPicker:{x.y.z}'

p.s. If you have any suggestions for improvement, please discuss on issues or pull requests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].