A music player built on loops and samples extracted on the fly. Supports HTML5-playable audio and YouTube videos.
Copy library.example.json
to library.json
, and populate it with your own
music. For audio files, create the /audio
directory and place your files at
whatever depth in this directory. For YouTube videos, enter only the video ID
(the bit after "http://www.youtube.com/watch?v=" in the video URL).
Tracks in the library have the following attributes:
/audio
directory, and values which don't have a file extension
are assumed to be a YouTube video ID.Rules determine whether a track will be allowed to play at a given time. Tracks without rules are treated as if they always have an active regular rule.
"rules":"<priority (optional)>{<start time>-<end time>} ..."
e.g. "rules":"{08:00-05:00} +{18:00-18:30}"
Each rule string can contain multiple rule definitions. Time periods are
<start time>
inclusive, <end time>
exclusive. Rules which span midnight
will behave as expected (e.g. {23:00-01:00}
will be in the playlist for two
hours).
+
Exclusive: if any tracks have an active exclusive rule, any
tracks with active regular rules will be deactivated.-
Negative: behaves just as a regular rule defining the opposite
hour span.{09:00-18:00}
and -{18:00-09:00}
are equivalient. Negative rules trump regular rules, and exclusive rules trump both others.
This project was inspired by the realtime Animal Crossing playlist at http://tane.us/ac/, which I found by its mention in an interview with animator Mariel Cartwright.