<div dir="ltr">Hi all, <br>since the price of fossil fuels is quickly going up to unsustainable levels the mass production of electric cars<br>is only a couple years away.  (there are already a few nice around but not yet high volume production and cost an arm and a leg)<br>
<a href="http://en.wikipedia.org/wiki/Electric_car">http://en.wikipedia.org/wiki/Electric_car</a><br><br>One peculiarity of electric cars is that they emit almost no noise and sometimes engine noise could come handy.<br>For example blind people or even distracted pedestrians about to cross a street cannot hear electric cars coming which<br>
can lead to accidents, injuries and even loss of life.<br>There are already electric car companies offering artificial engine sound in their cars.<br><br>A linux  based embedded system would probably be a nice candidate to provide such functionality. (ARM cpu, some RAM and audio DAC,<br>
or even a nano-itx x86 board which could do other additional things at the same time, in-car computer etc)<br>A nice system would be one which allows pluggable sounds, for example ferrari or porsche sound :) <br>My question is what's in your opinion the best method to simulate realistic car sounds without making the system too complex or too costly.<br>
I was thinking whether multisampling the engine sound at various RPMs (rotations per minute, frequency proportional to RPM) could be a solution<br>or if some kind of synthesis would be needed.<br>The sound generator should in theory take only one input variable, the motor's RPM (which can expressed as 0..100%) and then generate <br>
a sound with a frequency proportional to the RPM.<br><br>A few ideas that come to mind which could provide varying degrees of realism (I don't know because I did not try).<br><br>1) sampling an engine sound at middle RPM and then pitchshifting it with formant correction up and down.<br>
easy to do but probably does not sound so good at extreme pitchshifting ranges.<br><br>2) sampling an engine  sound at various RPMs, the more the better let's say more times per octave and then using some sort<br>of sample pitching (standard interpolation or pitchshifting like rubberband) and then crossfade between samples.<br>
But if the samples to be crossfaded need probably to be phase-aligned otherwise it could lead to chorus style artifacts etc.<br><br>3) sampling a full, very slow RPM sweep both upwards (min to max) and downwards (max to min), lets say a couple of min per direction. <br>
Then the sound generator figures figures out the RPM direction (by comparing two subsequent values or some shortterm mean value) and then<br>plays the sound using the right position in the wave. So for example if you floor the accelerator you have to play the upwards audio wave <br>
but you have to skip lots of parts so you need some trick to make it sound smoothly (time-compression comes to mind but I'm not sure if it is ideal)<br>Not sure how hard it would be to sample those sound sweeps. You need to accelerate very slowly which can be tricky. Perhaps you need some<br>
servo motor which can precisely move either the accelerator pedal or is attached directly to the accelerator cable. Not very userfiendly.<br><br>4) sample the engine sound at various RPM. feed into a DSP algorithm which analyzes the timbre and then builds a model for a synthesizer.<br>
<br>any other ways I am missing ?<br><br>What's the best trade off between realism and complexity in your opinion ?<br><br>Thanks for your comments.<br><br>cheers,<br>Benno<br><br><br><br><br></div>