Upcoming Events

Weekly BMW races on Simracing.GP Other regular AC events on Simracing.GP Weekly GT3 Sprint Races on Simracing.GP Weekly GT4 Sprint Races on Simracing.GP Daily WTCR races on Simracing.GP

RPM values and Hz in sounds...

Hello all. I recently downloaded a sound pack with some ripped-off sounds from various games, but I have a small question... Most of the times, sounds come with an RPM indication as filename (e.g. "3000.wav"), which is needed to code the "natural" value of the audio section of car.ini files -- obviously these sounds don't have such thing, but just stuff like "on-low", "on-mid", "on-high" and so on. Is there a (mathematical I guess?) way to extract the RPM value from the audio files? Perhaps something to do with fundamental frequencies and knowledge about the number and placement of the cylinders in the engine... I don't actually know... Any suggestions? Thanks :)
You can use something like Goldwave to load the sound files and 'sense' the CPM of certain frequencies... or maybe Soundbooth.

There is no fool proof way to find them though, so you kinda have to use your imagination a little.

Ie, if a sound sample is a V12 engine and it sounds a bit like it's at 3000rpm, then you can look for pulses in the sound sample at fractions of 3000rpm or so.
Ie, V12 engine, 4 stroke ~ 0.5 bangs per 1 revolution per cyclinder, so about 6 bangs per 1 revolution... and go from there.

I've done this for a bunch of samples from what were meant to be V12 engines of different types, and got nice blending through from low rpm to high rpm samples, so it does work by sensing CPM etc.


So far I used Audacity and its spectrum viewer to "extract" the main frequency (-ies) from the soundsets...

CPM? What's CPM? Cycles per minute? @.@

V12 engine, 4 stroke ~ 0.5 bangs per 1 revolution per cyclinder, so about 6 bangs per 1 revolution...

THIS is the formula I was looking for. Mind putting it together with variables and not numbers so that I can apply it to my case? I'm using a 4 cylinder engine, obviously 4-stroke, from an Escort RS.
Yep, 4 cylinder engine will probably have about 2 bangs per revolution of the crank.

So at 1000rpm, about 2000 cycles per minute (CPM) of some distinctive sound.

But there will be other sound patterns in there that are propoprtional to engine rpm, but probably less dominant as the primary engine combustions.
But exhaust headers and mixers might muffle such patterns too. Ie, Porsche flat 6 can sound a bit like an inline 3 cylinder engine.
V8 flat plane crank can sound like an inline 4 cylinder engine.
A flat 4 boxer can sound different to an inline 4 cylinder engine.

So at some stage you just have to use your intuition to make sure the numbers you get out make sense too, and possibly adjust for other factors to get in the right ball park.

But usually you'll probably find patterns that make sense, to make sounds blend nicely, then you can scale the entire set of sounds to feel like they have the right overall pitch.


Meh, RD doesn't let me upload mp3 files - guess I'ma use MediaFire.

I recorded a short track to showcase the new sounds - I just used an idle sample (800 RPM from what I've extracted) and a mid-RPM one (around 3000), since I listened to the other samples in the same engine folder and I found out that they are somewhat just pitch-shifted copies (i.e., no difference in waveform). A total of 4 samples is used (two for idle, two for engine operation, on and off throttle). Wanna listen? :)


I have some more samples I could use, but in my opinion they aren't much needed... Maybe on the lower RPM end?
Sounds pretty good for just a few samples!

Such a shame Ruud never opened up the sounds to the scripting a bit, so we could use a script to control volume, for turbo especially.

To be honest, stick with what you think sounds good enough. If you can fairly easily make it sound even better then do it I say.
But if you're adding more samples and a lot more work to not be able to tell the difference, then don't bother I'd say.


I think I'ma add some more rumbling on the low-RPM end once I manage to get the RPMs of the "very low"-named sample. Higher-pitched sounds make no sense in the sound bank I am using right now - no real need for them, they are just pitch-shifted copies of what I'm using at the moment, and that's more or less what Racer uses to make the sound variations, just that it does that instantaneously.

Also, the turbo sound is a placeholder, I guess I'ma re-add the old one (which I got from a Youtube vid, btw), this sounds worse IMO.