hello first..!

i’m writing a music-mixer-app, and now gladly would know whether it is possible the frequency spectrum of only ONE stream to receive, because so far for me only the spectrum of ALL streams is supplied…

and if i lower the volume to zero, also the frequency spectrum gives zeroes out, can it be adjustusted in such a way that the spectrum is supplied independently of the volume?

thank you a lot for your answers, and sorry for my english ๐Ÿ˜‰

  • You must to post comments

It’s not possible to get spectrum values for seperate channels. This is
just my limited knowledge of the internal workings of FMOD, but the spectrum is a combination of the mixed streams before it goes to output.

It would be an interesting thought:
Spectrum = FSOUND_DSP_GetSpectrum(Channel)

Maybe Brett will do something like this for FMOD 4?

I don’t know why spectrum decreases with volume.
If the spectrum values are from the input signal, then it shouldn’t, unless
the volume actually turns down the input signal, if The spectrum is output
signal, then you should see the spectrum change as you adjust EQ or
apply effects like reverb, but it doesn’t. So it must be input and volume
adjusts input level.

Brett, correct me if I’m wrong :)

  • You must to post comments

See the explanations on the DSP-chain for more information on this theme:

the FFT is at position 900 in the DSP-chain, so it is far behind the mixer – so you cannot use it for only one stream, and it is always affected by the volume.

But never say never.

You could try to do a workaround like this:
Write a DSP-callback for position 800 (e.g.) that simply copies the actual samplebuffer to somewhere in memory (so just inside a selfmade-buffer).
(Perhaps it would be OK, to simply store a pointer to it inside a global variable)

Write a DSP-callback for position 910, that ignores the previous bufferdata, but simply references to your selfmade-buffer from above as outputbuffer.

So you ‘jump over the FFT’.

Now write a DSP-callback for position 899. Inside this callback just ignore the data send to it, but send the data from your stream to the outputbuffer. You should get the data of your stream/sampledata via FSOUND_PlaySoundEx or FSOUND_Stream_CreateDSP or your own buffer again or something like this.

-> So you should hear all sounds as always (depending on how you copy your stream’s data to the DSP) – but the FFT does analyse only one stream.

Have fun with it ๐Ÿ˜‰ altough it sounds more complex than it is – but perhaps it’s more complex than it sounds – who knows…

  • You must to post comments

Oops. This is actually a more elegant way. :)

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.