Bay 12 Games Forum

Please login or register.

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

Author Topic: SoundCenSe, a c# port of SoundSense  (Read 80354 times)

Algorithman

  • Bay Watcher
    • View Profile
SoundCenSe, a c# port of SoundSense
« on: July 22, 2016, 02:22:35 pm »

Hello fellow beer drinkin', axe wieldin' dwarves.

Let me present you a c# port of SoundSense.
SoundCenSe v1.4.3
Now for Win32, Linux and soon also for OSX!

Spoiler: Screenshot Windows (click to show/hide)


Spoiler: Screenshot OSX (click to show/hide)

It's a tight port, using the existing sound pack files/xml's, but with some enhancements.

Enhancements:
  • Change volume on each sound channel (SFX, music, weather, swords and trade) independently
  • Switch to the next music
  • Disable/enable individual sounds
  • No configuration of Dwarf Fortress gamelog path needed on Windows (linux needs it, OSX probably too)
  • On connecting to a dwarf fortress' gamelog SoundCenSe parses the existing log for last weather and music entries to play right away

Release notes:

System requirements:

Windows:
If SoundCenSe doesn't seem to start (nothing happens when you open it), check the Log.txt file, there the url's will be provided too.
After installing gtk-sharp, a reboot might be needed even the installer doesn't tell you so.

Linux: (Debian)
  • mono-complete
  • gtk-sharp2


Installation is quite easy:

* Only needed at first start or when you want to update, linux users might need to change the Configuration.json file, setting gamelogPath to "", then try again. I'll fix this in the next version, promised!

If you find any bugs or have any ideas how i can make it better, please do not hesitate to tell me :)


Credits: Thanks Zwei, for your formidable work on SoundSense
FMOD for their audio library

And as always: Have fun!



PS: Latest version (1.4.3) should fix the problems with Win10 crashes

 
« Last Edit: July 08, 2017, 02:51:32 pm by Algorithman »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SoundCenSe, a c# port of SoundSense
« Reply #1 on: July 23, 2016, 08:07:45 am »

For the uninitiated, could you explain is simple words how this is different from the normal soundsense and what makes it better?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Algorithman

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #2 on: July 23, 2016, 08:40:31 am »

I edited the first post to emphasize the enhancements.
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #3 on: July 23, 2016, 11:02:09 am »

Those are some pretty rockin enhancements, particularly the "no Java" part :)

Being able to tone down rain noise will be a huge plus, as it gets annoying really fast.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Algorithman

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #4 on: July 24, 2016, 07:27:27 am »

Updated to v1.2 because of a fixed memory leak.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #5 on: July 24, 2016, 03:28:06 pm »

Those are some pretty rockin enhancements, particularly the "no Java" part :)
Yeah, but the downside to that is the Windows-only part.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

SatelliteOfLove

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #6 on: July 24, 2016, 08:48:25 pm »

Those are some pretty rockin enhancements, particularly the "no Java" part :)
Yeah, but the downside to that is the Windows-only part.

Algorithman, how heavily does this depend on Windows-only components?  Do you have any idea how much work would be required to get this running on Mono?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #7 on: July 24, 2016, 11:17:18 pm »

I've had pretty bad luck with Mono in the past. But who knows, maybe it's improved.

To be fair, I really don't care for Java either, but it's hard to find a similarly portable solution, let alone one that doesn't require access to every platform to build on.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Algorithman

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #8 on: July 24, 2016, 11:41:05 pm »

Hi SatelliteOfLove and lethosor

as for windows dependency:

1. its a winforms, should be able to get this to GTK without much problems (didn't do much with GTK lately, so i just assume its gotten better ^^)
2. I did the threading with Task.Parallel. I do not know if mono supports that, but that also should be doable to port to normal threading model.(I only use Task.Factory.StartNew)
3. The audio library, the biggest problem: NAudio relies on windows dll's. I would need to find a replacement lib which supports sample output, sample mixing, sample volume change, mp3 and ogg file readers. There might be a way, i'm reading into http://www.ambiera.com/irrklang/ atm, looks very promising.
4. Method of disovery where DF runs. Probably have to do it via configuration only.

So overall it should be doable.

Another thing is to figure out if i can do it in one solution/repo or if i have to maintain two different ones.
But that's only how to organize things.


edit: good news, gtk# has no dependency to mono, i'm going to work this evening :)
edit2: better news, mono has winforms compatibility (something went by me unnoticed...)
 
« Last Edit: July 25, 2016, 10:52:44 am by Algorithman »
Logged

Algorithman

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #9 on: July 25, 2016, 12:06:12 am »

Another thing:

I do log messages which have no representation yet in the sounds xmls.
In another thread there is talk about DFHack output which is not yet processed.
In the next few days i will put up either a mail addy or a page where the 'missing.txt' can be posted. Since i normally only play fortress mode, i do not yet know if something is missing in adventure mode.
Logged

Algorithman

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #10 on: July 25, 2016, 12:22:54 pm »

Wow, harder than i thought to find a c# wrapped audio library which works cross platform. There are a few candidates, but none did strike me as usable yet. But i'm hanging on.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #11 on: July 25, 2016, 02:03:57 pm »

To be fair, I really don't care for Java either, but it's hard to find a similarly portable solution, let alone one that doesn't require access to every platform to build on.
Python?
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #12 on: July 25, 2016, 03:16:39 pm »

No! No Python!

Python has one HUGE problem, it's really slow. Anyone who uses Python for developing "real" applications is asking for performance trouble down the line.

.NET and JVM are OK (but not the best) because they use JIT native compilation or similar to get almost native speeds, but Python just uses a straight VM with all the performance problems that implies.

If you can't compile to native code, you have way too much overhead for large apps. The worst part is that the slow kinda sneaks up on you, and by the time you realize it's too slow it is too late to change.

Most Python apps have the most performance critical parts written in C (although most Python programmers just use the libraries and never realize this), if it was all Python it would never be fast enough.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Maltavius

  • Bay Watcher
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #13 on: July 25, 2016, 03:34:07 pm »

No! No Python!

Python has one HUGE problem, it's really slow. Anyone who uses Python for developing "real" applications is asking for performance trouble down the line.

.NET and JVM are OK (but not the best) because they use JIT native compilation or similar to get almost native speeds, but Python just uses a straight VM with all the performance problems that implies.

If you can't compile to native code, you have way too much overhead for large apps. The worst part is that the slow kinda sneaks up on you, and by the time you realize it's too slow it is too late to change.

Most Python apps have the most performance critical parts written in C (although most Python programmers just use the libraries and never realize this), if it was all Python it would never be fast enough.
SoundSense isn't that demanding nor critical.

Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: SoundCenSe, a c# port of SoundSense
« Reply #14 on: July 25, 2016, 03:40:52 pm »

Yes, that's what everyone says just before their app slows down...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS
Pages: [1] 2 3 ... 8