Hackathon Proposal:Realtime Engine Sounds
|This article is a stub. You can help the wiki by|
|Title:||engine-sim integration for procedural sound generation |
[[File: |thumbnail|no image]]
|Potential mentors:||Erik (sound I/O)|
|Intro:||engine-sim this is an interesting project that create realtime
engine sound. To bad the project don't support Turbofan, Turbojet, Turboprop, and other type of jet engines but i think this can be a good base for flight gear/jsbsim team to build our tools. And a other problem is that the open souce (MIT License) version is EOL due to the orginal creator is plane to build in to a (pay) game but what i say early this is a good moment to take up the code and build on it for use in flight gear and a standalone version for use e.g. for desinging sound fx in films/tv.
|Interested Parties:||www2 (please add yourself if you are interested in working on this)|
|Details:||From a quick read over the code:
Regarding the ‘FPS’, I wouldn’t worry too much about that, running a separate audio rendering thread with whatever frequency resolution is needed (eg 40khz or 80kz) is quite ok: we don’t need to run anything /else/ at that speed :)
We have in the past discussed using various audio models exactly like this to generate piston and turbine noise procedurally based on engine configuration (pistons / fans / stages / exhausts) : it’s a great solution since it can accurately reflect many more environmental factors. So if someone wants to jump in and use this to make an ‘engine audio render thread’ similar to how we use FLITE to turn text into audio, would be a very nice little project.
It’s very interesting that the code is (as far as I can tell) simulating basically one component of engine noise: (exhaust pressure per cylinder over time, at frequencies high enough to model each piston’s combustion cycle) but presumably it’s the one which is actually perceivable. So it’s a good lesson in not agonising the small stuff, rather just make a first-order approximation and see how good it is.
I’d guess for engines where something other than the exhaust is a major component, or is heavily modified (superchargers? turbos?) it might not sound so close, but I am a long way from an ‘engines guy’ so I can’t identify a P-51d vs a Spitfire by sound :D
As always, I’m very happy to draw out the broad strokes of integrating this, and help with debugging / build issues, if someone is motivated to jump in. 
Looking at the sounds we have for existing piston aircraft, I’d be curious about how it handles the cranking sound : which is much more noticeable for aircraft engines than modern automotive engines : presumably this is /less/ based on the exhaust sound, but maybe I’m wrong about that.
(I see a lot of ‘foobar-cranking.wav’ in piston aircraft sound folders)
I’d also suggest something like the current audio-FX-xml, but using noise generators parameterised on properties, might work well for a lot of ’spinning machinery’ sounds, eg props and turbine stages. The engine simulation code above is good because it models the relationship of rpm/load to discrete pistons, but I guess for a spinning prop or fan, the appropriate white or pink noise at a few frequencies, scaled by rpm (etc) might be quite convincing.
|Ideas:||this code is an Internal combustion engines. e.g. Diesel
cycle, Otto cycle, etc and there need to be work on the Brayton cycle (Turbofan, Turbojet, Turboprop and Turboshaft) and prop.
For the software we need to split in two components the library and the editor, where the editor have an similar user interface as the GNU radio companion and the Engines model can be exported to JSBSim.
for the library have two modes: 1. standalone mode for testing and use in sound design and render in movies/tv/games/etc that include graphics and is similar as the project that is base on (engine-sim) with some enhancement for the Brayton cycle. 2. library for including in software (e.g. Flight Gear) that remove the graphics and use only for the synthesizing the audio.
The person that created the engine sim published a 2nd video a couple of weeks ago and one of the engines simulated was a five cylinder radial. It sounded absolutely *amazing*. I'm hoping someone can pick this one up. 
|Notes:||FG integration would of course be great, but I'm afraid it might not
be possible since the engine-sim requires over 80000 FPS to produce correct sound - i have no idea how much CPU that needs, but I think it must be a lot - sadly I cannot test that because the project only builds on Windows and I am running Linux (Ubuntu). But I've seen someone currently working on that, so it might change in the near future ! 
80000 fps sounds a lot but is more like a sample rate 160 khz in audio terms, an normal pc can handles 192kHz/24bit audio with sound fx with ease and i have run some stuff in gnu radio with an sample rate of 2Mhz. Even we can not do this in real time we can use this tool for creating the sounds files.