v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Utility:SoundSense"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
 
(34 intermediate revisions by 18 users not shown)
Line 1: Line 1:
=SoundSense=
+
{{Quality|Superior|00:45, 6 November 2013 (UTC)}}
 +
{{uv|DF2014}}
 +
{{Infobox utility
 +
| image = File:Breezeicons-mimetypes-64-audio-x-generic.svg<!-- replace with logo if available-->
 +
| misc  =
 +
* [http://df.zweistein.cz/soundsense/ Official website]
 +
* [http://www.bay12forums.com/smf/index.php?topic=60287 Bay12forum thread]
 +
* [http://dffd.bay12games.com/file.php?id=11849 DFFD download page]
 +
* [https://github.com/zwei2stein/df-soundsense Github page]
 +
* [[Utility:SoundSense/Documentation|Documentation]]
 +
}}
 +
[[File:soundsense_prev.png|thumb|200px|Equipped with a self-updater.]]
  
Discussion: http://www.bay12forums.com/smf/index.php?topic=60287.0
+
'''SoundSense''' is a sound-engine [[Utility]] for Dwarf Fortress, which replaces the single background guitar with a collection of sounds and music that play depending on context. This context is drawn mostly from entries in the [[gamelog.txt]], recent versions of SoundSense come with [[Utility:DFHack|dfhack]] script that writes extra information to the gamelog that significantly expand its capabilities.  
Homepage: http://df.zweistein.cz/soundsense/
 
  
==Installation==
+
SoundSense has a [[Utility:SoundSense/Documentation|more advanced documentation here on the wiki]]. 
  
Installing and configuring software can be intimidating if you are not an IT nerd. And this
+
==General information==
is no exception with SoundSense. But bear with me and it can actually be pretty easy.
 
  
'''Non-scary instructions:'''
+
SoundSense is focused on Fortress Mode, and provides a very large set of audio cues for events - it can be very helpful in alerting the player of combat, a strange mood, ghosts, weather, and many other things. 
  
* Install the java runtime
+
Adventure Mode kind of works. The battle sounds function quite well because they are mostly the same as those in Fortress Mode. But SoundSense is still a bit lacking in other adventure sounds, because Adventure Mode does not log many useful events. For example, encountering a megabeast or a quest mob is resolved in chat, leaving no message in the game log to trigger SoundSense.
* Download and extract SoundSense (It does not matter where.)
 
* Download soundpack.zip and extract the "packs" folder to SoundSense directory
 
* Run soundsense.cmd or soundsense.exe
 
  
First, you need to have the java runtime installed. It can be downloaded from the java
+
Occasionally, the music in SoundSense will stop for a short period; this is not a bug - it was done to let ears rest. A few tracks have a silent start and may take a minute or longer to become audible. If in doubt, you can see what is currently playing in GUI under the volume slider. During periods of silence, this will typically show "10s silence" or similar.
homepage. To determine if your computer already has the correct installation of java, go
 
to the Start button, left click "Run..." from the bottom of the menu, type in "cmd" in the
 
dialog that opens, and press the [OK] button. A dark windows pops up and you will be at a
 
command prompt. Type in "java -version" and press [Enter].
 
  
A few lines starting with [java version "1.6.0_14"] or something similar should apear. If
+
SoundSense will only play music immediately on load if the (included) "soundsense-season" script for [[Utility:DFHack|DFHack]] is run (which it is in the default configuration) - otherwise it will wait until the season changes; there is no way to tell before this which music to play.
that case is the case, you are good to go. But if you see [java version "1.5.x_xx" or an
 
earlier version (lower number), you will need to download and install the latest java.
 
  
If something similar to ['java' is not recognized as an internal or external command]
+
==Installation==
appears, either java has not been installed yet or it was not installed correctly. If
 
your case is the latter, it may be possible to work around the problem by editing the
 
soundSense.cmd (in your SoundSense directory). Open it with Notepad and find line line
 
starting with "java -Dja..." and replace the "java" part with the full path for your java
 
installation. For example: "C:\Program Files\Java\jdk1.6.0_20\bin\java.exe"
 
 
 
That was the hard part.
 
 
 
Now, where to install it? SoundSense expects to be in a sub-directory that is inside your
 
Dwarf Fortress directory. So, for example, if you have Dwarf Fortress in F:/df_31_18_win/,
 
you should unpack the contents of SoundSense zip to F:/df_31_18_win/soundsense/. By
 
default, you want to make sure that the .cmd file you use to launch SoundSense is inside a
 
sub-directory of (i.e., below) the DF folder where gamelog.txt is located.
 
 
 
If you want to install to a different location, you need to edit configuration.xml and
 
edit the <gamelog path="../gamelog.txt"/> line. Replace "../gamelog.txt" with the path to
 
where Dwarf Fortress is located. For example: "F:/df_31_18_win/gamelog.txt"
 
 
 
SoundSense is now all set up and ready to run. But you still need the actual sounds and
 
music that it will play. So download soundpack.zip and unzip the "packs" directory and all
 
the contents inside that to the SoundSense directory.
 
 
 
You can start SoundSense by launching (double left-clicking) either soundSense.cmd or
 
soundSenseExe.cmd. (Using the latter should give you clearer error messages regarding a
 
bad java installation.) If you like, you can create a shortcut to soundSense.cmd, rename
 
it "SoundSense" and move it to your desktop for easy access.
 
 
 
Finally, remember that SoundSense needs to run in the background. Ideally, you should
 
start SoundSense BEFORE you start Dwarf Fortress.
 
 
 
==Known Issues==
 
 
 
===Moments of Silence===
 
 
 
Occationally, the music in SoundSense will stop for a short period (10, 20, or 30 seconds)
 
before resuming. This is not a bug - it is intentional. This was done to let ears rest a
 
bit between tracks. (Research shows that ears which get a rest have time to recover and
 
are less likely to be damaged.) Also, a few tracks have a silent start and, at low volume,
 
may take a minute or longer to become audible. If in doubt, you can see what is currently
 
playing in GUI under the volume slider. During periods of silence, this will typically
 
show "10s silence" or similar.
 
 
 
===Game Loads and the Music is Random===
 
 
 
When a game is loaded, SoundSense picks a random seasonal music track to play. This is not
 
a bug - it is intentional. There is no way for SoundSense to detect what season it is when
 
a game is loaded, so a random soundtrack is chosen. But when the season next changes, it
 
will choose the correct soundtrack.
 
 
 
===Adventure Mode - A Bit Lacking===
 
 
 
Adventure Mode kind of works. The battle sounds function quite well because they are
 
mostly the same as those in Fortress Mode. But SoundSense is still a bit lacking in other
 
adventure sounds. The problem is that Adventure Mode does not log many other usefull
 
events. For example, encountering a megabeast or a quest mob is resolved in chat, leaving
 
no message in the game log to trigger SoundSense.
 
 
 
Improvements in how DF handles logging could benfit both SoundSense and DF as a whole.
 
Such suggestions have already been posted in the official Dwarf Fortress forums:
 
http://www.bay12forums.com/smf/index.php?topic=64834.0
 
 
 
===Event Detection: Better Late Than Never?===
 
 
 
In some cases, by the time SoundSense detects conditions to trigger an alert, it may be
 
too late to react to the situation. For example, a "Tantrum Spiral" might already be over
 
before the player can be alerted.
 
 
 
Part of this is a balance between detecting too many false positives and ignoring events
 
until it is too late to do anything. For example, a soldier might lose a pet and report
 
feeling like blowing off some steam... but instead of throwing a tantrum they calm down.
 
 
 
Another problem is FPS sensitivity. A specific sequence of events may trigger certain
 
alert sounds in a high FPS situation, but it might not trigger with low FPS. The sequence
 
of events might "time out". Also, pausing the game could cause similar problems.
 
 
 
===Compatible With DF Mods - Should Work, But NO PROMISES===
 
 
 
SoundSense was mainly designed for "vanilla" (unmodified) Dwarf Fortress. It should work
 
fine with most mods. However, I can not guarantee compatibility. Some mods, especially
 
"major" or "full conversions", may create unusual behavior and involve dangerous events
 
that SoundSense was not designed to detect.
 
 
 
Another words, SoundSense may lack sounds for certain mod-specific events. (E.g.; you
 
should NOT expect SoundSense to include gunshot sounds for mods that add guns! But you CAN
 
modify SoundSense yourself to do this.) Conversely, some events that work normally in
 
vanilla DF may trigger so frequently with a mod as to be very annoying.
 
 
 
===On some Linux===
 
 
 
====Error on 'soundSense.sh' call: "/bin/sh^M : wrong interpret"====
 
 
 
File "soundSense.sh" has CR+LF characters at lines ending.
 
Convert these characters to a more suitable form, with a tool like "[http://en.wikipedia.org/wiki/Unix2dos dos2unix]":
 
  dos2unix soundSense.sh
 
Shell script should then be run without previous error.
 
 
 
Also using sed you can try this:
 
  # IN UNIX ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format.
 
  sed -i -e 's/\r$//' ./soundSense.sh
 
IF launching .sh file after that, says that something is wrong on the last line, when you try to launch sh. Just check, if "fi" is present there instead of "f" or smth like that.
 
 
 
====Error at playing any MP3 file: "javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file: could not get audio input stream from input file"====
 
 
 
Your Java virtual machine failed at reading MP3 files as audio stream. This could fix by adding to JVM an extra plugin: [http://www.oracle.com/technetwork/java/javase/download-137625.html JMF MP3 Plugin].
 
Download plugin, and put *.jar files into your JVM "lib/ext/" directory.
 
 
 
====Error at playing any MP3 file: "javax.sound.sampled.LineUnavailableException: Audio Device Unavailable"====
 
 
 
Whereas your JVM succeeded in reading MP3 file as audio stream, it failed to access to an audio device. If your audio system uses [http://fr.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture Alsa], you could install "aoss" utility, and "soundSense.sh" will call it. On Debian, package "alsa-oss" provides this utility. '''Note: if you are on Ubuntu see below'''. Ubuntu uses PulseAudio backend, therefore toying with aoss is a waste of time.
 
 
 
====Goddammit I'm using PulseAudio and I still can't hear anything!====
 
 
 
First, '''be sure that you are using OpenJDK 7'''; you can't use OpenJDK 6 as it has quiet a serious bug in its ALSA backend[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271108]. You can check what java you have installed by typing
 
  java -version
 
in the terminal. You can install OpenJDK like this in Ubuntu:
 
  sudo apt-get install openjdk-7-jdk
 
  sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
 
('''The "update-alternatives" command will only work on 64bit Ubuntu'''; for 32bit version you need to replace the "amd64" with "i386" or something like that'''.)
 
 
 
Now, check the
 
  /etc/java-7-openjdk/sound.properties
 
file for this:
 
  # OpenJDK on Ubuntu is configured to use PulseAudio by default
 
  javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
  javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
  javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
  javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
 
 
  # PulseAudio not running? Please give feedback on LP: #407299.
 
  #javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider
 
  #javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider
 
  #javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider
 
  #javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider
 
 
 
'''This will not work''', as OpenJDK's PulseAudio backend is buggy as hell. What you need to do is to comment out the PulseAudio and turn back on the old backend:
 
 
 
  # OpenJDK on Ubuntu is configured to use PulseAudio by default
 
  #javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
  #javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
  #javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
  #javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
 
 
 
  # PulseAudio not running? Please give feedback on LP: #407299.
 
  javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider
 
  javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider
 
  javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider
 
  javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider
 
 
 
This should make the sound work. (If you don't know how to edit this then try typing "sudo nano /etc/java-7-openjdk/sound.properties" in the terminal.)
 
 
 
If you're using Sun/Oracle's JRE then switch to OpenJDK. If you don't want to do that (not recommended) then you might try to use the padsp wrapper or install osspd. If the padsp wrapper will not work properly for you then osspd daemon might just do the trick. (''[https://wiki.archlinux.org/index.php/Pulseaudio#OSS Archlinux Pulseaudio user]'')
 
 
 
===Any Other Issues? Post Feedback===
 
 
 
There is a thread at the official Dwarf Fortress forums. Feel free to post any issues,
 
suggestions, and contributions there:
 
http://www.bay12forums.com/smf/index.php?topic=60287.0
 
 
 
When providing feedback about your experience with SoundSense, please specify which mods
 
(if any) you are using. If SoundSense seems to behave weirdly only for you, it just might
 
be from using certain mods.
 
 
 
==Customization==
 
 
 
You can insert additional sounds and music into SoundSense by adding entries to an .xml
 
configuration file. logPattern="regexp" is a regular expression which, if matched, will
 
cause a random soundFile from a list to be played. (Details on how java uses regular
 
expressions: http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html )
 
  
===Sound element attributes:===
+
Detailed instructions are available on the [http://df.zweistein.cz/soundsense/ official website]. 
  
* ''logPattern'' - regular expression matching log line (see link above)
+
* SoundSense requires Java 7, which most computers already have.
* ''channel'' - string; Specifies a channel on which sound is played. Sounds played on a channel can be looped or stopped prematurely.
+
* Download SoundSense and extract the .zip as a subfolder next to ''Dwarf Fortress'' (or add the path to configuration.xml)
* ''loop'' - string; Specifying "start" will start looping a sound on a channel until an expression with "stop" is triggered or until a different loop sound is played on the same channel. (If a non-looped sound is triggered on the same channel, this loop will resume when the non-looped is done playing.)
+
* Move dfhack plugins and scripts to the hack folder if you use these
* ''concurency'' - number; The number of concurrent (i.e., simultaneous) sounds allowed to be played besides this sound. If SoundSense is currently playing more than this, the sound is ignored. The default is unlimited.
+
* Run soundsense.exe, and choose "update soundpack"
* ''timeout'' - number; This initiates a time out during which this particular sound is prevented from playing again. This is measured in milliseconds and the default is 0.
 
* ''delay'' - number; Adds a delay before the sound is played. This is measured in milliseconds and the default is 0.
 
* ''haltOnMatch'' - boolean; If this is set to True and more than one equivalent logPattern exists, SoundSense will only process the first logPattern expression. If it is False, it will continue to process matching (e.g., identical) logPatterns. The default is True.
 
* ''speech'' - boolean; If this is set to True, SoundSense will echo the gamelog text line (containing the logPattern) with a speech synthesizer instead of playing a sound. The default is False.
 
* ''playbackThreshhold'' - number, 0-4, defines level of filter which is applied to this sound.
 
  
===SoundFile element attributes:===
+
Note that a simple install of SoundSense includes only a few sample sounds, for the proper effect you need to download the soundpack. 
  
* ''fileName'' - the path to and name of the sound/music file
+
Finally, remember that SoundSense needs to run in the background. Ideally, you should start SoundSense BEFORE you start ''Dwarf Fortress''.
* ''weight'' - number; This controls the likelihood of a sound being chosen. Default is 100.
 
* ''volumeAdjustment'' - number; This can be used to adjust the volume of the sample. The value can range from -40 to +6 decibles and the default is 0.
 
* ''randomBalance'' - boolean, if set to true will randomply distribute sound betweem stereo channels.
 
* ''balanceAdjustment'' - number, adjusts stereo channel, can range for -1 (full left) to 1 (full right).
 
  
SoundSense supports these audio formats for soundFiles:
+
SoundSense is included and preconfigured in [[Utility:Lazy_Newb_Pack|the Lazy Newb Pack]] and requires no setup beyond pressing "update soundpack" to download the sound files.
  
* mp3  (SoundSense can normalize the sound volume with this format)
+
==Mod compatibility==
* ogg  (works, but SoundSense can not normalize the sound volume)
 
* wav  (See note below. SoundSense only supports "Windows PCM" encoded .wav files)
 
* aiff
 
* au
 
  
Note: Not all .wav files are supported...
+
SoundSense was designed for "vanilla" (unmodified) ''Dwarf Fortress''. It should work fine with most mods, but there is no guarantee of compatibility. Some mods create unusual behavior or involve events that SoundSense does not detect - in other words, SoundSense lacks sounds for mod-specific events. For example: gunshot sounds for mods that add guns are not included, but you can add them for yourself. Some events that work normally in vanilla DF may also trigger so frequently with a mod as to be very annoying.
  
SoundSense supports .wav encoded in the "Windows PCM" format. However, some files with the
+
==For Mac Users==
.wav extention are actually encoded in some other proprietary format. A sound format
+
Installing Java is '''not necessary''' if you have any apps that distribute Java, like Minecraft or Mathematica. To do this,
conversion utility (such as FormatFactory) could be used to fix them.
 
  
===Some Tips:===
+
# Determine the folder containing the "java" file in the app.  It will have a path like <code>/Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin</code>
 +
# Add a new line to soundSense.sh '''immediately after the first line''' of the form <code>PATH="EXAMPLEPATH:$PATH"</code>, where <code>EXAMPLEPATH</code> is the path you determined.
 +
::* For example: <code>PATH="/Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin:$PATH"</code>
  
; Control of Randomness: Each logPattern expression can contain several soundFile elements. When it is triggered, one of them is randomly chosen to play. You can control the probability of each sound being chosen by adding the weight="number" attribute.
+
The first 3 lines of soundSense.sh should now read something like:
; Simultaneous Sounds: By default, only one sound will play for a given logPattern, even if there are several expression using identical logPatterns. (Only the first expression is processed.) But you can allow more than one sound to be played for same pattern by giving the first one the haltOnMatch="false" attribute. They will all start at same time (unless one or more of them also has a delay). An example is in Seasons.
 
; Sequential Sounds: Two (or more) sounds can be played sequentially (one after the other) for the same logPattern by using the haltOnMatch="false" tip above and including a delay attribute for one of them with a delay that surpasses the length of the other.
 
  
===Helpful files:===
+
<pre>#!/bin/sh
 +
PATH="/Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin:$PATH"
 +
dir=${0%/*}</pre>
  
* packSkeletons.zip ( http://df.zweistein.cz/soundsense/packSkeletons.zip ) - This contains .xml files for all known gamelog lines currently without sounds. You can use this as a starting point to expand SoundSense.
+
==For Linux Users==
* missingMessages.cmd - Run this program to parse your gamelog.txt file and output all lines your sound packs will not recognize.
+
Locating the gamelog.txt may be a bit difficult, because the file for Linux versions of ''Dwarf Fortress'' is not in the usual spot. To find, simply navigate to your home directory and open the .dwarffortress folder. (it is hidden by default)  The gamelog file will be located inside.
* logging.properties - Edit this file to enable more debug messages from SoundSense. Set ".level = ALL" to view a very verbose output.
 
  
===Sources of sound & music:===
+
==Sparring Sound Spam==
 +
The game does not distinguish between combat sounds and sparring sounds. You can remove the combat sounds under packs\battle, (LNP\utilities\Soundsense\packs\battle). Consider renaming the subfolders of blocked/hit/miss/movement/wrestling/unitsurprised. You can then rename them when real combat happens.
  
The following are some sites of interest, should you want additional sounds/music.
 
(Websites with free, creative commons, public domain, and/or GNU GPL licensed audio):
 
  
*http://soundbible.com/
+
[[ru:SoundSense]]
*http://www.freesound.org/searchText.php
 
*http://www.musopen.org/
 
*http://opengameart.org/browse/audio
 
*http://www.incompetech.com/m/c/royalty-free/
 
*http://ccmixter.org
 
*http://free-loops.com/
 
*http://www.pdsounds.org/
 
*http://commons.wikimedia.org/wiki/Category:Sound
 
*http://www.archive.org/details/opensource_audio
 
*http://publicdomainaudiovideo.blogspot.com/
 

Latest revision as of 21:23, 28 January 2022

This utility page is about v0.47.05, an older version of DF.
SoundSense
Breezeicons-mimetypes-64-audio-x-generic.svg
Information
Equipped with a self-updater.

SoundSense is a sound-engine Utility for Dwarf Fortress, which replaces the single background guitar with a collection of sounds and music that play depending on context. This context is drawn mostly from entries in the gamelog.txt, recent versions of SoundSense come with dfhack script that writes extra information to the gamelog that significantly expand its capabilities.

SoundSense has a more advanced documentation here on the wiki.

General information[edit]

SoundSense is focused on Fortress Mode, and provides a very large set of audio cues for events - it can be very helpful in alerting the player of combat, a strange mood, ghosts, weather, and many other things.

Adventure Mode kind of works. The battle sounds function quite well because they are mostly the same as those in Fortress Mode. But SoundSense is still a bit lacking in other adventure sounds, because Adventure Mode does not log many useful events. For example, encountering a megabeast or a quest mob is resolved in chat, leaving no message in the game log to trigger SoundSense.

Occasionally, the music in SoundSense will stop for a short period; this is not a bug - it was done to let ears rest. A few tracks have a silent start and may take a minute or longer to become audible. If in doubt, you can see what is currently playing in GUI under the volume slider. During periods of silence, this will typically show "10s silence" or similar.

SoundSense will only play music immediately on load if the (included) "soundsense-season" script for DFHack is run (which it is in the default configuration) - otherwise it will wait until the season changes; there is no way to tell before this which music to play.

Installation[edit]

Detailed instructions are available on the official website.

  • SoundSense requires Java 7, which most computers already have.
  • Download SoundSense and extract the .zip as a subfolder next to Dwarf Fortress (or add the path to configuration.xml)
  • Move dfhack plugins and scripts to the hack folder if you use these
  • Run soundsense.exe, and choose "update soundpack"

Note that a simple install of SoundSense includes only a few sample sounds, for the proper effect you need to download the soundpack.

Finally, remember that SoundSense needs to run in the background. Ideally, you should start SoundSense BEFORE you start Dwarf Fortress.

SoundSense is included and preconfigured in the Lazy Newb Pack and requires no setup beyond pressing "update soundpack" to download the sound files.

Mod compatibility[edit]

SoundSense was designed for "vanilla" (unmodified) Dwarf Fortress. It should work fine with most mods, but there is no guarantee of compatibility. Some mods create unusual behavior or involve events that SoundSense does not detect - in other words, SoundSense lacks sounds for mod-specific events. For example: gunshot sounds for mods that add guns are not included, but you can add them for yourself. Some events that work normally in vanilla DF may also trigger so frequently with a mod as to be very annoying.

For Mac Users[edit]

Installing Java is not necessary if you have any apps that distribute Java, like Minecraft or Mathematica. To do this,

  1. Determine the folder containing the "java" file in the app. It will have a path like /Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin
  2. Add a new line to soundSense.sh immediately after the first line of the form PATH="EXAMPLEPATH:$PATH", where EXAMPLEPATH is the path you determined.
  • For example: PATH="/Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin:$PATH"

The first 3 lines of soundSense.sh should now read something like:

#!/bin/sh
PATH="/Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin:$PATH"
dir=${0%/*}

For Linux Users[edit]

Locating the gamelog.txt may be a bit difficult, because the file for Linux versions of Dwarf Fortress is not in the usual spot. To find, simply navigate to your home directory and open the .dwarffortress folder. (it is hidden by default) The gamelog file will be located inside.

Sparring Sound Spam[edit]

The game does not distinguish between combat sounds and sparring sounds. You can remove the combat sounds under packs\battle, (LNP\utilities\Soundsense\packs\battle). Consider renaming the subfolders of blocked/hit/miss/movement/wrestling/unitsurprised. You can then rename them when real combat happens.