Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Primitive SoundCloud integration (Read 15377 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Primitive SoundCloud integration

The script: view download

Can be used with foo_run or foo_uie_biography or both. Usage is simple:

1. foo_run action command:
Code: [Select]
wscript soundcloud.vbs


2. foo_uie_biography run external script command:
Code: [Select]
cscript soundcloud.vbs "%path%"
[a href="http://imgur.com/bfQuE.png" target="_blank"][/url]

As other scripts parsing XML, it's fast and I guess it would be most useful to electronic music fans
Streams are seekable

Cheers

Primitive SoundCloud integration

Reply #1
Thanks going to give this a try now

Primitive SoundCloud integration

Reply #2
Awesome work, using it now, will be interesting to see if you develop it further, thanks for sharing

Primitive SoundCloud integration

Reply #3
Added some new options: https://gist.github.com/4d06d0994c1b8ae61ef5

1. it's possible to paste soundcloud url in input box and script will retrieve the tracks from it:


2. user can search for specific soundcloud user or group (as noted in simple dialog) and receive the tracks accordingly

3. I added option for downloading waveform image (disabled by default). Idea was to embed the image in waveform seekbar, as background, but I couldn't test it as it seems my graphic card doesn't support that feature, perhaps someone can play with it. To enable this feature, just set the variable on 1st line to True.

Primitive SoundCloud integration

Reply #4
Bugreport: The newest version does not always work when giving it a direct URL (https://soundcloud.com/falscherhase for instance). The old script works however...

Primitive SoundCloud integration

Reply #5
Thanks for reporting, issue is corrected

Problem appears with direct links to user or group profile resource, in which case soundcloud resolver doesn't return playlist. Also in this case you could have used "user=falscherhase" as a workaround, but of course issue is valid and user is to be expecting that soundcloud link with tracks should work

BTW, previous script can't do this

Primitive SoundCloud integration

Reply #6
Problem fixed indeed. The search function is nice btw. Thanks for the handy script.

I can't seem to get the waveform working however, there's seem to be no waveform.png being saved (not anywhere was able to find it anyway).

Primitive SoundCloud integration

Reply #7
If `waveform` variable (1st line in the script) is set to True, then waveform.png should be saved in foobar's default folder, which should be %ProgramFiles%\foobar2000. Also, you would have to add the script in "Biography view" external scripts - that one triggers it on track change.
I just added now `folder` variable on 2nd line, where you can set custom path for saved waveform (path should be valid existing folder).

So, if you know how to set Waveform seekbar shader script, that would be great test.
I hope seekbar wouldn't mind that image is delivered couple of seconds after the track starts.

Primitive SoundCloud integration

Reply #8
Usage is simple:

Thanks for your work!
Many users will install foo_run just for your script, so:
Why not drop a line about where to save the script? (and to be sure, where to paste the call)
Is it %APPDATA%\foobar2000\user-components\foo_run ?
About waveform png: Never save to %PROGRAM FILES%, rather use %APPDATA%\foobar2000\

Primitive SoundCloud integration

Reply #9
Why not drop a line about where to save the script? (and to be sure, where to paste the call)
Is it %APPDATA%\foobar2000\user-components\foo_run ?

If you save it in foobar folder, you can call it just by name (like in screenshot example), otherwise you'll have to call it with full path

Quote
About waveform png: Never save to %PROGRAM FILES%, rather use %APPDATA%\foobar2000\

Waveform download is disabled by default. If you want to enable it, you'll have to edit the script, and set the folder that suites you most

Primitive SoundCloud integration

Reply #10
^the trouble with using program files is that UAC will block write access for most people. it's not good advice telling people to disable it. (not that you did - i'm just saying)

i think that's why blausand was suggesting to use %appdata% instead. obviously that does add more complexity.

Primitive SoundCloud integration

Reply #11
How exactly is this meant to work?

Primitive SoundCloud integration

Reply #12
I added some more features:



Please report valid issues, in which case I may consider rewriting the script, or making it HTA with more friendly interface if there is base for it

Primitive SoundCloud integration

Reply #13
Excellent work dude, using it now, i look forward to more features, please keep on working on it

Primitive SoundCloud integration

Reply #14
Hey I like this script, thanks!

Can you tell me how you go about generating the (what I assume is OAuth?) token for the "toc" variable? 

I would like to just add /stream but it appears that when I do so that it's logged in as your account, so the music isn't coming from those I'm following.  I assume that if I can generate the "toc" variable using my account credentials then it would be streaming from my friends instead.

Much appreciated!

Primitive SoundCloud integration

Reply #15
Kati, "toc" variable although suggests OAuth token is in fact just "Client Secret code"

Here is script that you can easily use with your own keys: https://gist.github.com/8d2854646688dbd13036

You can get your keys by logging to SoundCloud and registering new app.
Will you be able to play non-public tracks this way, I don't know.

Primitive SoundCloud integration

Reply #16
how do i install it? how do i run it?

i just installed foo_run ... and now?^^

Primitive SoundCloud integration

Reply #17
If you can't set foo_run action, just double-click the script and enter your query, then program set to handle PLS file format will handle the rest

Primitive SoundCloud integration

Reply #18
Ty  its working now!! awesome work!

Primitive SoundCloud integration

Reply #19
This works pretty well but towards the end of every song it just stops and foobar2000 gives the following error:

Quote
Decoding failure at 1:13:26.884 (Connection error):
"http://api.soundcloud.com/tracks/1823680/stream?client_id=da9f7d4fd2b404de52146325215f7e40&secret_token=33f6070b6f49b3d5877868b7daae2f8c"


^ That is from a mix with a 1:13:45 duration, it changes based on the duration, I've tried short single songs and the same error occurs with a different duration time in relation to the last 30 Seconds - 2 minutes of the song.


Primitive SoundCloud integration

Reply #21
Thanks for this! It works great!

Primitive SoundCloud integration

Reply #22
Guys ,Please help to make foo_uie_biography work...
via foo_run your plugin works just great, but still no success with biography...so i have "soundcloud.vbs" in the root foobar2000 folder (& since foo_run works with - it's probably ok to have it there). My foo_uie_biography configuration :

Maybe instead of "%path%" i should type in my "soundcloud.vbs" destination.. or ?  Please, Help ..!

Primitive SoundCloud integration

Reply #23
That should work. Try the same command line in Album tab instead Artist tab, or double click on your Biography View panel or similar...

Guys let me quote myself, that this script continues here:

This continues here: http://www.hydrogenaudio.org/forums/index....howtopic=104954

Help file that comes with the program also explains how to have "Now playing" info rendered in Biography View, or how to show current albumart
Your ideas are welcomed

Primitive SoundCloud integration

Reply #24
That should work. Try the same command line in Album tab instead Artist tab, or double click on your Biography View panel or similar...

My bad . I've forgotten to add "run external script" in the "current source list". But image still doesn't work    - empty space instead of image

UPD:
And frankly this feature isn't that helpful since i can't copy from description