SFXR Integration / API

Reporter: JoshDreamland  |  Status: open  |  Last Modified: March 08, 2024, 12:47:48 am
Integrate the SFXR UI into RGM, and the SFXR audio generation routines as a library in ENIGMA.

SFXR is DrPetter's sound-effect generator; it's used quite often in competitions such as the Ludum Dare as it is an extremely useful tool for prototyping. You can find a copy of its source code both on its homepage and at this Git mirror, with work towards a Qt version already having happened in this repository.

Integrating SFXR into ENIGMA brings a couple of benefits:

  • Discoverability: having the tool baked right into ENIGMA's IDE will enable users to discover its functionality and quickly learn to adopt it.
  • Faster prototyping: SFXR has proven invaluable for fast and effortless sound effect generation. Whether these effects are simply used as a placeholder or for the final result, this tool will spur the creative process and add a touch of polish to games that would otherwise go without sound effects altogether.
  • Smaller executables: with the SFXR API integrated into the engine, sound effects can be stored in small tuples of floating point values instead of large, optionally compressed PCM blobs.
  • Extensibility: This project and sound effect API lend themselves well to machine learning applications, where sufficient label data could enable even simple ML techniques (e.g. clustering) to determine good presets from just the filename, or even to dynamically generate sound effects in-game to avoid repetitive sounds.

Because there are lots of versions of SFXR available, including a Qt version, it's up to the proposer of this project to determine the best starting point and path forward. The two primary options are as follows:

  • Start with SFXR-Qt and either add it as a tab, or modify its UI to include the other features RGM needs in its sound editor.
  • Start with the original SFXR (or the GitHub fork) and replicate its SDL UI in Qt in the existing sound editor.

To extend this project with machine learning, a contributor would need to propose a plan to obtain label data. Examples of this plan:

  • Farm out sound effect labeling to many humans through some form of crowd sourcing,
  • Find a repository of known sound effects with names or decent label data and compute metrics (e.g. spectrogram samples) over them that can be used to understand SFXR output.

Mentors: Josh, Greg
Difficulty: Small (depending on proposed scope)
Expected size: 90h (can be grown in scope to fit 175h or even 350h with ML)
Skills required: C++ fundamentals, Qt (for IDE integration)


Hello! I would love to work and contribute to this project because i've got good c++ fundamentals.I'll have to learn /get familiar with Qt tho.Any suggsestions on how i can proceed? @JoshDreamland

Hey Tanya, welcome! We've already had multiple people express interest in taking on this task. I would suggest you familiarize yourself with both the SFXR tool and ENIGMA so you can write up a strong proposal. Feel free to chat with us about this on our Discord.
Please sign in to post comments, or you can view this issue on GitHub.