We've sent a verification link by email
Didn't receive the email? Check your Spam folder, it may have been caught by a filter. If you still don't see it, you can resend the verification email.
Started September 19th, 2006 · 49 replies · Latest reply by HardPCM 16 years, 7 months ago
Hello all,
I have a technical question regarding the website and the project.
I am a programmer and I would like to generate the same waveform representation as you do for every sounds in the database.
Could you point me exactly to the framework you are using to generate it? Is this part of your website is GPL or something?
I would like to pass a sound to a program that will directly create the PNG file on disk and load it in a database.
Thank you very much for any help on this.
Jean-Philippe
For those who are interested,
I am starting a research on the utilization of graphical representation of sound files to enable Content-Based Retrieval (CBR) in a database.
it's a utility we made ourselves, and released under GPL afterwards:
http://freesound.iua.upf.edu/files/wav2png.tar.gz
have fun!
- bram
Thank you so much for the quick and useful response!
That will save me a lot of time.
I have tried to compile the code and I have a strange C error which I don't understand well..
I know its not a C forum, so if you have the compiled version, that would be useful.
I'm running an up-to-date ubuntu dapper with development libraries you specify in the file.
phil@cordelia:~/wav2png$ make all
g++ -c -O2 -Wall -pedantic main.cpp
main.cpp: In function ‘long int string2color(std::string, gdImage*)’:
main.cpp:75: error: no matching function for call to ‘transform(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, <unknown type>)’
make: *** [main.o] Error 1
Phil
Tip if you want to make this code portable:
line75 should be:
std::transform(s.begin(), s.end(), s.begin(), (int(*)(int))std::tolower);
it works now, but it would be nice to have the color file you have that is not included in the package...
thanks!
the colorfile is generated by another program, which I sadly enough can't give you...
but if you would like to know, the color is created by taking a 256-size FFT and calculating the spectral centroid for the current location.
the format of the file isn't very hard to mimic:
[128]
45.5662
46.4447
45.852
46.1478
47.4766
46.0987
45.6384
...
That's it, basically
cheers,
- bram
mindead
Unfortunately, I'm not very familiar with DSP yet.
Do you mean you create a color file for every sound?Do you know any website introducing the subject.
Or do you know any Open Source program that would do the same?
Hmm, you'll have a lot to learn!
Try figuring out how you can use FFTW (google!) to generate spectrums of a sound. After that have a look at libsndfile (google!! ) to load waveforms. After that, patch the two together, figure out how to make a "spectral centroid" and you're on your way.
And if you want a good reference for doing all of this, have a long look at: http://www.dspguide.com/pdfbook.htm
- bram
Hello,
When I've tried to install/compile the main.cpp file, I get this error:
------------------------------------
g++ -c -O2 -Wall -pedantic anyoption.cpp
g++ -c -O2 -Wall -pedantic main.cpp
sndfile.h:253: error: '__int64' does not name a type
sndfile.h:263: error: 'sf_count_t' does not name a type
sndfile.h:316: error: 'sf_count_t' does not name a type
sndfile.h:317: error: 'sf_count_t' does not name a type
sndfile.h:389: error: ISO C++ forbids declaration of 'sf_count_t' with no type
sndfile.h:389: error: typedef 'sf_count_t' is initialized (use __typeof__ instead)
sndfile.h:389: error: 'sf_vio_get_filelen' was not declared in this scope
sndfile.h:389: error: expected ',' or ';' before '(' token
sndfile.h:396: error: 'sf_vio_get_filelen' does not name a type
main.cpp: In function 'long int string2color(std:tring, gdImage*)':
main.cpp:75: error: no matching function for call to 'transform(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, <unresolved overloaded function type>'
main.cpp: In function 'int main(int, char**)':
main.cpp:633: error: 'struct SF_INFO' has no member named 'frames'
main.cpp:639: error: 'struct SF_INFO' has no member named 'frames'
make: *** [main.o] Error 1
------------------------------------
Any help would be appreciated, of somebody has an idea?
Thanks in advance.
For those who are interested,
I am starting a research on the utilization of graphical representation of sound files to enable Content-Based Retrieval (CBR) in a database.
Bram
it's a utility we made ourselves, and released under GPL afterwards:http://freesound.iua.upf.edu/files/wav2png.tar.gz
have fun!
- bram
I produced this last year just so I could have fun with it
http://freesound.iua.upf.edu/samplesViewSingle.php?id=22714
Nice feature.
hehe. when I go to http://freesound.iua.upf.edu/files/ it says "you shouldn't be here..." in times new roman/
anyways, Audacity lets you export a txt file of the spectrum, but then you'd have to copy and paste all the values manually, which isn't that convenient.
I've asked this before, but I would love to run freesound In-house as as my media management system. I would still contribute to this site where I can, but a majority of the stuff I record is owned by other people explicitly. I still however need a way to categorize and search recordings of my own just like we do in here.
Ever notice there are NO audio-focused media management softwares out there? (Except for programs like iTunes which are a fucking joke compared to what I'm talking about)
There are lots of image/movie/book collection Databases, but they do not translate well.
Without getting into the other topic around here about how to keep the site going from within the current scenario, could not MTG spin off the code that runs Freesound and sell the architecture to other organizations/people? The website looks as though MTG does sell various technologies that Freesound has built into it, but not a system which could be used as one.
That's my rant for today.
they have a program that can allow you to search both the internet AND/OR local files, for sounds based on tags, (ie. you tag your local files in a way I'd assume is similar to freesound. but it's not freeware.... those frikkers............................
andrew1280For those who are interested,
I am starting a research on the utilization of graphical representation of sound files to enable Content-Based Retrieval (CBR) in a database.
That is a fascinating project. If you can create a fast, lightweight way to accomplish your goal, you will be quite the revolutionary. I imagine that many people would want to have that resource, and even more to be able to use it. Don't give up!
hummmm!!
I'thinkink I will make one for you people :twisted:
Like I said, :roll: (three month ago),
I success to make a workable Win32 version of Wav2Png.Exe on MSVC (Visual C++) v6.0
(in 2 hours, OMG)
If Bram would make it available for everyone (Src & Exe),
just ask for it,
and he may put it in the famous "http://freesound.iua.upf.edu/files/"
hock:
:lol:
After I must think about how to make
the spectral centroiD with the famous FFTW,
:evil:, help!
hello hardpcm, if you send me a ZIP with the needed sources etc I'll gladly put it up.
spectral centriod: http://en.wikipedia.org/wiki/Spectral_centroid
- bram
Hello Everyone,
prompted by HardPCM and many others I've decided to release wav2png like I should have released it quite a while ago:
http://code.google.com/p/wav2png/
I've made some changes in the source code so it builds without problems in msvs2005, taking into account some of the problems reported to me in the past.
HardPCM: please send me an updated wav2png.dsw / wav2png.dsp for visual studio 6 (only these two files are needed!) so I can add it. Make sure all directories are RELATIVE and not absolute.
For those who need it, the linux build script is being looked at.
- bram