Record and playback with effects in real time


Could anyone help me? I want to do an app for recording audio signal from microphone, do some effects on this signal (for example low pass effect) but through FIR/IIR filter with transfer function (not through fmod methods), and then playback it IN REAL TIME.
I think i know how to get array of input samples, transfer this samples (do some effects) but i dont know how this changed array of output samples get to the output and play it.
Is it possible to do it ?

Thanks for reaction.

P.S. I apologize for my english :slight_smile: but i hope you will understand

To achieve this goal I recommend taking a look at the “recording” example we ship, it shows recording from the microphone and playback in realtime.

Next you should look at the “dsp_custom” example, it shows how to set up a custom DSP where you can put your processing logic.

Thank you. :slight_smile:
And in that “dsp_custom” example there is the callback function for dsp effect…so if I wanted to make multiple effects I use for every effect one callback function?

Each different type of DSP would have its own FMOD_DSP_DESCRIPTION with its own set of callbacks. If you want multiple instances of the same type of DSP you simply call createDSP multiple times. You can also chain multiple DSPs together by calling addDSP twice, once for each DSP.

1 Like

Add dsp need playback? Does it make a big delay?

Please create a new question, explain what you are trying to do and provide an example of what isn’t working.


I have one more problem.
I want to do application for streaming audio in real time ( recording sound and playback it in the same time with low latency) and also save it to file. That is working.
When I add some DSP effect to recording, it is audible but it doesnt show in saved file. I used method from “recordtodisk” example.
Also I was trying to use FMOD_OUTPUTTYPE_WAVWRITER, then my recording was not audible, but it was showed in saved file.
How can I do both at once? ( be audible and also showed in saved file).

And I want to plot two spectrum, one of input sound and second of output changed sound. The first one wouldnt be a problem, but the second one is. What if I use more then one dsp effects and I need plot the finaly spectrum, how can I do that? I know “dsp_custom” example , but it is not rigth way for me. Or maybe it is but i dont know how to do it.

Thank you for your response. :slight_smile:

The recordtodisk example will output only the audio recorded and using wavwriter will not allow you to use a microphone. The way to capture the playing audio including effects is to create another custom DSP and attach it to the master channel group:

System::getMasterChannelGroup, then

By attaching it to the master you will receive the same audio that is being sent to the speakers.

Hi Mathew Block
I have a big problem, I change the sound and play well,but i read from memory and save it to the disk,the sound does not changed anymore!

Please create a new question, explain what you are trying to do and provide an example of what isn’t working.

Were can i find the recording example?
Checked all youtube videos but cannot find it


You can find our record example projects included in the LowLevel API download.