Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 104

Author Topic: SoundSense: a sound engine for dwarf fortress.  (Read 550913 times)

Prastary

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #30 on: June 29, 2010, 08:14:55 am »

The new version doesnt wish to work for me:

Code: [Select]
D:\Gry\Ironhand 0.41\soundsense>java -cp .\;lib\jl1.0.1.jar;soundSense.jar cz.zw
eistein.df.soundsense.SoundSense ../gamelog.txt config/
29/06/2010 03:14:49.188: SoundSense for Dwarf Fortress is starting...
29/06/2010 03:14:49.198: Loading theme packs from config/
29/06/2010 03:14:49.198: loading directory config/
Exception in thread "main" java.lang.NullPointerException
        at java.util.Arrays.sort(Unknown Source)
        at cz.zweistein.df.soundsense.config.SoundsXML.loadDirectory(Unknown Sou
rce)
        at cz.zweistein.df.soundsense.config.SoundsXML.<init>(Unknown Source)
        at cz.zweistein.df.soundsense.SoundSense.main(Unknown Source)
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #31 on: June 29, 2010, 08:18:12 am »

The new version doesnt wish to work for me:

Code: [Select]
D:\Gry\Ironhand 0.41\soundsense>java -cp .\;lib\jl1.0.1.jar;soundSense.jar cz.zw
eistein.df.soundsense.SoundSense ../gamelog.txt config/
29/06/2010 03:14:49.188: SoundSense for Dwarf Fortress is starting...
29/06/2010 03:14:49.198: Loading theme packs from config/
29/06/2010 03:14:49.198: loading directory config/
Exception in thread "main" java.lang.NullPointerException
        at java.util.Arrays.sort(Unknown Source)
        at cz.zweistein.df.soundsense.config.SoundsXML.loadDirectory(Unknown Sou
rce)
        at cz.zweistein.df.soundsense.config.SoundsXML.<init>(Unknown Source)
        at cz.zweistein.df.soundsense.SoundSense.main(Unknown Source)

oops, change cmd file to:

java -cp .\;lib\jl1.0.1.jar;soundSense.jar cz.zweistein.df.soundsense.SoundSense ../gamelog.txt packs/

did that to r5: http://df.zweistein.cz/soundsense/soundSense_5_14.zip
« Last Edit: June 29, 2010, 08:35:52 am by zwei »
Logged

Lord Herman

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #32 on: June 29, 2010, 08:31:47 am »

I've been playing DF with SoundSense on, and I'm very impressed. I've added a few sounds myself (some were marked for personal use only, so I'm afraid I can't share them), so now the animals I drop into my death pit make a satifying splat, and goblin invasions are heralded with a dramatic 'dun dun DUNNN' chord.

Would it be possible to add specific placeholder tags for use in the XML files, like [dwarf] or [animal] or [enemy]? I'd like to play a wilhelm scream whenever a dwarf dies, but I can't without it also playing when I butcher an animal. Similarly, I'd like to play a ca-ching sound whenever I strike gems or gold or silver, but not when I strike mica or something.
Logged

sphr

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #33 on: June 29, 2010, 09:55:42 am »

Would it be possible to add specific placeholder tags for use in the XML files, like [dwarf] or [animal] or [enemy]? I'd like to play a wilhelm scream whenever a dwarf dies, but I can't without it also playing when I butcher an animal. Similarly, I'd like to play a ca-ching sound whenever I strike gems or gold or silver, but not when I strike mica or something.

former is hard, since stuff are named.  Unless you consistently name your dwarves in a fashion that is identifiable from the rest.

the latter is easy.
use the pattern "You have struck ($$$)!"
replace $$$ with the stuff you want kac-ching... multiple separate using |

e.g.
Quote
   <sound logPattern="You have struck (diamond|sapphire|levin opal|native gold|native aluminium)!">
      <!-- http://soundbible.com/333-Cash-Register-Cha-Ching.html -->
      <soundFile fileName="./mp3/Cash Register Cha Ching-SoundBible.com-184076484.mp3" />
   </sound>

@zwei Thanks for the alternate dl!

Lord Herman

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #34 on: June 29, 2010, 10:15:58 am »

Thanks, sphr! I'll try that.
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #35 on: June 29, 2010, 03:07:18 pm »

... wilhelm scream ...

Okay, I was intrigued and did some searching. http://www.youtube.com/watch?v=_PxALy22utc&feature=related - cool!

It has, of course, become parth of death pack since it is in public domain :) - http://www.archive.org/details/WilhelmScreamSample

As far as animals go, you can use theese:

A (horse|dog|...etc) has been struck down\.

and then:

(.+) has been struck down\.

engine only plays first sound it can match (possibly flaw?), so you can "mask" stuff. You could also use some regular expression to filter out the animals.

sphr

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #36 on: June 29, 2010, 04:50:54 pm »

corrected some stuff and put up a more "complete" battle sound pack.. for "demo" purposes only (no updated guaranteed, just something to get people started)

http://dffd.wimbli.com/file.php?id=2600

included some sounds I edited together from the originals in soundbible.  prob won't recognize them... can replace with your own while keeping the rules in xml.

Features:

a) able to tell how well an attack goes : an attack that is blocked will sound different from an attack that lands which will be different from one that crushes bone.  Used best if you use soundsense as a log reader (prob for people with large screens or >1 monitors).  You will then be delighted by the almost TOTAL INEFFECTIVENESS of non-metal ammo vs armored goblins.  I was informed by soundsense of the ONLY attack I EVER had working against goblins using wood/bone ammo, is when it got lucky and shot off a ear.

b) also features some nasty irritation when you have lots of melee combat going on on a fast machine/game.  Ranged seems better paced prob due to "need to reload".  Melee could have a lot of attacks happening in a short while.  If you have problem, you are either recommented to comment out some rules from battle.xml, or replace the mp3 with even shorter/quieter or even silent sounds.

If you find this useful/fun, thank zwei, not me :)

Itnetlolor

  • Bay Watcher
    • View Profile
    • Steam ID
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #37 on: June 30, 2010, 12:15:16 am »

Does this work for 40d?

I tested it out and no sound. I don't know if I'm doing anything wrong.

kaypy

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #38 on: June 30, 2010, 08:45:26 am »

b) also features some nasty irritation when you have lots of melee combat going on on a fast machine/game.  Ranged seems better paced prob due to "need to reload".  Melee could have a lot of attacks happening in a short while.  If you have problem, you are either recommented to comment out some rules from battle.xml, or replace the mp3 with even shorter/quieter or even silent sounds.
What I did in my old python implementation was add a configurable delay to each sound, where the sound would not be replayed for that period. So it would skip the repeated sounds in a battle, for example.
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #39 on: June 30, 2010, 09:22:44 am »

Does this work for 40d?

I tested it out and no sound. I don't know if I'm doing anything wrong.

Theoretically, it should be compatible with pretty much any DF version as messages tend not to change and neither does its method of logging.

Could you be more specific? Will display new lines in gamelog.txt? Did you try it with DF2010 and did it work there? Does it end with some kind of error message?

b) also features some nasty irritation when you have lots of melee combat going on on a fast machine/game.  Ranged seems better paced prob due to "need to reload".  Melee could have a lot of attacks happening in a short while.  If you have problem, you are either recommented to comment out some rules from battle.xml, or replace the mp3 with even shorter/quieter or even silent sounds.
What I did in my old python implementation was add a configurable delay to each sound, where the sound would not be replayed for that period. So it would skip the repeated sounds in a battle, for example.

That is possible, I myself thought of differet approach: Engine would count concurently played sounds and if there is more than 10 (or some other configurable number), it would drop new sounds that are marked with concurency="10" (more than 50 would drop sounds with concurency="50" and lower).

Ideally, you could then put combat sounds to low concurency along with other spammy anoucements (like interrupted or masterpiece messages which could have just concurency of 1 meaning that they would be played only if no other non-music sound is played) and give high-importance sounds high concurency.

I also hope that when people take full advantage of fact that you can define a lot of alternate sounds for each event, this would be less of issue as sounds would be less repeated.

corrected some stuff and put up a more "complete" battle sound pack.. for "demo" purposes only (no updated guaranteed, just something to get people started)

http://dffd.wimbli.com/file.php?id=2600

Thank you :), good job!
« Last Edit: June 30, 2010, 09:29:56 am by zwei »
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #40 on: July 01, 2010, 01:36:40 am »

New release, r6: http://df.zweistein.cz/soundsense/soundSense_6_19.zip

Added "concurency" thing i was talking about, for now only at "cancels ... Interrupted by" sound.

Also, logging level is now configurable at logging.properties file (put "ALL" instead of "INFO" to see more debug messages)

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #41 on: July 01, 2010, 07:42:49 am »

New release, r7: http://df.zweistein.cz/soundsense/soundSense_7_24.zip

Added speech synthetiser.

Osdeath

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #42 on: July 01, 2010, 08:30:27 am »

"Java.io.filenotfoundexception: ..\gamelog.txt <the system cannot find the file specified>"

Now i stuck it in the main dwarf fort folder, loose, was i meant to put it in it's own folder or something, i can see gamelog.txt is there, just it doesn't appear to notice it, newest release, downloaded it like, 4 minutes ago :P

edit : Dwarf fort 31.08 btw
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #43 on: July 01, 2010, 08:37:52 am »

"Java.io.filenotfoundexception: ..\gamelog.txt <the system cannot find the file specified>"

Now i stuck it in the main dwarf fort folder, loose, was i meant to put it in it's own folder or something, i can see gamelog.txt is there, just it doesn't appear to notice it, newest release, downloaded it like, 4 minutes ago :P

edit : Dwarf fort 31.08 btw

yep, put it in its own folder in df, it expects gamelog.txt to be one folder above soundSense.cmd

or you can edit soundSense.cmd and change ..\gamelog.txt to gamelog.txt

Osdeath

  • Bay Watcher
    • View Profile
Re: SoundSense: a sound engine for dwarf fortress.
« Reply #44 on: July 01, 2010, 09:44:37 am »

Cheers, works fine (technically) just the music from the "seasons" pack just descends into stuttery music a second or so after i open dwarf fort, shame really, it's nice music when i have dwarf fort paused anything possible to be done about it, or is it just my machines general incompetence to run df and the music at once?

edit : ignore me, set java priority to above normal and it works fine, i really should think of these things before i post.
« Last Edit: July 01, 2010, 09:46:08 am by Osdeath »
Logged
Pages: 1 2 [3] 4 5 ... 104