{"id":28,"date":"2018-04-22T17:40:02","date_gmt":"2018-04-22T17:40:02","guid":{"rendered":"http:\/\/www.bullcrane.com\/angular\/?p=28"},"modified":"2018-04-28T13:47:07","modified_gmt":"2018-04-28T13:47:07","slug":"my-spotify-app","status":"publish","type":"post","link":"http:\/\/www.bullcrane.com\/angular\/2018\/04\/22\/my-spotify-app\/","title":{"rendered":"My Spotify app"},"content":{"rendered":"<p>I am creating a Spotify app using Angular.\u00a0 I aim to provide an alternative to Spotify&#8217;s shuffle play.<\/p>\n<h6>Spotify shuffle play<\/h6>\n<p>Spotify does not document for us the internals of their shuffle play mechanism, but it seems to construct a new random selection from your playlist whenever you return to the playlist after listening to something else.\u00a0 I call this resampling.\u00a0 The problem with resampling is that a song that you have recently heard might play again while there are other songs in your playlist that have not yet played once.<\/p>\n<h6>Use my shuffle instead<\/h6>\n<p>My solution is to provide an external utility that shuffles the playlist itself, rather than just making random selections from it for the play queue.\u00a0 Then the user can turn off Spotify&#8217;s shuffle and listen to the randomized playlist in its new order.\u00a0 The effect is much like Spotify&#8217;s shuffle play but each song plays just once.<\/p>\n<p>Until you start from the top again.<\/p>\n<p>Or give up and simply go back to using Spotify&#8217;s shuffle play.<\/p>\n<p>Because you got lost.<\/p>\n<p>When you return to a big playlist it&#8217;s practically impossible find where you left off, assuming you even remember.<\/p>\n<h6>Use my shuffle again<\/h6>\n<p>So there is a bit more to my solution.\u00a0 My shuffle knows what you have listened to and puts these songs at the end.<\/p>\n<p>Returning to your big playlist?\u00a0 Use my utility to shuffle it again.\u00a0 Then in Spotify simply start listening from the top. The songs will be in random order.\u00a0 You will not hear recently played songs.\u00a0 You don&#8217;t have to find where you left off.<\/p>\n<h6>Still under development<\/h6>\n<p>My shuffle utility is my project for learning Angular.\u00a0 So I am taking my time with it.\u00a0 But it&#8217;s pretty far along now, so I expect to make a version of it available soon.\u00a0 I will continue to talk about it &#8211; a few more features it has, and also some of the challenges behind the scenes both with Angular and with the Spotify API &#8211; in future blog posts.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am creating a Spotify app using Angular.\u00a0 I aim to provide an alternative to Spotify&#8217;s shuffle play. Spotify shuffle play Spotify does not document for us the internals of their shuffle play mechanism, but it seems to construct a new random selection from your playlist whenever you return to the playlist after listening to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.bullcrane.com\/angular\/2018\/04\/22\/my-spotify-app\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;My Spotify app&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/posts\/28"}],"collection":[{"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":6,"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":34,"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/posts\/28\/revisions\/34"}],"wp:attachment":[{"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bullcrane.com\/angular\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}