Dynamic playlists, vbscript through echonest |
This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.
See also: Hydrogenaudio Terms of Service.
![]() ![]() |
Dynamic playlists, vbscript through echonest |
Sep 1 2012, 19:49
Post
#1
|
|
![]() Group: Members Posts: 607 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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Jan 29 2013, 12:35
Post
#2
|
|
![]() Group: Members Posts: 607 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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Feb 8 2013, 19:15
Post
#3
|
|
![]() Group: Members Posts: 607 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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Mar 11 2013, 23:22
Post
#4
|
|
|
Group: Members Posts: 7 Joined: 23-February 13 Member No.: 106833 |
Works great, thank's. how to enable com server?
|
|
|
|
Mar 11 2013, 23:33
Post
#5
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
urgh... do you really need that automation
you can install com server from here: http://www.hydrogenaudio.org/forums/index....showtopic=39946 -------------------- Scripts (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Mar 12 2013, 02:10
Post
#6
|
|
|
Group: Members Posts: 7 Joined: 23-February 13 Member No.: 106833 |
Thanks
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 04:34 |