Is there something like ofSoundSetSpectrum???


I am curently working on a music application,

I need to create an interface like an equalizer, able to change the volume of a range of frequency independently.

I see there is ofSoundGetSpectrum, but no ofSoundSetSpectrum

But is there a solution to do it??


Any ideas??

I think I need to create a method on the ofsoundplayer, but ofsounfplayer use fmod and fmod have an equalizer effect but with directx and windows only…

I am on OSX, is there an other way to create equalizer sound effect on OF???

unfortunately, nothing like that exists in OF. you can try to implement your own, but there is nothing available in the realm of DSP type code for rtAudio. music.dsp is a good place to look for algorithms:

while it’s not the same things, there’s alot of audio analysis / synthesis code from my avsys class:

that might be useful. they are 0.05 projects, but should work if you copy the source code into 0.06.

take care!

I’m wanting to analysis small sections of songs/audio files and match them up with similar sections of other songs.

I was playing around with ofsoundSpectruim as I understand it analysis’s the frequency of the audio. But I have a sneaky suspicion that I also need to look at the timbre, which distinguishes a G chord played on a guitar from one played on a violin.

Does anyone who where I could start for timbre analysis?

Wow, all these examples from the avsys class are really cool! Great for teaching or as bootstrapping references for autodidactic types. Really nice work.

re: Timbre analysis, one way of describing timbre is whatever is “left over” once you account for pitch. So if you can already detect pitch (even with something naive, like picking the biggest bin) you can divide all the bin positions by that frequency. This will give you frequency-normalized bins. It’s division rather than subtraction because pitch is in a logarithmic space.

In a few weeks I’m going to release a new version of ofxFft±kiss-fft-wrapper/2184/0 which will allow the behavior described in the first post (allowing something like an equalizer). In the meantime, you can just do the fft and ifft using fftw.

Thankyou Kyle, I got it running and I like you explanation of timbre, still not 100% on how to implement it. But I think after I learn some more on this subject then reread your post everything will click.

Zach those examples are really great It looks like I could probably get done what I need to using some of them. I was wondering is there any theory to go with the examples?

/* do the FFT	*/  
	myfft.powerSpectrum(0,(int)BUFFER_SIZE/2, left,BUFFER_SIZE,&magnitude[0],&phase[0],&power[0],&avg_power);  

This sorta stuff is confusing to me, I’m wanting to learn about the fft stuff and why its used in audio analysis but I can really get a handle on it as of yet.

FFT looks to isolate the main sound in the graph, giving a nice peak.

Could someone point me into the direction of some good learning material relating to audio analysis? I’m feeling dumb, wanting a better grounding int theory before I launch into my project.