Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

laurigates/soundsense-rs

 
 

Repository files navigation

SOUNDSENSE-RS

SoundSense, written in Rust.

Tests Build

My attempt at improving SoundSense-RS by making it even leaner by replacing the webkit based UI with a terminal based interface, TUI.

SoundSense-RS is an attempt at recreating SoundSense, a sound-engine utility for Dwarf Fortress, using Rust.

Linux TUI screenshot

Why?

  1. To see if I could do it.
  2. Attempt to create a standalone application that doesn't require bloat.

Keys

  • / arrows to change selected channel
  • / arrows to change volume of selected channel
  • Space to pause selected channel
  • s to skip on selected channel
  • t to cycle threshold setting on selected channel
  • q to exit

Current Features

  • 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.

Command line arguments

  • -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.

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.

Logging

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)

Channel Settings

Read about it here.

Dependencies

Linux: libasound2

MIT License

Read it here.

About

A Rust version of SoundSense

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%