My attempt at recreating SoundSense, a sound-engine utility for Dwarf Fortress, using Rust.
- To see if I could do it.
- Attempt to create a standalone application that doesn't require bloat.
- Ultimately, you should only need one executable, the soundpack folder, and DF.
- Recommended soundpack fork: https://github.com/jecowa/soundsensepack
- Plays sounds reactive to what happens in DF.
- Can adjust sound volumes realtime, by channel.
- Skip and pause sound loops, by channel.
- Supports most sound parameters used by the original Soundsense (stereo balance, random balance, etc.)
- Custom ignore list, allowing user to customize which log patterns to ignore.
- Additional soundpack parameters. (Channel Settings)
- Simple and Clean GUI.
- Low memory requirement.
- -l / --gamelog [GAMELOG_FILE] : preload the gamelog (default: ".\gamelog.txt")
- -p / --soundpack [PACK_DIR] : preload the soundpack (default: ".\soundpack")
- -i / --ignore [IGNORE_FILE] : preload the ignore list (default: ".\ignore.txt")
- --no-config : Don't read config files on start. Will use the given paths, or soundsense-rs defaults.
Example:
soundsense-rs.exe -l "path/to/gamelog.txt" -p "path/to/soundpack/folder"
This will make soundsense-rs check if there is a file named "ignore.txt" in the current working directory, and will use that file to make the ignore list.
Each line in the ignore list file is considered a regex pattern. If a gamelog message matches any of the patterns, that message is ignored.
Example:
(.+) cancels (.+): (.*)(Water|water)(.*)\.
This pattern will make soundsense-rs ignore any cancellations related to water.
The regex pattern uses the regex crate syntax.
You can set the following environment variables to set the logging parameters. (Disabled on Windows releases)
- SOUNDSENSE_RS_LOG: set the level of logging. (trace, debug, info, warn, error; default: warn)
- SOUNDSENSE_RS_LOG_STYLE: set the level of the log style. (always, auto, never; default: auto)
Linux: libasound2, libgtk-3, libgdk-3, libwebkit2gtk-4.0, libjavascriptcoregtk-4.0