Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildChain ¶
BuildChain determines what songs are played after others and creates a chain to then randomly select from. Takes an array of songs and returns a map.
func GenerateSongList ¶
func GenerateSongList(length int, maxBySameArtist int, startingSong lastFm.Song, chain map[string]Suffixes) ([]lastFm.Song, error)
GenerateSongList takes a seed song, a chain to select from, a length, and the maximum songs by one artist in a row. It returns a list of songs and an optional error.
Types ¶
type CDF ¶
type CDF [][2]int
CDF is a structure for a continuous distribution function, generated from the chain.
Click to show internal directories.
Click to hide internal directories.