Thread: [Plib-devel] OT: engine sound synthesis
Brought to you by:
sjbaker
From: Bram S. <br...@sa...> - 2005-08-12 17:20:06
|
Hello plibbers, Sorry for the off-topic mail, but I want to pick the brains on this list. I am trying to generate good quality engine sounds. After thinking about this, I think that the parameterization of the engine sound comes down to: - throttle parameter (open throttle means more sound) - rpm parameter (higher rpm means 'different' sound). My first approach failed miserably: - Completely synthetic solution: Generate explosions (white noise with degrading freq's), and separate them in time, based on RPM. This sounds way too synthetic, and not like a real engine. My second (naive) approach gives bad results as well: - sampled the engine noise of my chevy small block at idle (1000rpm) - throttle modulates amplitude - rpm dictates play-back frequency. (at 2000 game RPMs, I skip every other sample from the real life 1000 rpm clip). Isn't there a method that can change playback rates of soundclips without changing the frequencies on the sound? What is this technique called? And can it be done in real time? Is it applicable for engine sound synthesis? Thanks in advance, Bram Stolk PS: I'm not using plib's sl here, because I'm on ALSA, not op OSS. |
From: Steve B. <sjb...@ai...> - 2005-08-12 17:32:26
|
Bram Stolk wrote: > Hello plibbers, > > > Sorry for the off-topic mail, but I want to pick the brains on this list. > > I am trying to generate good quality engine sounds. You should check out the TORCS game's mailing list - they have had long discussions about the way to do this. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Christos D. <dim...@id...> - 2005-08-13 02:47:21
|
> Isn't there a method that can change playback rates of soundclips without > changing the frequencies on the sound? It is called time-stretching and it will not work well for this sort of thing. The method you used, resampling is better: Engine sound is made up of two things: 1) The stimulus, which is created by the firing of the engine, and which it's correct to actually 'resample', by skipping or averaging samples 2) The response, which is basically how the engine compartment and exhaust respond to the raw engine sound. You can describe that as some kind of IIR filter, maybe. So, the best thing to do is to record the engine from very close, then somehow derive the filter description of the whole car, perhaps with the exhaust as a separate model. Then resample the engine sample to the appropriate frequency and pass it through the model. The result is an engine sound. -- Christos Dimitrakakis IDIAP (http://www.idiap.ch/~dimitrak/main.html) |
From: Steve B. <sjb...@ai...> - 2005-08-13 02:59:14
|
Christos Dimitrakakis wrote: >> Isn't there a method that can change playback rates of soundclips without >> changing the frequencies on the sound? > > > It is called time-stretching and it will not work well for this sort of > thing. The method you used, resampling is better: > > Engine sound is made up of two things: > > 1) The stimulus, which is created by the firing of the engine, and which > it's correct to actually 'resample', by skipping or averaging samples > > 2) The response, which is basically how the engine compartment and > exhaust respond to the raw engine sound. You can describe that as some > kind of IIR filter, maybe. And of course there are things in cars that cut in and out depending on speed, RPM and engine load. A turbocharger for example has a distinctive sound but only starts spinning when the engine is producing a certain amount of exhaust gasses. At low RPM, it's totally silent - at higher RPM, it kicks in and changes the engine sound as well as adding it's own sound. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Bram S. <br...@sa...> - 2005-08-13 11:41:47
|
On Sat, 13 Aug 2005 04:47:10 +0200 (CEST) Christos Dimitrakakis <dim...@id...> wrote: > So, the best thing to do is to record the engine from very close, then > somehow derive the filter description of the whole car, perhaps with > the exhaust as a separate model. Then resample the engine sample to > the appropriate frequency and pass it through the model. The result is > an engine sound. Thank you for the information, Is this what you used in TORCS? I could not find the TORCS mailing list thread that Steve referred to. Was the sound-synth discussion on torcs-devel sf list? What year? I tried out the TORCS debian packages yesterday. Although the engine sound is better than what I came up with, it is far from perfect. If I use the CVS TORCS with the OpenAL hack, will it sound better? thanks, Bram |
From: Christos D. <dim...@id...> - 2005-08-13 13:34:11
|
>> So, the best thing to do is to record the engine from very close, then >> somehow derive the filter description of the whole car, perhaps with >> the exhaust as a separate model. Then resample the engine sample to >> the appropriate frequency and pass it through the model. The result is >> an engine sound. > > Thank you for the information, > Is this what you used in TORCS? > I could not find the TORCS mailing list thread that Steve referred to. > Was the sound-synth discussion on torcs-devel sf list? What year? > I cannot remember the mailing list discussion. In torcs we just use resampling plus a simple low-pass filter in one implementation. Anything more complicated will take too much CPU time. Of course some cards might be able to deal with that in hardware, but I am not aware of any libraries that currently support arbitrary filters in hardware at the moment. (Maybe the OpenAL one will, soon). > I tried out the TORCS debian packages yesterday. > Although the engine sound is better than what I came up with, it is far > from perfect. If I use the CVS TORCS with the OpenAL hack, will it sound > better? > The best engine sound is the torcs cvs with plib. The openal version does not have the low-pass filter. -- Christos Dimitrakakis IDIAP (http://www.idiap.ch/~dimitrak/main.html) |