Dynamic Engine Noise on RaspberryPi

Hello everyone,

Complete newbie to raspberry pi, but have some experience in programming.

My idea was to use a raspberry pi to take vehicle data from an OBD port, run it through fmod to then play dynamic engine sound through the speakers. I know its fairly easy to get an fmod file running in unity or unreal, but i cant find anything about a raspberry pi application that can take car data and run it through fmod, then out to the audio devices.

Would i need to create a custom app to do this? If so how would i program it to use pre-existing fmod files and dynamically change it with the OBD data?

You would need to create a custom app to do this, yes. To get audio to change in response to input OBD data, you’d need to interpret the OBD yourself, and pass it to FMOD in some way in order to adjust the playing audio.

If you were to use the Studio API, you’d likely handle this by creating a parameter, and using it to automate properties in an event, such as which audio files are playing, their pitch and volume, distortion and EQ, etc. The “Ride-on Mower” and “Car Engine” events in the FMOD Studio example project should serve as examples of this. At runtime, the OBD data could be interpreted and mapped to a parameter value, which is passed to FMOD with a setParameter function like Studio::EventInstance::setParameterByName.

Handling it with the Core API would be done similarly, interpreting the OBD data in your own code and using it to change things like which sounds are playing, their pitch and volume, effect properties and so on, but you assume a lower level control over the audio that is being played back, leading to more complex code. I’d recommend taking a look at the “granular_synth” and “effects” Core API examples included with the FMOD Engine installer if you were to use the Core API.