That's such an interesting topic, I definitely want to implement that one day, and I have given it random thought for many years.
I imagine that I would create a little library of base sounds. That is at least 3 sounds.
auto-rotation sound (drive by momentum).
This would be the sound the engine makes when not injecting gasoline (thrust pedal fully released).
That would be the sound of the engine when thrust is applied, or at least the component that we can add-mix over sound 1.
that's a whistling sound caused by the high revs of the turbo blades which can be heard only from about 3500rpm and when gas are applied.
All 3 would have to be "tileable" like a texture, and last a very short amount of time. I guess about 350ms.
The playback will have to mix these sounds using weights according to real time driving condition, and all sounds will have a playback speed that is a linear function of RPM. (turbo is not linearly bound to main RPM but turbine RPM rather).
So anyway, a library that allows pitch/play speed adjustment is needed, and mixing.
Of course for cosmetics, 2 things on top:
1. doppler effect when using external camera
2. muffling when using in-cabin camera
the muffling could be low pass filter or something of the like.