IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Dynamic playlists, vbscript through echonest
romor
post Sep 1 2012, 19:49
Post #1





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



view download

This script allows creating dynamic playlist based on selected track using echonest API: http://developer.echonest.com/docs/v4/playlist.html#static
It can be used by simply selecting some favorite track then running the script through foo_run:

CODE
wscript foo_echosong.vbs %MUSICBRAINZ_TRACKID%
  or
wscript foo_echosong.vbs "%artist%" "%title%"

or interactively by providing additional parameter argument - "interactive", in which case primitive inputbox control will allow more detailed tunning on playlist creation request:


Initially I thought to use comserver component, and do this task without making playlist file, but I must relieve my impression of this funny component. Despite uncommon installation, and playback controlling interfaces, it allows moving playlist around, renaming, even creating new ones, but it can't add items to newly created playlist!? Go figure. Then if you are persistent you can write playlist to a file and try to use playlist.load() method - exposed but disfunctional! Let it rot... or prove me wrong

So what to do with response data, then make XSPF and manually dig for it through foo_softplaylist component. And that's how it works: playlist echo.xspf is created in script's folder, which then through foo_softplaylist can be loaded by using "menu > library > load xspf playlist...". Alas

echonest api allows creating different types of playlists, and I selected what seemed flexible to me. Selected method can also return response with xspf playlist with low quality http preview tracks from some of it's buckets, like 7digital i.e., but I guess anyone can do that in browser already


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
romor
post Jan 29 2013, 12:35
Post #2





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



I extended above script, with a fancier UI. It's basically same script wrapped in html as application, and with a bit of logic for UI interaction and other small changes.



It can be called from foo_run, like [songecho.hta "%artist%" "%title%"] and after adjusting preferences or accepting defaults, it will create new playlist and load it in foobar automatically if COM server component is detected, otherwise XSPF playlist will be created, that can be loaded by foo_softplaylist component (Library > Load XSPF playlist...) as already mentioned

Because it tries to match tracks from remote playlist to user library, option is added to review XML response, which is rendered by default MS XML stylesheet:



Different controls are activated on different playlist types. When creating playlist the first step should be selection of playlist type, which defaults to "song radio" playlist. Also if seeded track and/or artist aren't indexed by echonest, some playlist types will be disabled as options.
I added tooltips for reference to most of text labels, but also echonest logo can be clicked for redirection to echonest documentation, describing all these parameters.

Source: link
Download: link


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
romor
post Feb 8 2013, 19:15
Post #3





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



Further tweaks...
This is new version, which instead optional raw XML response, offers optional embedded XSPF player with 1min preview from all tracks (tracks provided by 7 digital)
So exploring is not limited just to user library



Source: link
Download: link


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
neons
post Mar 11 2013, 23:22
Post #4





Group: Members
Posts: 11
Joined: 23-February 13
Member No.: 106833



Works great, thank's. how to enable com server?
Go to the top of the page
+Quote Post
romor
post Mar 11 2013, 23:33
Post #5





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



urgh... do you really need that automation biggrin.gif

you can install com server from here: http://www.hydrogenaudio.org/forums/index....showtopic=39946


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
neons
post Mar 12 2013, 02:10
Post #6





Group: Members
Posts: 11
Joined: 23-February 13
Member No.: 106833



Thanks smile.gif
Go to the top of the page
+Quote Post
muzack
post Dec 18 2013, 20:16
Post #7





Group: Members
Posts: 113
Joined: 14-December 08
Member No.: 64497



Hi, I just tested your app.
I really like the idea. Unfortunately the chances that the generated playlist match your own library are pretty low.
So the preview feature makes sense and gives an idea how echonest is working. That's pretty nice.

Over the years I used to run genpuid/MusicDNS to analyze my files and build playlists from my lib. It was kinda similar, but unfortunately this technology is abandoned and their server doesn't respond anymore (right now).
I wish there was a fingerprint/sound characteristic playlist generator for foobar2000 but I guess with streaming services like spotify & co this is going to be obsolete.

I use Random Pool for foobar to generate an ongoing playlist after some criteria. It's nice to rediscover stuff from my lib... but I miss the selection of sound characteristics.

These were just some thoughts, sorry for the blubb ;-)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th November 2014 - 23:05