Hey! I need your help with this tool. It hasn’t been tested for windows or linux. I need it to be tested to see if it works, there is a lot of platform specific code. Please help me out and post some feedback on these platforms. thanks!
YouTube Sound Importer is a renoise tool that allows you to import sound from a internet url to the selected sample.
Paste a link and press “Import Sample”:
4197
Watch the progress in the sample name:
4196
This tool was inspired by 29a’s freesound integration. I use a lot of samples from around the internet and after growing tired of youtube-mp3.org and other crappy conversion sites I decided to make this tool.
Technical details:
YouTube Sound Importer is a basic wrapper for youtube-dl to download video streams and ffmpeg to export the audio track.
I have only tried a few, some don’t work. [/details]
Note: This tool is incomplete and might be buggy. Please remove and reinstall if you encounter any problems, reopening renoise might also be required. Doing so should clear the tool.
this is great idea sonnyjim,thanks, but im afraid it doesnt seem to be working here on Win8…id give you the log file but there was no output from the tool in it(i checked)…i see windows powershell opening and the sample instrument says…"get info for http://www.youtube…etc…". the tool opens ok and picks up the link from the clipboard ok…but not alot else happens when i click “import sample”
Cool idea, but I don’t think it works right now in Windows Vista.
Nothing happens when trying to import a sample from a youtube link, pressing ‘show samples folder’ gives a windows error notice with a cmd.exe (commandline) black window screen behind it. Something about a path not being found. In my case:
The errors might be because of the different path separator chars in Windows/Mac/Linux. Wasn’t it so that Mac/Linux use “/” and Win uses “”…? If so, the platform can be checked within script and the path can be so constructed platform specific.
You may be right, but contemporary Windows is compatible with the “/” symbol. Just wanted to bring that up.
I haven’t looked at the code but it could also be that it’s an escape sequence for the dot in a regular expression. Or it’s missing a trailing slash and messing up trying to do something relative.
The path posted by Jonas doesn’t look right at all.
the show samples folder button now works…but “import sample” just updates tex in the samples list to “get info…” but doesnt download…its getting there though:-)
Well, it still doesn’t work under Windows.
I still notice the forward slashes… it is usually a better practice to work with methods like:
slash = "/ "
if os.platform() = “WINDOWS” then
slash = ""
end
Python is not a default on any windows environment btw, so using tools that heavily depend on scripting environments is not really the preferred way to go on Windows.
I have Python installed, but the tool still doesn’t work from within Renoise.
If i execute it manually in powershell, it works, haven’t tested it in a normal cmd frame.
I did set the program compatibility mode to "Run as Admin"and attempted to use os.tmpname([pipefile].log) in order to have the piped output to a file created in the platform its temp folder (which is usually the best practice) but also in the tempfolder, i don’t see the piped output.
Also removed the ampersand sign that you pasted behind the end of the line, i’m not sure what it is for, but in Windows, not necessary.
I’m afraid it still doesn’t work in Windows Vista .
The ‘Show Samples Folder’ button works as it opens up the folder in a new explorer window. Trying to ‘Import Sample’ from the default youtube link does download the Moog Sub Phatty video into your script folder, but afterwards no sound is loaded into the sample slot! It says ‘Extracting audio …’ as sample name, but no percentage update or anything.
When I copy the empty sample named ‘Extracting audio …’ to a new instrument, an empty 44100Hz 8 bit mono sample is created.
I think I realised the issue and fixed it. I updated the download link to v0.22 with minor changes for windows.
If the tool still stops at “Extracting audio …” then ffmpeg is failing to convert the video to wav. There should be a log in the " { tool path }\logs{ id number }.ffmpeg.log", you can open the log file in notepad.
Sorry for my crappy knowledge of the windows command line and thank you all for the help, this will work eventually!
i just used it for the first time in windows 7 and it worked perfectly ^-^
however, i got the wrong youtube video, and now im trying it again to get the right one and it’s stuck on “Extracting Audio…” .m.
EDIT: i got it to work on a new instrument after restarting the importer, but it still seems a bit hit-and-miss as to whether it will work; some videos arent working at all