Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Is there a good way to simulate engine acceleration sound

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    14

    Is there a good way to simulate engine acceleration sound

    Hi everyone
    I have been in the forum for a long time. I am a truck model enthusiast.I am looking for a perfect truck model sound simulation system.I have been using servonaut SMX before(https://www.servonaut.de/shop/de/?ca...l)until I saw openpanzer soundcard(http://openpanzer.org/wiki/doku.php?...stall:sound_op). This is an amazing open source project based on teensy3.2.
    Click image for larger version. 

Name:	微信图片_20200826095321.jpg 
Views:	13 
Size:	100.5 KB 
ID:	21476
    The idea of opsound card to simulate sound is to use real car recordings and play them at the right time through teeny3.2. I think there are some areas for improvement in this project. The way it simulates acceleration is to play faster sounds one by one. The result of this is that the transition is not continuous, and the speed of sound is not linearly related to the speed of the model. My idea is to keep only the sound of the engine idling, the remaining sound of speeds is a resampling of the idling sound base on receiver pwm duty cycle.
    That means the sound needs to be played faster. The sound file is WAV. I have found the same question about RAW on this forum. I am not a sound professional and I have 3 questions in total:
    1 Is WAV working in the same way as RAW, because both are lossless formats.
    2 On the forum I saw Paul reply many times the change of playback speed is on the to do list, is this work one of recent plans?
    3 I plan that the highest playback speed is 4 times. There are two ways to achieve this effect. The first is to reduce the number of samples to be played, and skip three of them for each playback. The second is to increase the frequency of playback. Obviously the second type is better, but will it introduce other problems?
    Thank you for your answer and best wishes.

  2. #2
    Junior Member
    Join Date
    Aug 2019
    Posts
    14
    anyone knows?

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,668
    There was a similar thread some year or so back. Bing or Google and the right keywords might find it if forum search doesn't. It evolved into something usable IIRC.

  4. #4
    Senior Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    135
    Keep in mind the sound of an engine isn't just dependent upon speed. The character of the sound changes. Even at 1000RPM, for example, the engine will sound very different if it is under load or it is just cruising or even has closed throttle (decel) you'll get the valves popping back through the exhaust.

    What you really need is a sound font. There's a sound font player, you just need to make a sound font of maybe a dozen different ranges of rpm and let the sound font player do the heavy lifting for you. Just switch between sound fonts (for example) when you give it gas fast, when you let off, and when it's just driving steady.

  5. #5
    I would model it as a series of impulses, being the explosions in the the cylinders. Then a whole lot of high Q filter to model the transfer function of the cylinder + exhaust. Then increase the repwtition rate of the impulses to mode the RPM.

    Playing. back the sound a a higher speed would sound very unrealistic I asume.

    Can be done in a teensy I think. You might to increase the amplitude of the impulse with repetition rate too, to simulate a larger amount of fuel exploding in the cylinder.

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,668

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •