ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - DasEtwas/enginesound: Procedural engine sound generator controlled via GUI or CLI
Procedural engine sound generator controlled via GUI or CLI - DasEtwas/enginesound
Visit Site

GitHub - DasEtwas/enginesound: Procedural engine sound generator controlled via GUI or CLI

GitHub - DasEtwas/enginesound: Procedural engine sound generator controlled via GUI or CLI

enginesound

GUI Application used to generate purely synthetic engine sounds with advanced options written in Rust

loosely based on this paper

Reading the paper is highly recommended to understand the parameters

Features

General

  • Variable engine parameters
  • Mono WAV recording
  • RON SerDe of engine parameters
  • Pseudorealistic acoustic pipe/chamber simulation (speed of sound, pipe end reflection) based on the above paper
  • Advanced clap-rs powered CLI
  • Intake, Exhaust and Engine vibrations mixing
  • Resonance dampening (can save your audio equipment and ears)

GUI specific

  • Compilation of the GUI is enabled by default ("gui" feature, use --no-default-features to disable)
  • GUI made with conrod/glium
  • Real-time preview of parameters with cpal audio streaming
  • Real-time interactive parameter sliders with small descriptions
  • Record/Stop button
  • Dropping a config into the window loads the config
  • Save button to save the current parameters into a timestamped file in the current working directory
  • Reset sampler button to kill resonances in all acoustic chambers

CLI specific

  • Headless mode which does not start audio streaming or a GUI
  • Config argument to specify the file containing RON-serialized parameters
  • Volume/rpm/length arguments to control master volume/engine rpm/recording length
  • Crossfade argument which cuts the recording in half, swaps the halves and crossfades the middle x seconds (reduces output length by x/2 seconds), used to make seamless loops
  • Warmup time argument to wait for the resonances in the acoustic chambers to be established before recording

Preview

CLI

Engine Sound Generator 1.3.0
https://github.com/DasEtwas/
GUI Application used to generate purely synthetic engine sounds with advanced options in real-time, written in Rust.
It features real-time recording of the engine, a CLI, automatic crossfading to create seamless loops in the CLI,
realtime frequency domain display through FFT, and preset saving/loading capabilities.

USAGE:
    enginesound [FLAGS] [OPTIONS]

FLAGS:
        --help        Prints help information
    -h, --headless    CLI mode without GUI or audio playback
    -V, --version     Prints version information

OPTIONS:
    -c, --config <config>              Sets the input file to load as an engine config
    -f, --crossfade <crossfade>        Crossfades the recording in the middle end-to-start to create a seamless loop,
                                       although adjusting the recording's length to the rpm is recommended. The value
                                       sets the size of the crossfade, where the final output is decreased in length by
                                       crossfade_time/2.
    -o, --output <output_file>         Sets the output .wav file path
    -l, --length <reclen>              Sets the time to record in seconds. The formula for the recommended time to
                                       record to get a seamless loop is as follows:
                                       let wavelength = 120.0 / rpm;
                                       let crossfade = wavelength * 2.0;
                                       let reclen = audio_length + crossfade / 2.0;
    -r, --rpm <rpm>                    Engine RPM
    -q, --samplerate <samplerate>      Generator sample rate [default: 48000]
    -v, --volume <volume>              Sets the master volume [default: 0.1]
    -w, --warmup_time <warmup_time>    Sets the time to wait in seconds before recording

GUI

Image

Sound

Generated using the config shown above while adjusting the RPM manually: Audio file

Example pseudocode for generating a seamless loop

rpm = 1300
wavelength = 120 / rpm
average_len = 3.2                             // seconds
cycles = ceil(average_len / wavelength)
crossfade = 2 * wavelength
length = wavelength * cycles + crossfade / 2
warmup = 2                                    // seconds
fade_length = crossfade
volume = 0.5                                  // 50%

enginesound.exe -h -c config_file.esc -o output_file.wav -f $fade_length -l $length -w $warmup -r $rpm -v $volume

Building

On Ubuntu, these dependencies must be installed for the crate to compile (thanks, leosh64): sudo apt-get install libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev

Licensing

MIT License

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory