Forums

  • avatar
    12 sounds
    9 posts


    Hello

    I was looking for a thumbnail generator for audio files, or at least a browser showing my files as waveforms for quicker reference. Then I found the freesound-thumbnailer script. Wich does just exactly THAT, even with the geniously hepful color codes for frequencies.

    I installed Python, all those required files (Numpy, PIL, scikits.audiolab) all up and running.
    But how do I actually use that script now?
    Somehow there must be an application, a GUI. With only the script there seems to be no result.

    Can I actually get this script running on Windows? Did anyone do it?
    Why not just release a compiled program?

    I would extremely like to have freesounds.org style thumnail for my sounds, because it would allow me basically to make choices for samples, without even having to listen them.

  • avatar
    246 sounds
    562 posts


    From the command line:
    python wav2png.py test.wav
    should work; other than running it on a single file, you can pass wildcards like *.wav for all of the sounds in the directory and of course you can specify a different path (I tested it quickly with a wav placed in the same directory as the thumbnailer sources)
    ...I said "should" because I didn't test it on Windows, but I really see no reason why it shouldn't.

    (of course, not using it as a system thumbnailer, you'd have to look at the images and pick the corresponding sound files of interest, but it's still better than nothing; see the footnotes for an explanation why the author didn't manage to make it work as a thumbnailer on Windows)

    HTH

  • avatar
    12 sounds
    9 posts


    Uh well. I can't even run that command line.
    I try using the Python program like a command line itself. Do I load the script in the program, then enter the command?

    It all seems a bit weird.
    The Python program itself seems more like a direct scripting editor, than a console.

    I also can't see how this is supposed to work. Will it simply analyze the sound, generate a waveform and apply it as an icon to the processed wav? How do I undo the change?

    Having a simple program to automatically process a chosen directory would be way easier. Also supporting mp3 aif and maybe more. A program to auto generate thumbnails in the style of freesounds.org
    Isn't this page open-source for many years?
    Why hasn't this happened yet?

    It's too confusing to set this up. Probably it doesn't even work as expected.

  • avatar
    246 sounds
    562 posts


    Please, try to be a little more specific in reporting what doesn't work.

    "Uh well. I can't even run that command line."
    What do you read on the command line window when you try it? are you in the folder where wav2png.py and the other files are?

    Yes you're right, the python program is an interpreter, its interactive mode is barebone compared to what ipython for instance offers.

    I'd suggest you to read this official page
    https://docs.python.org/2/faq/windows.html
    take a look especially at the reference to py2exe, it might help you creating a wav2png.exe, making everything easier.

    As said, wav2png already supports the generation of an arbitrary number of images in a single run, e.g.
    python wav2png.py D:\MySounds\*.wav

    The AudioLoader in Essentia (http://essentia.upf.edu) can manage aiff, mp3, flac, and vorbis; it could be used to extend wav2png to treat those other formats.

    "Probably it doesn't even work as expected."
    The key is it doesn't work as *you* expect smile
    It was written to work on Linux, and there it does exactly as an automatic thumbnailer; it's not the author's fault, nor Linux's fault, if things work so differently in Windows that porting it is not trivial.

    "Why hasn't this happened yet?"
    That's a legit question; I guess the intersection between those who know about wav2png, those who are interested in it working on Windows, and those who are capable of doing it, has been null for all this time.

  • avatar
    46 sounds
    157 posts


    BuddhaMaster wrote:
    Having a simple program to automatically process a chosen directory would be way easier. Also supporting mp3 aif and maybe more. A program to auto generate thumbnails in the style of freesounds.org
    Isn't this page open-source for many years?
    Why hasn't this happened yet?

    Because you haven’t made it happen yet?

    Give me a place to stand and a knob to tweak and I will create sub bass so loud the earth moves.
  • avatar
    2064 sounds
    2222 posts


    I agree: it's copyc4t's fault.

    I want to believe.
  • avatar
    12 sounds
    9 posts


    copyc4t wrote:
    Please, try to be a little more specific in reporting what doesn't work.

    I will soon look into this further.
    When I run the wav2png inside the Pythons shell, i get this weird "your inside body being directed "

    Almost seems as if the script is trying to access a website.

  • avatar
    12 sounds
    9 posts


    Allright, sorry for the confusion.

    Well, I was able to make the script work and extract a png from a waveform.
    Previously I had not realized that my wav2png.py file was simply containing one line of code, that being some weird URL code. Oops.

    Now I learned A lot and I realized how the processing from here on would proceed.
    *Wav2Png.py generates the freesound.org styled waveform, outputs as plain png file.
    *Convert the png to a icon size 64x64-128x128 or something like that.
    *Apply the icon to specifiv .wav file. Windows does NOT support changing icons for individual sound files!
    *Find an app that can assign individual icons for specific soundfiles?
    *Generate an automation that processes all those tasks, should be simple really.
    Practically it's a bit more complicated, because who is gonna do all that stuff smile
    But the solution is basically laid out, simply a question of execution.

  • avatar
    12 sounds
    9 posts


    One more thing:
    I have no idea how the native Windows thumbnail program works.
    But usually the icons are cached inside this file.
    C:\Documents and Settings\User\Local Settings\Application Data\IconCache.db

    I have no idea how this is working, if there are simply graphical files stored inside it and assigned to a number or in what way they are referenced.
    But a working solution would be to somehow directly inject the newly generated .png files (converted to proper format to work with the IconCache) and then assign then to the proper wave file.
    If thats by direct local reference (path/filename). Or some random generated number stored in the registry?
    And then apply that reference at the right place.

    It would simply be a direct hack instead of an awkward solution.

  • avatar
    246 sounds
    562 posts


    BuddhaMaster wrote:
    But a working solution would be to somehow directly inject the newly generated .png files (converted to proper format to work with the IconCache) and then assign then to the proper wave file.

    That's intriguing smile The only real downside is that the cache gets rebuilt as certain events happen, forcing you to repeat the injection, and you need to discover the inner structure of the db to change the contents at will.

    BuddhaMaster wrote:
    Find an app that can assign individual icons for specific soundfiles?

    Basically, since such behaviour is not supported by the system, you're calling for a replacement of the explorer... but then, why not using a completely separate program aimed just at what you need?
    Imagine an explorer icon view of the folder where you keep the wavs and their pngs, filtered to show only the pngs, and whenever you click on one of them, the corresponding sound gets played.

    ...AlienXXX: I pledge my innocence!!!!!!! grin

  • avatar
    12 sounds
    9 posts


    copyc4t wrote:
    .. but then, why not using a completely separate program aimed just at what you need?
    Imagine an explorer icon view of the folder where you keep the wavs and their pngs, filtered to show only the pngs, and whenever you click on one of them, the corresponding sound gets played.

    ...AlienXXX: I pledge my innocence!!!!!!! grin

    Well then, thats what I also tried. I tried several free wav preview/browsers.
    They are all limited to simply browse samples, previewing them with simple keyboar inputs or fast response, or cleverly sort them. Crypton Mutant was the only one that featured a waveform in preview state, to visually browse your files. But those are limited to one color and the program only works on Vista upwards. Yes I'm still using XP because it's solid.

    But a browser completely in the style of freesounds.org would actually be perfect.
    Come to think of it. Can't someone simply port the freesounds.org system to work as offline browser that allows you importing or select your own folder/hard drives?
    It's programmed in Python right.
    Add drag'n drop support and there you go.

  • avatar
    246 sounds
    562 posts


    I wasn't implying such a program would exist already, but if you ask for something made like I was suggesting, it'd be easier to find someone who writes it, not having to deal with the inner system workings of a true thumbnailer.

  • avatar
    12 sounds
    9 posts


    Of course.
    But would you think it be possible to create an offline copy of the freesound.org website and adjust the file-system in a way it would accept offline uploads (browsing your own folders).

    I think the only difference would be to make it access the online file-system, simply make it access an offline harddisk. Wouldn't that be as simple as making the file-system your own harddisk instead of the server (ftp:// -> C:/)
    I downloaded HTTrack Website Copier, not sure what's doing but I dont assume it's copying a whole website to make it work in an offline environment.

  • avatar
    246 sounds
    562 posts


    I don't see mirroring a whole site with hundreds of thousand sounds, updating daily, as practical.

    The Freesound API allows you to download the mp3 preview versions we hear in the player, and if you authenticate yourself as a Freesound user, even to download the original sound; but such a massive download, even just of the low quality previews, would be quite taxing for the servers, and you'd have to do it a tiny bit per day not to cause trouble.
    Possible, yes; practical, not at all, IMHO.

    You're better off with the idea of a dedicated windows explorer that shows the pics generated by wav2png on the sounds you have already downloaded, and plays the sounds.

    -- EDIT:
    Oh wait, you mean you only want the site infrastructure, not the whole sound base...
    So you'd have a web server running locally, exposing your filesystem... Well, it may be overkill for a relatively small sound set, but if you want... https://github.com/MTG/freesound smile

  • avatar
    12 sounds
    9 posts


    yes, the latter one is the way of interest.

    ...and you don't think the freesound.org staff could arrange such a task?

    freesound.org presents: The offline browser, easy visualization for your own sound-databases. Browse your sounds easier than ever before.
    Because I'm really not a html coder or something.

    I believe a lot of people would love such enterprise.
    Offered freely, it's open source after all. Making the rounds in websites specialized offering free sounds, vst and other musical stuff. You would easily get several thousand downloads quickly.

    Free publicity?

    At least it was nice talking about it so far smile

  • avatar
    246 sounds
    562 posts


    ...mmmh... maybe not the whole server as a background service but a dedicated browser, eventually showing the pages in an embedded browser window... stripping everything not needed for this, but eventually keeping some features, the tag system could be useful also locally...
    Yes, such a thing could have a reason to be smile

  • avatar
    0 sounds
    1 post


    This thread is quite old. I've found somewhat similar: https://github.com/jasny/audio

    But I really don't know how to call that php library from sox. It should work with sox. Unfortunely, sox is only capable of creating spectograms.

    Another thing is javascipt, I don't care about that, I don't need that in this case. It should work from command prompt. Can someone help me, about that?