Hacker News new | past | comments | ask | show | jobs | submit login
Engine Simulator: produce realistic sounds from various engine parameters (github.com/ange-yaghi)
90 points by dtjohnnyb on Aug 14, 2022 | hide | past | favorite | 27 comments



I wonder if this could be converted into a web application, maybe using WASM? I'm sure a lot of people here want to try it out on their own, but for me the build process is daunting as I haven't written C++ since college days. A web application would be very accessible.


FYI, this software is Windows-only for now, but there appears to be an active effort to make it cross-platform: https://github.com/ange-yaghi/engine-sim/issues/2#issuecomme...


The sounds generated by this are very impressive - it is an actual simulation of the entire combustion process.

Best parts are the engine sound under load, slight delay when opening throttle and changing down a gear to force engine braking.



This is great, I'm watching the video on YouTube now...

Are exhausts/mufflers modelled?

For ages I've wanted to simulate different designs for exhaust headers and systems, to be able to possibly create different/interesting sounds from certain engines - i.e. can you add some additional headers with a different length and make an I4 sound like an I6?


If I recall correctly he modeled the acoustics of the exhaust using equalizers and filters, so not really simulated


A second simulator for exhaust systems would be appealing. Perhaps he will figure it out himself, or re-open source the existing simulation once he figures out how to get the credit/compensation he deserves.


I think the issue would be that whereas this I think can get away with just a really fast rigid body simulation, the exhausts and so on would need to simulate acoustics where you have feature sizes in the same ballpark as the wavelength of the sound i.e. your ear will almost definitely be a harsh critic.


I mean there are models in acoustic physical modelling for e.g. throat simulation that break the throat up into a series of cylinders and frustrums that work quite ok. Not sure about real time performance tho.


Works well enough for decent speech synthesis, in realtime.


I think you mean acoustics, not autistics =)


Funnily enough on YouTube in certain areas "acoustic" became a synonym for "autistic"


Could use convolution with recorded impulse response (IR) files to achieve realistic results for different exhausts.


Not sure how one would be able to obtain impulse response of the exhaust system


Guitarists (or mixers) record IRs by playing a sine wave through their cab and recording that. The difference from the dry vs recorded sample is then your IR. While exhaust systems have no digital input, if you have good enough audio gear that can output the signal dry as possible through the exhaust setup, it should achieve the same result I guess. Not that trivial for everyone to do, but if you do this enough times for different kind of exhausts, you'll also have great dataset to start researching and developing a software that can model exhausts accurately.


You can model it as a series of tubes of different diameters.

Look up "digital waveguide" for some more details. This technique is mostly used in speech synthesis, where it can make pretty realistic human-speech-like sounds by modelling the vocal tract, but there's no reason it can't be applied to a car exhaust system.


The better car simulators already do this: “Physically informed car engine sound synthesis for virtual and augmented environments” https://air.iuav.it/bitstream/11578/264484/1/SIVE15_submissi...


This is so cool and it's amazing to me that a single programmer was able to do this as a hobby project. (To me it's magic, I know to some this a just a big project).


Absolutely amazing. I wonder, do games like GTA simulate those sounds as well, or is it pre-baked somehow?


In games you get a better result for the cycles by cheating rather than doing a physical simulation.

Live for speed IIRC did have a fully synthesized engine sound but most games now have samples and some clever interpolation / synthesis as mentioned by others.


Live For Speed also sounded pretty average, although it was still highly appreciated that they simulated it instead of fauxing give the type of game it was.


GTA used a combination of pre-recorded real life audio and their own granular synthesis engine. (Granular synthesis uses sampling, but cuts up the samples into tiny pieces and processes them in various ways.)


Automation Game (car tycoon) features engine design and stimulates sounds from a combination of individual parts snippets iirc as you move around you can hear the valve train clicking or the cylinder firing


It would be epic to make something for this guy.

https://www.instagram.com/foton_automotive/


Further discussion:

"Simulating an Entire Car Engine (yes, it makes noise)"

https://news.ycombinator.com/item?id=32367979


This is so cool. It makes me wonder what kind of amazing simulation software is behind closed doors in car companies.


Wish I was doing something interesting like this for a work, instead of working on boring SAAS stuff




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: