Create car engine sounds within getNextAudioBlock()


#1

I finished with https://docs.juce.com/master/tutorial_sine_synth.html and now want to create a car engine sound at different RPMs like this:
https://www.soundsnap.com/tags/car_engine

I just need an approximation, not very high fidelity. I am new to sound synthesis and engineering and I want to use only getNextAudioBlock(). How do I go about creating the distortions or superimpose sound waves to get a rough approximation of the sound?

Is it possible to work backwards from a spectral analysis of the required sound in Audacity for this and try to recreate and superimpose the same sine wave frequencies?


#2

You can obviously generate any sound you want, provided you can figure out the needed code and make it work within the time constraints under which you need to return from the getNextAudioBlock call.

People here might not be experts in the particular problem you are trying to solve, so you might want to look in other forums and resources too.