Skip to content

Instantly share code, notes, and snippets.

@plamere
Last active April 23, 2019 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plamere/82438a72138cf31884f4a5061908435b to your computer and use it in GitHub Desktop.
Save plamere/82438a72138cf31884f4a5061908435b to your computer and use it in GitHub Desktop.
Example of a YAML for a simple chill mix
your_favorite_chill_tracks:
title: your favorite chill tracks
description: just your most chill tracks
main: sequencer
config:
max_tracks: 30
components:
my_liked_tracks:
type: tailor_affinities
config:
user: ${user}
entity: track
dataset: six_months_affinity_incognito
sort_by: affinity
annotated_liked_tracks:
type: acoustic_annotator
source: my_liked_tracks
config:
attributes_to_add:
- energy
- valence
chill_filter:
type: range_filter
source: annotated_liked_tracks
config:
attribute: energy
max_value: .3
order_by_increasing_chill:
type: sort
source: chill_filter
config:
attribute: energy
reverse: true
your_favorite_coffee_house:
type: playlist
config:
uri: spotify:playlist:37i9dQZF1DX6ziVCJnEm59
chilled_tracks_with_fallback:
type: source_concatenator
sources:
- order_by_increasing_chill
- your_favorite_coffee_house
sequencer:
type: simple_greedy_sequencer
source: chilled_tracks_with_fallback
config:
max_tracks: $(max_tracks)
max_tracks_per_artist: 4
max_tracks_per_album: 2
minimum_artist_separation: 6
minimum_album_separation: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment