<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fero14041</id>
	<title>Dwarf Fortress Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fero14041"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php/Special:Contributions/Fero14041"/>
	<updated>2026-04-10T10:12:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:SoundSense&amp;diff=151932</id>
		<title>Utility:SoundSense</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:SoundSense&amp;diff=151932"/>
		<updated>2011-07-30T22:24:04Z</updated>

		<summary type="html">&lt;p&gt;Fero14041: Add a tip for installing aoss utility if JVM fails to access to audio device&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=SoundSense=&lt;br /&gt;
&lt;br /&gt;
Discussion: http://www.bay12forums.com/smf/index.php?topic=60287.0&lt;br /&gt;
Homepage: http://df.zweistein.cz/soundsense/&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
Installing and configuring software can be intimidating if you are not an IT nerd. And this&lt;br /&gt;
is no exception with SoundSense. But bear with me and it can actually be pretty easy.&lt;br /&gt;
&lt;br /&gt;
Non-scary instructions:&lt;br /&gt;
&lt;br /&gt;
* Install the java runtime&lt;br /&gt;
* Download and extract SoundSense (It does not matter where.)&lt;br /&gt;
* Download soundpack.zip and extract the &amp;quot;packs&amp;quot; folder to SoundSense directory&lt;br /&gt;
* Run soundsense.cmd or soundsense.exe&lt;br /&gt;
&lt;br /&gt;
First, you need to have the java runtime installed. It can be downloaded from the java &lt;br /&gt;
homepage. To determine if your computer already has the correct installation of java, go &lt;br /&gt;
to the Start button, left click &amp;quot;Run...&amp;quot; from the bottom of the menu, type in &amp;quot;cmd&amp;quot; in the &lt;br /&gt;
dialog that opens, and press the [OK] button. A dark windows pops up and you will be at a &lt;br /&gt;
command prompt. Type in &amp;quot;java -version&amp;quot; and press [Enter].&lt;br /&gt;
&lt;br /&gt;
A few lines starting with [java version &amp;quot;1.6.0_14&amp;quot;] or something similar should apear. If &lt;br /&gt;
that case is the case, you are good to go. But if you see [java version &amp;quot;1.5.x_xx&amp;quot; or an &lt;br /&gt;
earlier version (lower number), you will need to download and install the latest java.&lt;br /&gt;
&lt;br /&gt;
If something similar to ['java' is not recognized as an internal or external command] &lt;br /&gt;
appears, either java has not been installed yet or it was not installed correctly. If &lt;br /&gt;
your case is the latter, it may be possible to work around the problem by editing the &lt;br /&gt;
soundSense.cmd (in your SoundSense directory). Open it with Notepad and find line line &lt;br /&gt;
starting with &amp;quot;java -Dja...&amp;quot; and replace the &amp;quot;java&amp;quot; part with the full path for your java &lt;br /&gt;
installation. For example: &amp;quot;C:\Program Files\Java\jdk1.6.0_20\bin\java.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
That was the hard part.&lt;br /&gt;
&lt;br /&gt;
Now, where to install it? SoundSense expects to be in a sub-directory that is inside your &lt;br /&gt;
Dwarf Fortress directory. So, for example, if you have Dwarf Fortress in F:/df_31_18_win/,&lt;br /&gt;
you should unpack the contents of SoundSense zip to F:/df_31_18_win/soundsense/. By &lt;br /&gt;
default, you want to make sure that the .cmd file you use to launch SoundSense is inside a &lt;br /&gt;
sub-directory of (i.e., below) the DF folder where gamelog.txt is located.&lt;br /&gt;
&lt;br /&gt;
If you want to install to a different location, you need to edit configuration.xml and &lt;br /&gt;
edit the &amp;lt;gamelog path=&amp;quot;../gamelog.txt&amp;quot;/&amp;gt; line. Replace &amp;quot;../gamelog.txt&amp;quot; with the path to &lt;br /&gt;
where Dwarf Fortress is located. For example: &amp;quot;F:/df_31_18_win/gamelog.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SoundSense is now all set up and ready to run. But you still need the actual sounds and &lt;br /&gt;
music that it will play. So download soundpack.zip and unzip the &amp;quot;packs&amp;quot; directory and all &lt;br /&gt;
the contents inside that to the SoundSense directory.&lt;br /&gt;
&lt;br /&gt;
You can start SoundSense by launching (double left-clicking) either soundSense.cmd or &lt;br /&gt;
soundSenseExe.cmd. (Using the latter should give you clearer error messages regarding a &lt;br /&gt;
bad java installation.) If you like, you can create a shortcut to soundSense.cmd, rename &lt;br /&gt;
it &amp;quot;SoundSense&amp;quot; and move it to your desktop for easy access.&lt;br /&gt;
&lt;br /&gt;
Finally, remember that SoundSense needs to run in the background. Ideally, you should &lt;br /&gt;
start SoundSense BEFORE you start Dwarf Fortress.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
===Moments of Silence===&lt;br /&gt;
&lt;br /&gt;
Occationally, the music in SoundSense will stop for a short period (10, 20, or 30 seconds) &lt;br /&gt;
before resuming. This is not a bug - it is intentional. This was done to let ears rest a &lt;br /&gt;
bit between tracks. (Research shows that ears which get a rest have time to recover and &lt;br /&gt;
are less likely to be damaged.) Also, a few tracks have a silent start and, at low volume, &lt;br /&gt;
may take a minute or longer to become audible. If in doubt, you can see what is currently &lt;br /&gt;
playing in GUI under the volume slider. During periods of silence, this will typically &lt;br /&gt;
show &amp;quot;10s silence&amp;quot; or similar.&lt;br /&gt;
&lt;br /&gt;
===Game Loads and the Music is Random===&lt;br /&gt;
&lt;br /&gt;
When a game is loaded, SoundSense picks a random seasonal music track to play. This is not &lt;br /&gt;
a bug - it is intentional. There is no way for SoundSense to detect what season it is when &lt;br /&gt;
a game is loaded, so a random soundtrack is chosen. But when the season next changes, it &lt;br /&gt;
will choose the correct soundtrack.&lt;br /&gt;
&lt;br /&gt;
===Adventure Mode - A Bit Lacking===&lt;br /&gt;
&lt;br /&gt;
Adventure Mode kind of works. The battle sounds function quite well because they are &lt;br /&gt;
mostly the same as those in Fortress Mode. But SoundSense is still a bit lacking in other &lt;br /&gt;
adventure sounds. The problem is that Adventure Mode does not log many other usefull &lt;br /&gt;
events. For example, encountering a megabeast or a quest mob is resolved in chat, leaving &lt;br /&gt;
no message in the game log to trigger SoundSense.&lt;br /&gt;
&lt;br /&gt;
Improvements in how DF handles logging could benfit both SoundSense and DF as a whole. &lt;br /&gt;
Such suggestions have already been posted in the official Dwarf Fortress forums: &lt;br /&gt;
http://www.bay12forums.com/smf/index.php?topic=64834.0&lt;br /&gt;
&lt;br /&gt;
===Event Detection: Better Late Than Never?===&lt;br /&gt;
&lt;br /&gt;
In some cases, by the time SoundSense detects conditions to trigger an alert, it may be &lt;br /&gt;
too late to react to the situation. For example, a &amp;quot;Tantrum Spiral&amp;quot; might already be over &lt;br /&gt;
before the player can be alerted.&lt;br /&gt;
&lt;br /&gt;
Part of this is a balance between detecting too many false positives and ignoring events &lt;br /&gt;
until it is too late to do anything. For example, a soldier might lose a pet and report &lt;br /&gt;
feeling like blowing off some steam... but instead of throwing a tantrum they calm down.&lt;br /&gt;
&lt;br /&gt;
Another problem is FPS sensitivity. A specific sequence of events may trigger certain &lt;br /&gt;
alert sounds in a high FPS situation, but it might not trigger with low FPS. The sequence &lt;br /&gt;
of events might &amp;quot;time out&amp;quot;. Also, pausing the game could cause similar problems.&lt;br /&gt;
&lt;br /&gt;
===Compatible With DF Mods - Should Work, But NO PROMISES===&lt;br /&gt;
&lt;br /&gt;
SoundSense was mainly designed for &amp;quot;vanilla&amp;quot; (unmodified) Dwarf Fortress. It should work &lt;br /&gt;
fine with most mods. However, I can not guarantee compatibility. Some mods, especially &lt;br /&gt;
&amp;quot;major&amp;quot; or &amp;quot;full conversions&amp;quot;, may create unusual behavior and involve dangerous events &lt;br /&gt;
that SoundSense was not designed to detect.&lt;br /&gt;
&lt;br /&gt;
Another words, SoundSense may lack sounds for certain mod-specific events. (E.g.; you &lt;br /&gt;
should NOT expect SoundSense to include gunshot sounds for mods that add guns! But you CAN &lt;br /&gt;
modify SoundSense yourself to do this.) Conversely, some events that work normally in &lt;br /&gt;
vanilla DF may trigger so frequently with a mod as to be very annoying.&lt;br /&gt;
&lt;br /&gt;
===On some Linux===&lt;br /&gt;
&lt;br /&gt;
====Error on 'soundSense.sh' call: &amp;quot;/bin/sh^M : wrong interpret&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
File &amp;quot;soundSense.sh&amp;quot; has CR+LF characters at lines ending.&lt;br /&gt;
Convert these characters to a more suitable form, with a tool like &amp;quot;[http://en.wikipedia.org/wiki/Unix2dos dos2unix]&amp;quot;:&lt;br /&gt;
  dos2unix soundSense.sh&lt;br /&gt;
Shell script should then be run without previous error.&lt;br /&gt;
&lt;br /&gt;
====Error at playing any MP3 file: &amp;quot;javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file: could not get audio input stream from input file&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
Download plugin, and put *.jar files into your JVM &amp;quot;lib/ext/&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
====Error at playing any MP3 file: &amp;quot;javax.sound.sampled.LineUnavailableException: Audio Device Unavailable&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;aoss&amp;quot; utility, and &amp;quot;soundSense.sh&amp;quot; will call it. On Debian, package &amp;quot;alsa-oss&amp;quot; provides this utility.&lt;br /&gt;
&lt;br /&gt;
===Any Other Issues? Post Feedback===&lt;br /&gt;
&lt;br /&gt;
There is a thread at the official Dwarf Fortress forums. Feel free to post any issues, &lt;br /&gt;
suggestions, and contributions there:&lt;br /&gt;
http://www.bay12forums.com/smf/index.php?topic=60287.0&lt;br /&gt;
&lt;br /&gt;
When providing feedback about your experience with SoundSense, please specify which mods &lt;br /&gt;
(if any) you are using. If SoundSense seems to behave weirdly only for you, it just might &lt;br /&gt;
be from using certain mods.&lt;br /&gt;
&lt;br /&gt;
==Customization==&lt;br /&gt;
&lt;br /&gt;
You can insert additional sounds and music into SoundSense by adding entries to an .xml &lt;br /&gt;
configuration file. logPattern=&amp;quot;regexp&amp;quot; is a regular expression which, if matched, will &lt;br /&gt;
cause a random soundFile from a list to be played. (Details on how java uses regular &lt;br /&gt;
expressions: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html )&lt;br /&gt;
&lt;br /&gt;
===Sound element attributes:===&lt;br /&gt;
&lt;br /&gt;
* logPattern - regular expression matching log line (see link above)&lt;br /&gt;
* channel - string; Specifies a channel on which sound is played. Sounds played on a &lt;br /&gt;
channel can be looped or stopped prematurely.&lt;br /&gt;
* loop - string; Specifying &amp;quot;start&amp;quot; will start looping a sound on a channel until an &lt;br /&gt;
expression with &amp;quot;stop&amp;quot; is triggered or until a different loop sound is played on the same &lt;br /&gt;
channel. (If a non-looped sound is triggered on the same channel, this loop will resume &lt;br /&gt;
when the non-looped is done playing.)&lt;br /&gt;
* concurency - number; The number of concurrent (i.e., simultaneous) sounds allowed to be &lt;br /&gt;
played besides this sound. If SoundSense is currently playing more than this, the sound is &lt;br /&gt;
ignored. The default is unlimited.&lt;br /&gt;
* timeout - number; This initiates a time out during which this particular sound is &lt;br /&gt;
prevented from playing again. This is measured in milliseconds and the default is 0.&lt;br /&gt;
* delay - number; Adds a delay before the sound is played. This is measured in &lt;br /&gt;
milliseconds and the default is 0.&lt;br /&gt;
* haltOnMatch - boolean; If this is set to True and more than one equivalent logPattern &lt;br /&gt;
exists, SoundSense will only process the first logPattern expression. If it is False, it &lt;br /&gt;
will continue to process matching (e.g., identical) logPatterns. The default is True.&lt;br /&gt;
* speech - boolean; If this is set to True, SoundSense will echo the gamelog text line &lt;br /&gt;
(containing the logPattern) with a speech synthesizer instead of playing a sound. The &lt;br /&gt;
default is False.&lt;br /&gt;
&lt;br /&gt;
===SoundFile element attributes:===&lt;br /&gt;
&lt;br /&gt;
* fileName - the path to and name of the sound/music file&lt;br /&gt;
* weight - number; This controls the likelihood of a sound being chosen. Default is 100.&lt;br /&gt;
* volumeAdjustment - number; This can be used to adjust the volume of the sample. The &lt;br /&gt;
value can range from -40 to +6 decibles and the default is 0.&lt;br /&gt;
* randomBalance - boolean, if set to true will randomply distribute sound betweem stereo channels.&lt;br /&gt;
* balanceAdjustment - number, adjusts stereo channel, can range for -1 (full left) to 1 (full right).&lt;br /&gt;
&lt;br /&gt;
SoundSense supports these audio formats for soundFiles:&lt;br /&gt;
&lt;br /&gt;
* mp3   (SoundSense can normalize the sound volume with this format)&lt;br /&gt;
* ogg   (works, but SoundSense can not normalize the sound volume)&lt;br /&gt;
* wav   (See note below. SoundSense only supports &amp;quot;Windows PCM&amp;quot; encoded .wav files)&lt;br /&gt;
* aiff&lt;br /&gt;
* au&lt;br /&gt;
&lt;br /&gt;
Note: Not all .wav files are supported...&lt;br /&gt;
&lt;br /&gt;
SoundSense supports .wav encoded in the &amp;quot;Windows PCM&amp;quot; format. However, some files with the &lt;br /&gt;
.wav extention are actually encoded in some other proprietary format. A sound format &lt;br /&gt;
conversion utility (such as FormatFactory) could be used to fix them.&lt;br /&gt;
&lt;br /&gt;
===Some Tips:===&lt;br /&gt;
&lt;br /&gt;
* Control of Randomness - Each logPattern expression can contain several soundFile &lt;br /&gt;
elements. When it is triggered, one of them is randomly chosen to play. You can control &lt;br /&gt;
the probability of each sound being chosen by adding the weight=&amp;quot;number&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
* Simultaneous Sounds - By default, only one sound will play for a given logPattern, even &lt;br /&gt;
if there are several expression using identical logPatterns. (Only the first expression is &lt;br /&gt;
processed.) But you can allow more than one sound to be played for same pattern by giving &lt;br /&gt;
the first one the haltOnMatch=&amp;quot;false&amp;quot; attribute. They will all start at same time (unless &lt;br /&gt;
one or more of them also has a delay). An example is in Seasons.&lt;br /&gt;
&lt;br /&gt;
* Sequential Sounds - Two (or more) sounds can be played sequentially (one after the &lt;br /&gt;
other) for the same logPattern by using the haltOnMatch=&amp;quot;false&amp;quot; tip above and including a &lt;br /&gt;
delay attribute for one of them with a delay that surpasses the length of the other.&lt;br /&gt;
&lt;br /&gt;
===Helpful files:===&lt;br /&gt;
&lt;br /&gt;
 * packSkeletons.zip ( http://df.zweistein.cz/soundsense/packSkeletons.zip ) - This &lt;br /&gt;
contains .xml files for all known gamelog lines currently without sounds. You can use this &lt;br /&gt;
as a starting point to expand SoundSense.&lt;br /&gt;
 * missingMessages.cmd - Run this program to parse your gamelog.txt file and output all &lt;br /&gt;
lines your sound packs will not recognize.&lt;br /&gt;
 * logging.properties - Edit this file to enable more debug messages from SoundSense. Set &lt;br /&gt;
&amp;quot;.level = ALL&amp;quot; to view a very verbose output.&lt;br /&gt;
&lt;br /&gt;
===Sources of sound &amp;amp; music:===&lt;br /&gt;
&lt;br /&gt;
The following are some sites of interest, should you want additional sounds/music.&lt;br /&gt;
(Websites with free, creative commons, public domain, and/or GNU GPL licensed audio):&lt;br /&gt;
&lt;br /&gt;
http://soundbible.com/&lt;br /&gt;
http://www.freesound.org/searchText.php&lt;br /&gt;
http://www.musopen.org/&lt;br /&gt;
http://opengameart.org/browse/audio&lt;br /&gt;
http://www.incompetech.com/m/c/royalty-free/&lt;br /&gt;
http://ccmixter.org&lt;br /&gt;
http://free-loops.com/&lt;br /&gt;
http://www.pdsounds.org/&lt;br /&gt;
http://commons.wikimedia.org/wiki/Category:Sound&lt;br /&gt;
http://www.archive.org/details/opensource_audio&lt;br /&gt;
http://publicdomainaudiovideo.blogspot.com/&lt;/div&gt;</summary>
		<author><name>Fero14041</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:SoundSense&amp;diff=151931</id>
		<title>Utility:SoundSense</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:SoundSense&amp;diff=151931"/>
		<updated>2011-07-30T22:14:46Z</updated>

		<summary type="html">&lt;p&gt;Fero14041: Add a tip for enabling JVM to play MP3 files, via JMF MP3 plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=SoundSense=&lt;br /&gt;
&lt;br /&gt;
Discussion: http://www.bay12forums.com/smf/index.php?topic=60287.0&lt;br /&gt;
Homepage: http://df.zweistein.cz/soundsense/&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
Installing and configuring software can be intimidating if you are not an IT nerd. And this&lt;br /&gt;
is no exception with SoundSense. But bear with me and it can actually be pretty easy.&lt;br /&gt;
&lt;br /&gt;
Non-scary instructions:&lt;br /&gt;
&lt;br /&gt;
* Install the java runtime&lt;br /&gt;
* Download and extract SoundSense (It does not matter where.)&lt;br /&gt;
* Download soundpack.zip and extract the &amp;quot;packs&amp;quot; folder to SoundSense directory&lt;br /&gt;
* Run soundsense.cmd or soundsense.exe&lt;br /&gt;
&lt;br /&gt;
First, you need to have the java runtime installed. It can be downloaded from the java &lt;br /&gt;
homepage. To determine if your computer already has the correct installation of java, go &lt;br /&gt;
to the Start button, left click &amp;quot;Run...&amp;quot; from the bottom of the menu, type in &amp;quot;cmd&amp;quot; in the &lt;br /&gt;
dialog that opens, and press the [OK] button. A dark windows pops up and you will be at a &lt;br /&gt;
command prompt. Type in &amp;quot;java -version&amp;quot; and press [Enter].&lt;br /&gt;
&lt;br /&gt;
A few lines starting with [java version &amp;quot;1.6.0_14&amp;quot;] or something similar should apear. If &lt;br /&gt;
that case is the case, you are good to go. But if you see [java version &amp;quot;1.5.x_xx&amp;quot; or an &lt;br /&gt;
earlier version (lower number), you will need to download and install the latest java.&lt;br /&gt;
&lt;br /&gt;
If something similar to ['java' is not recognized as an internal or external command] &lt;br /&gt;
appears, either java has not been installed yet or it was not installed correctly. If &lt;br /&gt;
your case is the latter, it may be possible to work around the problem by editing the &lt;br /&gt;
soundSense.cmd (in your SoundSense directory). Open it with Notepad and find line line &lt;br /&gt;
starting with &amp;quot;java -Dja...&amp;quot; and replace the &amp;quot;java&amp;quot; part with the full path for your java &lt;br /&gt;
installation. For example: &amp;quot;C:\Program Files\Java\jdk1.6.0_20\bin\java.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
That was the hard part.&lt;br /&gt;
&lt;br /&gt;
Now, where to install it? SoundSense expects to be in a sub-directory that is inside your &lt;br /&gt;
Dwarf Fortress directory. So, for example, if you have Dwarf Fortress in F:/df_31_18_win/,&lt;br /&gt;
you should unpack the contents of SoundSense zip to F:/df_31_18_win/soundsense/. By &lt;br /&gt;
default, you want to make sure that the .cmd file you use to launch SoundSense is inside a &lt;br /&gt;
sub-directory of (i.e., below) the DF folder where gamelog.txt is located.&lt;br /&gt;
&lt;br /&gt;
If you want to install to a different location, you need to edit configuration.xml and &lt;br /&gt;
edit the &amp;lt;gamelog path=&amp;quot;../gamelog.txt&amp;quot;/&amp;gt; line. Replace &amp;quot;../gamelog.txt&amp;quot; with the path to &lt;br /&gt;
where Dwarf Fortress is located. For example: &amp;quot;F:/df_31_18_win/gamelog.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SoundSense is now all set up and ready to run. But you still need the actual sounds and &lt;br /&gt;
music that it will play. So download soundpack.zip and unzip the &amp;quot;packs&amp;quot; directory and all &lt;br /&gt;
the contents inside that to the SoundSense directory.&lt;br /&gt;
&lt;br /&gt;
You can start SoundSense by launching (double left-clicking) either soundSense.cmd or &lt;br /&gt;
soundSenseExe.cmd. (Using the latter should give you clearer error messages regarding a &lt;br /&gt;
bad java installation.) If you like, you can create a shortcut to soundSense.cmd, rename &lt;br /&gt;
it &amp;quot;SoundSense&amp;quot; and move it to your desktop for easy access.&lt;br /&gt;
&lt;br /&gt;
Finally, remember that SoundSense needs to run in the background. Ideally, you should &lt;br /&gt;
start SoundSense BEFORE you start Dwarf Fortress.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
===Moments of Silence===&lt;br /&gt;
&lt;br /&gt;
Occationally, the music in SoundSense will stop for a short period (10, 20, or 30 seconds) &lt;br /&gt;
before resuming. This is not a bug - it is intentional. This was done to let ears rest a &lt;br /&gt;
bit between tracks. (Research shows that ears which get a rest have time to recover and &lt;br /&gt;
are less likely to be damaged.) Also, a few tracks have a silent start and, at low volume, &lt;br /&gt;
may take a minute or longer to become audible. If in doubt, you can see what is currently &lt;br /&gt;
playing in GUI under the volume slider. During periods of silence, this will typically &lt;br /&gt;
show &amp;quot;10s silence&amp;quot; or similar.&lt;br /&gt;
&lt;br /&gt;
===Game Loads and the Music is Random===&lt;br /&gt;
&lt;br /&gt;
When a game is loaded, SoundSense picks a random seasonal music track to play. This is not &lt;br /&gt;
a bug - it is intentional. There is no way for SoundSense to detect what season it is when &lt;br /&gt;
a game is loaded, so a random soundtrack is chosen. But when the season next changes, it &lt;br /&gt;
will choose the correct soundtrack.&lt;br /&gt;
&lt;br /&gt;
===Adventure Mode - A Bit Lacking===&lt;br /&gt;
&lt;br /&gt;
Adventure Mode kind of works. The battle sounds function quite well because they are &lt;br /&gt;
mostly the same as those in Fortress Mode. But SoundSense is still a bit lacking in other &lt;br /&gt;
adventure sounds. The problem is that Adventure Mode does not log many other usefull &lt;br /&gt;
events. For example, encountering a megabeast or a quest mob is resolved in chat, leaving &lt;br /&gt;
no message in the game log to trigger SoundSense.&lt;br /&gt;
&lt;br /&gt;
Improvements in how DF handles logging could benfit both SoundSense and DF as a whole. &lt;br /&gt;
Such suggestions have already been posted in the official Dwarf Fortress forums: &lt;br /&gt;
http://www.bay12forums.com/smf/index.php?topic=64834.0&lt;br /&gt;
&lt;br /&gt;
===Event Detection: Better Late Than Never?===&lt;br /&gt;
&lt;br /&gt;
In some cases, by the time SoundSense detects conditions to trigger an alert, it may be &lt;br /&gt;
too late to react to the situation. For example, a &amp;quot;Tantrum Spiral&amp;quot; might already be over &lt;br /&gt;
before the player can be alerted.&lt;br /&gt;
&lt;br /&gt;
Part of this is a balance between detecting too many false positives and ignoring events &lt;br /&gt;
until it is too late to do anything. For example, a soldier might lose a pet and report &lt;br /&gt;
feeling like blowing off some steam... but instead of throwing a tantrum they calm down.&lt;br /&gt;
&lt;br /&gt;
Another problem is FPS sensitivity. A specific sequence of events may trigger certain &lt;br /&gt;
alert sounds in a high FPS situation, but it might not trigger with low FPS. The sequence &lt;br /&gt;
of events might &amp;quot;time out&amp;quot;. Also, pausing the game could cause similar problems.&lt;br /&gt;
&lt;br /&gt;
===Compatible With DF Mods - Should Work, But NO PROMISES===&lt;br /&gt;
&lt;br /&gt;
SoundSense was mainly designed for &amp;quot;vanilla&amp;quot; (unmodified) Dwarf Fortress. It should work &lt;br /&gt;
fine with most mods. However, I can not guarantee compatibility. Some mods, especially &lt;br /&gt;
&amp;quot;major&amp;quot; or &amp;quot;full conversions&amp;quot;, may create unusual behavior and involve dangerous events &lt;br /&gt;
that SoundSense was not designed to detect.&lt;br /&gt;
&lt;br /&gt;
Another words, SoundSense may lack sounds for certain mod-specific events. (E.g.; you &lt;br /&gt;
should NOT expect SoundSense to include gunshot sounds for mods that add guns! But you CAN &lt;br /&gt;
modify SoundSense yourself to do this.) Conversely, some events that work normally in &lt;br /&gt;
vanilla DF may trigger so frequently with a mod as to be very annoying.&lt;br /&gt;
&lt;br /&gt;
===On some Linux===&lt;br /&gt;
&lt;br /&gt;
====Error on 'soundSense.sh' call: &amp;quot;/bin/sh^M : wrong interpret&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
File &amp;quot;soundSense.sh&amp;quot; has CR+LF characters at lines ending.&lt;br /&gt;
Convert these characters to a more suitable form, with a tool like &amp;quot;[http://en.wikipedia.org/wiki/Unix2dos dos2unix]&amp;quot;:&lt;br /&gt;
  dos2unix soundSense.sh&lt;br /&gt;
Shell script should then be run without previous error.&lt;br /&gt;
&lt;br /&gt;
====Error at playing any MP3 file: &amp;quot;javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file: could not get audio input stream from input file&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
Download plugin, and put *.jar files into your JVM &amp;quot;lib/ext/&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
===Any Other Issues? Post Feedback===&lt;br /&gt;
&lt;br /&gt;
There is a thread at the official Dwarf Fortress forums. Feel free to post any issues, &lt;br /&gt;
suggestions, and contributions there:&lt;br /&gt;
http://www.bay12forums.com/smf/index.php?topic=60287.0&lt;br /&gt;
&lt;br /&gt;
When providing feedback about your experience with SoundSense, please specify which mods &lt;br /&gt;
(if any) you are using. If SoundSense seems to behave weirdly only for you, it just might &lt;br /&gt;
be from using certain mods.&lt;br /&gt;
&lt;br /&gt;
==Customization==&lt;br /&gt;
&lt;br /&gt;
You can insert additional sounds and music into SoundSense by adding entries to an .xml &lt;br /&gt;
configuration file. logPattern=&amp;quot;regexp&amp;quot; is a regular expression which, if matched, will &lt;br /&gt;
cause a random soundFile from a list to be played. (Details on how java uses regular &lt;br /&gt;
expressions: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html )&lt;br /&gt;
&lt;br /&gt;
===Sound element attributes:===&lt;br /&gt;
&lt;br /&gt;
* logPattern - regular expression matching log line (see link above)&lt;br /&gt;
* channel - string; Specifies a channel on which sound is played. Sounds played on a &lt;br /&gt;
channel can be looped or stopped prematurely.&lt;br /&gt;
* loop - string; Specifying &amp;quot;start&amp;quot; will start looping a sound on a channel until an &lt;br /&gt;
expression with &amp;quot;stop&amp;quot; is triggered or until a different loop sound is played on the same &lt;br /&gt;
channel. (If a non-looped sound is triggered on the same channel, this loop will resume &lt;br /&gt;
when the non-looped is done playing.)&lt;br /&gt;
* concurency - number; The number of concurrent (i.e., simultaneous) sounds allowed to be &lt;br /&gt;
played besides this sound. If SoundSense is currently playing more than this, the sound is &lt;br /&gt;
ignored. The default is unlimited.&lt;br /&gt;
* timeout - number; This initiates a time out during which this particular sound is &lt;br /&gt;
prevented from playing again. This is measured in milliseconds and the default is 0.&lt;br /&gt;
* delay - number; Adds a delay before the sound is played. This is measured in &lt;br /&gt;
milliseconds and the default is 0.&lt;br /&gt;
* haltOnMatch - boolean; If this is set to True and more than one equivalent logPattern &lt;br /&gt;
exists, SoundSense will only process the first logPattern expression. If it is False, it &lt;br /&gt;
will continue to process matching (e.g., identical) logPatterns. The default is True.&lt;br /&gt;
* speech - boolean; If this is set to True, SoundSense will echo the gamelog text line &lt;br /&gt;
(containing the logPattern) with a speech synthesizer instead of playing a sound. The &lt;br /&gt;
default is False.&lt;br /&gt;
&lt;br /&gt;
===SoundFile element attributes:===&lt;br /&gt;
&lt;br /&gt;
* fileName - the path to and name of the sound/music file&lt;br /&gt;
* weight - number; This controls the likelihood of a sound being chosen. Default is 100.&lt;br /&gt;
* volumeAdjustment - number; This can be used to adjust the volume of the sample. The &lt;br /&gt;
value can range from -40 to +6 decibles and the default is 0.&lt;br /&gt;
* randomBalance - boolean, if set to true will randomply distribute sound betweem stereo channels.&lt;br /&gt;
* balanceAdjustment - number, adjusts stereo channel, can range for -1 (full left) to 1 (full right).&lt;br /&gt;
&lt;br /&gt;
SoundSense supports these audio formats for soundFiles:&lt;br /&gt;
&lt;br /&gt;
* mp3   (SoundSense can normalize the sound volume with this format)&lt;br /&gt;
* ogg   (works, but SoundSense can not normalize the sound volume)&lt;br /&gt;
* wav   (See note below. SoundSense only supports &amp;quot;Windows PCM&amp;quot; encoded .wav files)&lt;br /&gt;
* aiff&lt;br /&gt;
* au&lt;br /&gt;
&lt;br /&gt;
Note: Not all .wav files are supported...&lt;br /&gt;
&lt;br /&gt;
SoundSense supports .wav encoded in the &amp;quot;Windows PCM&amp;quot; format. However, some files with the &lt;br /&gt;
.wav extention are actually encoded in some other proprietary format. A sound format &lt;br /&gt;
conversion utility (such as FormatFactory) could be used to fix them.&lt;br /&gt;
&lt;br /&gt;
===Some Tips:===&lt;br /&gt;
&lt;br /&gt;
* Control of Randomness - Each logPattern expression can contain several soundFile &lt;br /&gt;
elements. When it is triggered, one of them is randomly chosen to play. You can control &lt;br /&gt;
the probability of each sound being chosen by adding the weight=&amp;quot;number&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
* Simultaneous Sounds - By default, only one sound will play for a given logPattern, even &lt;br /&gt;
if there are several expression using identical logPatterns. (Only the first expression is &lt;br /&gt;
processed.) But you can allow more than one sound to be played for same pattern by giving &lt;br /&gt;
the first one the haltOnMatch=&amp;quot;false&amp;quot; attribute. They will all start at same time (unless &lt;br /&gt;
one or more of them also has a delay). An example is in Seasons.&lt;br /&gt;
&lt;br /&gt;
* Sequential Sounds - Two (or more) sounds can be played sequentially (one after the &lt;br /&gt;
other) for the same logPattern by using the haltOnMatch=&amp;quot;false&amp;quot; tip above and including a &lt;br /&gt;
delay attribute for one of them with a delay that surpasses the length of the other.&lt;br /&gt;
&lt;br /&gt;
===Helpful files:===&lt;br /&gt;
&lt;br /&gt;
 * packSkeletons.zip ( http://df.zweistein.cz/soundsense/packSkeletons.zip ) - This &lt;br /&gt;
contains .xml files for all known gamelog lines currently without sounds. You can use this &lt;br /&gt;
as a starting point to expand SoundSense.&lt;br /&gt;
 * missingMessages.cmd - Run this program to parse your gamelog.txt file and output all &lt;br /&gt;
lines your sound packs will not recognize.&lt;br /&gt;
 * logging.properties - Edit this file to enable more debug messages from SoundSense. Set &lt;br /&gt;
&amp;quot;.level = ALL&amp;quot; to view a very verbose output.&lt;br /&gt;
&lt;br /&gt;
===Sources of sound &amp;amp; music:===&lt;br /&gt;
&lt;br /&gt;
The following are some sites of interest, should you want additional sounds/music.&lt;br /&gt;
(Websites with free, creative commons, public domain, and/or GNU GPL licensed audio):&lt;br /&gt;
&lt;br /&gt;
http://soundbible.com/&lt;br /&gt;
http://www.freesound.org/searchText.php&lt;br /&gt;
http://www.musopen.org/&lt;br /&gt;
http://opengameart.org/browse/audio&lt;br /&gt;
http://www.incompetech.com/m/c/royalty-free/&lt;br /&gt;
http://ccmixter.org&lt;br /&gt;
http://free-loops.com/&lt;br /&gt;
http://www.pdsounds.org/&lt;br /&gt;
http://commons.wikimedia.org/wiki/Category:Sound&lt;br /&gt;
http://www.archive.org/details/opensource_audio&lt;br /&gt;
http://publicdomainaudiovideo.blogspot.com/&lt;/div&gt;</summary>
		<author><name>Fero14041</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:SoundSense&amp;diff=151930</id>
		<title>Utility:SoundSense</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:SoundSense&amp;diff=151930"/>
		<updated>2011-07-30T22:07:00Z</updated>

		<summary type="html">&lt;p&gt;Fero14041: Add a tip for converting &amp;quot;soundSense.sh&amp;quot; lines ending characters, via &amp;quot;dos2unix&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=SoundSense=&lt;br /&gt;
&lt;br /&gt;
Discussion: http://www.bay12forums.com/smf/index.php?topic=60287.0&lt;br /&gt;
Homepage: http://df.zweistein.cz/soundsense/&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
Installing and configuring software can be intimidating if you are not an IT nerd. And this&lt;br /&gt;
is no exception with SoundSense. But bear with me and it can actually be pretty easy.&lt;br /&gt;
&lt;br /&gt;
Non-scary instructions:&lt;br /&gt;
&lt;br /&gt;
* Install the java runtime&lt;br /&gt;
* Download and extract SoundSense (It does not matter where.)&lt;br /&gt;
* Download soundpack.zip and extract the &amp;quot;packs&amp;quot; folder to SoundSense directory&lt;br /&gt;
* Run soundsense.cmd or soundsense.exe&lt;br /&gt;
&lt;br /&gt;
First, you need to have the java runtime installed. It can be downloaded from the java &lt;br /&gt;
homepage. To determine if your computer already has the correct installation of java, go &lt;br /&gt;
to the Start button, left click &amp;quot;Run...&amp;quot; from the bottom of the menu, type in &amp;quot;cmd&amp;quot; in the &lt;br /&gt;
dialog that opens, and press the [OK] button. A dark windows pops up and you will be at a &lt;br /&gt;
command prompt. Type in &amp;quot;java -version&amp;quot; and press [Enter].&lt;br /&gt;
&lt;br /&gt;
A few lines starting with [java version &amp;quot;1.6.0_14&amp;quot;] or something similar should apear. If &lt;br /&gt;
that case is the case, you are good to go. But if you see [java version &amp;quot;1.5.x_xx&amp;quot; or an &lt;br /&gt;
earlier version (lower number), you will need to download and install the latest java.&lt;br /&gt;
&lt;br /&gt;
If something similar to ['java' is not recognized as an internal or external command] &lt;br /&gt;
appears, either java has not been installed yet or it was not installed correctly. If &lt;br /&gt;
your case is the latter, it may be possible to work around the problem by editing the &lt;br /&gt;
soundSense.cmd (in your SoundSense directory). Open it with Notepad and find line line &lt;br /&gt;
starting with &amp;quot;java -Dja...&amp;quot; and replace the &amp;quot;java&amp;quot; part with the full path for your java &lt;br /&gt;
installation. For example: &amp;quot;C:\Program Files\Java\jdk1.6.0_20\bin\java.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
That was the hard part.&lt;br /&gt;
&lt;br /&gt;
Now, where to install it? SoundSense expects to be in a sub-directory that is inside your &lt;br /&gt;
Dwarf Fortress directory. So, for example, if you have Dwarf Fortress in F:/df_31_18_win/,&lt;br /&gt;
you should unpack the contents of SoundSense zip to F:/df_31_18_win/soundsense/. By &lt;br /&gt;
default, you want to make sure that the .cmd file you use to launch SoundSense is inside a &lt;br /&gt;
sub-directory of (i.e., below) the DF folder where gamelog.txt is located.&lt;br /&gt;
&lt;br /&gt;
If you want to install to a different location, you need to edit configuration.xml and &lt;br /&gt;
edit the &amp;lt;gamelog path=&amp;quot;../gamelog.txt&amp;quot;/&amp;gt; line. Replace &amp;quot;../gamelog.txt&amp;quot; with the path to &lt;br /&gt;
where Dwarf Fortress is located. For example: &amp;quot;F:/df_31_18_win/gamelog.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SoundSense is now all set up and ready to run. But you still need the actual sounds and &lt;br /&gt;
music that it will play. So download soundpack.zip and unzip the &amp;quot;packs&amp;quot; directory and all &lt;br /&gt;
the contents inside that to the SoundSense directory.&lt;br /&gt;
&lt;br /&gt;
You can start SoundSense by launching (double left-clicking) either soundSense.cmd or &lt;br /&gt;
soundSenseExe.cmd. (Using the latter should give you clearer error messages regarding a &lt;br /&gt;
bad java installation.) If you like, you can create a shortcut to soundSense.cmd, rename &lt;br /&gt;
it &amp;quot;SoundSense&amp;quot; and move it to your desktop for easy access.&lt;br /&gt;
&lt;br /&gt;
Finally, remember that SoundSense needs to run in the background. Ideally, you should &lt;br /&gt;
start SoundSense BEFORE you start Dwarf Fortress.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
===Moments of Silence===&lt;br /&gt;
&lt;br /&gt;
Occationally, the music in SoundSense will stop for a short period (10, 20, or 30 seconds) &lt;br /&gt;
before resuming. This is not a bug - it is intentional. This was done to let ears rest a &lt;br /&gt;
bit between tracks. (Research shows that ears which get a rest have time to recover and &lt;br /&gt;
are less likely to be damaged.) Also, a few tracks have a silent start and, at low volume, &lt;br /&gt;
may take a minute or longer to become audible. If in doubt, you can see what is currently &lt;br /&gt;
playing in GUI under the volume slider. During periods of silence, this will typically &lt;br /&gt;
show &amp;quot;10s silence&amp;quot; or similar.&lt;br /&gt;
&lt;br /&gt;
===Game Loads and the Music is Random===&lt;br /&gt;
&lt;br /&gt;
When a game is loaded, SoundSense picks a random seasonal music track to play. This is not &lt;br /&gt;
a bug - it is intentional. There is no way for SoundSense to detect what season it is when &lt;br /&gt;
a game is loaded, so a random soundtrack is chosen. But when the season next changes, it &lt;br /&gt;
will choose the correct soundtrack.&lt;br /&gt;
&lt;br /&gt;
===Adventure Mode - A Bit Lacking===&lt;br /&gt;
&lt;br /&gt;
Adventure Mode kind of works. The battle sounds function quite well because they are &lt;br /&gt;
mostly the same as those in Fortress Mode. But SoundSense is still a bit lacking in other &lt;br /&gt;
adventure sounds. The problem is that Adventure Mode does not log many other usefull &lt;br /&gt;
events. For example, encountering a megabeast or a quest mob is resolved in chat, leaving &lt;br /&gt;
no message in the game log to trigger SoundSense.&lt;br /&gt;
&lt;br /&gt;
Improvements in how DF handles logging could benfit both SoundSense and DF as a whole. &lt;br /&gt;
Such suggestions have already been posted in the official Dwarf Fortress forums: &lt;br /&gt;
http://www.bay12forums.com/smf/index.php?topic=64834.0&lt;br /&gt;
&lt;br /&gt;
===Event Detection: Better Late Than Never?===&lt;br /&gt;
&lt;br /&gt;
In some cases, by the time SoundSense detects conditions to trigger an alert, it may be &lt;br /&gt;
too late to react to the situation. For example, a &amp;quot;Tantrum Spiral&amp;quot; might already be over &lt;br /&gt;
before the player can be alerted.&lt;br /&gt;
&lt;br /&gt;
Part of this is a balance between detecting too many false positives and ignoring events &lt;br /&gt;
until it is too late to do anything. For example, a soldier might lose a pet and report &lt;br /&gt;
feeling like blowing off some steam... but instead of throwing a tantrum they calm down.&lt;br /&gt;
&lt;br /&gt;
Another problem is FPS sensitivity. A specific sequence of events may trigger certain &lt;br /&gt;
alert sounds in a high FPS situation, but it might not trigger with low FPS. The sequence &lt;br /&gt;
of events might &amp;quot;time out&amp;quot;. Also, pausing the game could cause similar problems.&lt;br /&gt;
&lt;br /&gt;
===Compatible With DF Mods - Should Work, But NO PROMISES===&lt;br /&gt;
&lt;br /&gt;
SoundSense was mainly designed for &amp;quot;vanilla&amp;quot; (unmodified) Dwarf Fortress. It should work &lt;br /&gt;
fine with most mods. However, I can not guarantee compatibility. Some mods, especially &lt;br /&gt;
&amp;quot;major&amp;quot; or &amp;quot;full conversions&amp;quot;, may create unusual behavior and involve dangerous events &lt;br /&gt;
that SoundSense was not designed to detect.&lt;br /&gt;
&lt;br /&gt;
Another words, SoundSense may lack sounds for certain mod-specific events. (E.g.; you &lt;br /&gt;
should NOT expect SoundSense to include gunshot sounds for mods that add guns! But you CAN &lt;br /&gt;
modify SoundSense yourself to do this.) Conversely, some events that work normally in &lt;br /&gt;
vanilla DF may trigger so frequently with a mod as to be very annoying.&lt;br /&gt;
&lt;br /&gt;
===On some Linux===&lt;br /&gt;
&lt;br /&gt;
====Error on 'soundSense.sh' call: &amp;quot;/bin/sh^M : wrong interpret&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
File &amp;quot;soundSense.sh&amp;quot; has CR+LF characters at lines ending.&lt;br /&gt;
Convert these characters to a more suitable form, with a tool like &amp;quot;[http://en.wikipedia.org/wiki/Unix2dos dos2unix]&amp;quot;:&lt;br /&gt;
  dos2unix soundSense.sh&lt;br /&gt;
Shell script should then be run without previous error.&lt;br /&gt;
&lt;br /&gt;
===Any Other Issues? Post Feedback===&lt;br /&gt;
&lt;br /&gt;
There is a thread at the official Dwarf Fortress forums. Feel free to post any issues, &lt;br /&gt;
suggestions, and contributions there:&lt;br /&gt;
http://www.bay12forums.com/smf/index.php?topic=60287.0&lt;br /&gt;
&lt;br /&gt;
When providing feedback about your experience with SoundSense, please specify which mods &lt;br /&gt;
(if any) you are using. If SoundSense seems to behave weirdly only for you, it just might &lt;br /&gt;
be from using certain mods.&lt;br /&gt;
&lt;br /&gt;
==Customization==&lt;br /&gt;
&lt;br /&gt;
You can insert additional sounds and music into SoundSense by adding entries to an .xml &lt;br /&gt;
configuration file. logPattern=&amp;quot;regexp&amp;quot; is a regular expression which, if matched, will &lt;br /&gt;
cause a random soundFile from a list to be played. (Details on how java uses regular &lt;br /&gt;
expressions: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html )&lt;br /&gt;
&lt;br /&gt;
===Sound element attributes:===&lt;br /&gt;
&lt;br /&gt;
* logPattern - regular expression matching log line (see link above)&lt;br /&gt;
* channel - string; Specifies a channel on which sound is played. Sounds played on a &lt;br /&gt;
channel can be looped or stopped prematurely.&lt;br /&gt;
* loop - string; Specifying &amp;quot;start&amp;quot; will start looping a sound on a channel until an &lt;br /&gt;
expression with &amp;quot;stop&amp;quot; is triggered or until a different loop sound is played on the same &lt;br /&gt;
channel. (If a non-looped sound is triggered on the same channel, this loop will resume &lt;br /&gt;
when the non-looped is done playing.)&lt;br /&gt;
* concurency - number; The number of concurrent (i.e., simultaneous) sounds allowed to be &lt;br /&gt;
played besides this sound. If SoundSense is currently playing more than this, the sound is &lt;br /&gt;
ignored. The default is unlimited.&lt;br /&gt;
* timeout - number; This initiates a time out during which this particular sound is &lt;br /&gt;
prevented from playing again. This is measured in milliseconds and the default is 0.&lt;br /&gt;
* delay - number; Adds a delay before the sound is played. This is measured in &lt;br /&gt;
milliseconds and the default is 0.&lt;br /&gt;
* haltOnMatch - boolean; If this is set to True and more than one equivalent logPattern &lt;br /&gt;
exists, SoundSense will only process the first logPattern expression. If it is False, it &lt;br /&gt;
will continue to process matching (e.g., identical) logPatterns. The default is True.&lt;br /&gt;
* speech - boolean; If this is set to True, SoundSense will echo the gamelog text line &lt;br /&gt;
(containing the logPattern) with a speech synthesizer instead of playing a sound. The &lt;br /&gt;
default is False.&lt;br /&gt;
&lt;br /&gt;
===SoundFile element attributes:===&lt;br /&gt;
&lt;br /&gt;
* fileName - the path to and name of the sound/music file&lt;br /&gt;
* weight - number; This controls the likelihood of a sound being chosen. Default is 100.&lt;br /&gt;
* volumeAdjustment - number; This can be used to adjust the volume of the sample. The &lt;br /&gt;
value can range from -40 to +6 decibles and the default is 0.&lt;br /&gt;
* randomBalance - boolean, if set to true will randomply distribute sound betweem stereo channels.&lt;br /&gt;
* balanceAdjustment - number, adjusts stereo channel, can range for -1 (full left) to 1 (full right).&lt;br /&gt;
&lt;br /&gt;
SoundSense supports these audio formats for soundFiles:&lt;br /&gt;
&lt;br /&gt;
* mp3   (SoundSense can normalize the sound volume with this format)&lt;br /&gt;
* ogg   (works, but SoundSense can not normalize the sound volume)&lt;br /&gt;
* wav   (See note below. SoundSense only supports &amp;quot;Windows PCM&amp;quot; encoded .wav files)&lt;br /&gt;
* aiff&lt;br /&gt;
* au&lt;br /&gt;
&lt;br /&gt;
Note: Not all .wav files are supported...&lt;br /&gt;
&lt;br /&gt;
SoundSense supports .wav encoded in the &amp;quot;Windows PCM&amp;quot; format. However, some files with the &lt;br /&gt;
.wav extention are actually encoded in some other proprietary format. A sound format &lt;br /&gt;
conversion utility (such as FormatFactory) could be used to fix them.&lt;br /&gt;
&lt;br /&gt;
===Some Tips:===&lt;br /&gt;
&lt;br /&gt;
* Control of Randomness - Each logPattern expression can contain several soundFile &lt;br /&gt;
elements. When it is triggered, one of them is randomly chosen to play. You can control &lt;br /&gt;
the probability of each sound being chosen by adding the weight=&amp;quot;number&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
* Simultaneous Sounds - By default, only one sound will play for a given logPattern, even &lt;br /&gt;
if there are several expression using identical logPatterns. (Only the first expression is &lt;br /&gt;
processed.) But you can allow more than one sound to be played for same pattern by giving &lt;br /&gt;
the first one the haltOnMatch=&amp;quot;false&amp;quot; attribute. They will all start at same time (unless &lt;br /&gt;
one or more of them also has a delay). An example is in Seasons.&lt;br /&gt;
&lt;br /&gt;
* Sequential Sounds - Two (or more) sounds can be played sequentially (one after the &lt;br /&gt;
other) for the same logPattern by using the haltOnMatch=&amp;quot;false&amp;quot; tip above and including a &lt;br /&gt;
delay attribute for one of them with a delay that surpasses the length of the other.&lt;br /&gt;
&lt;br /&gt;
===Helpful files:===&lt;br /&gt;
&lt;br /&gt;
 * packSkeletons.zip ( http://df.zweistein.cz/soundsense/packSkeletons.zip ) - This &lt;br /&gt;
contains .xml files for all known gamelog lines currently without sounds. You can use this &lt;br /&gt;
as a starting point to expand SoundSense.&lt;br /&gt;
 * missingMessages.cmd - Run this program to parse your gamelog.txt file and output all &lt;br /&gt;
lines your sound packs will not recognize.&lt;br /&gt;
 * logging.properties - Edit this file to enable more debug messages from SoundSense. Set &lt;br /&gt;
&amp;quot;.level = ALL&amp;quot; to view a very verbose output.&lt;br /&gt;
&lt;br /&gt;
===Sources of sound &amp;amp; music:===&lt;br /&gt;
&lt;br /&gt;
The following are some sites of interest, should you want additional sounds/music.&lt;br /&gt;
(Websites with free, creative commons, public domain, and/or GNU GPL licensed audio):&lt;br /&gt;
&lt;br /&gt;
http://soundbible.com/&lt;br /&gt;
http://www.freesound.org/searchText.php&lt;br /&gt;
http://www.musopen.org/&lt;br /&gt;
http://opengameart.org/browse/audio&lt;br /&gt;
http://www.incompetech.com/m/c/royalty-free/&lt;br /&gt;
http://ccmixter.org&lt;br /&gt;
http://free-loops.com/&lt;br /&gt;
http://www.pdsounds.org/&lt;br /&gt;
http://commons.wikimedia.org/wiki/Category:Sound&lt;br /&gt;
http://www.archive.org/details/opensource_audio&lt;br /&gt;
http://publicdomainaudiovideo.blogspot.com/&lt;/div&gt;</summary>
		<author><name>Fero14041</name></author>
	</entry>
</feed>