In: News
22 Nov 2009I’ve added a GUI front-end for my FreeSound Quark which makes things a lot easier in interactive coding / performing situations. So you may want to update… This front-end uses the FreeSound class to download files from the freesound.org network based on the criteria you provide and they are available to you on the fly while performing or composing… Just obtain / update the FreeSound Quark in your SC environment to get it.
Hello there, I'm Batuhan Bozkurt, a sound artist, computer programmer and performer from Istanbul - Turkey. This is my personal hub site where I regularly try to blog and share my projects and interesting things I stumble upon. For more info about me please click here.
6 Responses to FreeSound Quark Update
reaktorplayer
January 24th, 2010 at 8:09 pm
I’m sorry, how do I “Just obtain / update the FreeSound Quark in your SC environment to get it.”
Thanks
Batuhan
January 25th, 2010 at 4:21 pm
Hi reaktorplayer,
If you are just startin out with SuperCollider, I suggest you subscribe to sc-users mailing list:
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
You can search the archives from here:
http://n2.nabble.com/New-SuperCollider-Mailing-Lists-Forums-Use-These-f2681727.html
See the Quark and Quarks help file in SuperCollider for an answer to your question. You can also run Quarks.gui in SC environment and it’s more or less self explanatory from there. Feel free to ask questions if you run into problems.
reaktorplayer
January 25th, 2010 at 7:16 pm
Thank you for the information. I’ve subscribed to the list and the search has helped already. Thanks again.
Chadwick Wood
March 1st, 2010 at 6:51 am
Hi Batuhan,
Thanks so much for this great addition to SuperCollider! I downloaded it today and started using it, but after a couple of hours it stopped working. I dug in to find out why, and it looks like the responses I was getting from Freesound had changed (the “Keep-Alive” line was no longer there), and your code for parsing the responses to get the file download location was breaking as a result of the change. I went in to the source and made a change that fixes the problem I was having, and is perhaps more robust, as it doesn’t rely on the order of the text in the response. Here are my changes (inside of the downloadSample method):
responseHeader = String.readNew(File(”/tmp/scdlresponseheader”++sampleIDBucket[argIndex]++uniqueID, “r”));
responseHeader = responseHeader.findRegexp(”^Location: (.*?)$”)[1][1];
fileName = responseHeader[responseHeader.findBackwards("/")+1..responseHeader.size-1];
downloadFunc.value;
… basically, all I’m doing is not erasing the spaces and line breaks like you did, and instead using a regular expression to find the line that starts with “Location: “. It seems to work fine so far, although I’m not very experienced with SC, so maybe you had your reasons for your approach. Anyway, thanks again!
Batuhan
March 1st, 2010 at 7:31 am
Hi Chadwick,
Thanks for your kind comments and for looking into this! I remember this being reported before and I vaguely remember fixing it.
Now I’ve tried from my copy and things seem to work fine. When did you download the Quark? Maybe it was before the update?
Do the responses change after using it for sometime or did they change all together suddenly (probably because of a change in freesound)?
In anyway, using regexp is better, it’s just that I’m not really good at it.
I’ll update the Quark with your code as this is a more error proof approach for the long run. I suspect there is a better way to get the redirect URL other than parsing the response string but couldn’t find one.
Anyway, thanks to you too!
Chadwick Wood
March 1st, 2010 at 6:06 pm
I think maybe the change was me accidentally reverting to an older version of the quark! Oops. So, maybe my code change is not needed
Thanks for the response. I’m looking forward to making lots of crazy sound!