TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 11 of 11

Thread: Messing with SS1 digifx.res file

  1. #1
    Member
    Registered: Apr 2002
    Location: Third grave from left.

    Messing with SS1 digifx.res file

    Well, it is this time of year again ... the one where i play SS1 ... again. However, some of the noise levels are getting on my nerves. So, tried to hunt down and fix/eliminate the most annoying ones and ...

    A standalone .html formed: https://pastebin.com/nzNDTehL
    * shows the chunk ID, chunk type and content type
    For "Sound effect" chunks also:
    * the frequency and length of the sample
    * can play the sound fx files from inside the res file
    * download them as .wav files (original frequency, 16 bit from original 8 bit, 0.25 gain)
    * supress a sound effect (halves the amplitude)
    * kill a sound effect (completely silences it. radiation noise - i am looking at you)
    * redownload the modified res file

    Note:
    Place the .html to where your digifx.res file is (and do back up the original).
    Should not have anything recent/fancy in the javascript - should work with any browser. Definitely works with firefox.

    Thougths:
    The sound quality is a lot worse in the game than when played through the .html player or .wav files - especially when i halve the amplitude (supress). Very odd :/. I blame SS1, as the original sounds are considerably worse ingame also.
    Never found the most irritating sound that inspired me to start hunting for it - the random and very loud rattle sound. No idea where that is coming from.
    What the hell is 0xE7 and 0x13A? Is 0xE7 used in game?
    Last edited by zombe; 4th May 2017 at 14:07. Reason: Oh, might be a good idea to actually give the darn link also

  2. #2
    Member
    Registered: Dec 2003
    Location: Location, Location
    I actually posted a thread a few years ago on 0x13A because I'd never heard it before, and was swiftly corrected by ZylonBane. That sound appears in the "Wing 0" minigame, the Wing Commander knockoff. Don't remember 0xE7 though.

    Weird that you're experiencing a significant drop in sound quality in-game, because I notice nothing of the sort on my end. Misconfiguration issue perhaps? That might account for the irritating rattle noise you're hearing; could be some corrupted version of another sound.

  3. #3
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Weird how memory works - i could have sworn 0x13A is nowhere in game, but now that you mentioned it i actually distinctly remember it being in Wing 0.

    0xE7 sounds very familiar, i am fairly confident it is SOMEWHERE in the game, but cannot pinpoint it.

    For an example of the rattle noise: https://www.youtube.com/watch?v=UbI9AmzjEIk @ 11:35 It is much louder for me.

    It seems to be part of the music, but without the volume slider having any effect on it (my slider is even closer to 0 than the LP linked). On the other hand - the music should be midi only, that sound does not look like midi. In short - no idea what is up with that.

    Quality drop manifests as one would expect from simplistic/bad resampling that needs to happen before sent to sound card. I doubt SS does anything more complex than just duplicating samples to fill the assumed target of ~44KHz (doubling / quadrupling from source). No idea what options there are that could affect it (SS enhanced edition) - i am using default options. It does not bother me when playing, just that is is very noticeable when i compare them back-to-back with the .html player and ingame.

  4. #4
    Administrator
    Registered: Oct 2000
    Location: Athens of the North
    The html file is really great - well done. It doesn't work in Chrome as it blocks the cross-origin request when loading the file but Firefox is fine. Sound 0xE7 does seem strange - reverse it, speed it up by ~30% and it sounds... German?

  5. #5
    Member
    Registered: Dec 2003
    Location: Location, Location
    Quote Originally Posted by zombe View Post
    For an example of the rattle noise: https://www.youtube.com/watch?v=UbI9AmzjEIk @ 11:35 It is much louder for me.

    It seems to be part of the music, but without the volume slider having any effect on it (my slider is even closer to 0 than the LP linked). On the other hand - the music should be midi only, that sound does not look like midi. In short - no idea what is up with that.
    Yes, that is indeed the music. If you grab a MIDI of the reactor track (Shock04.mid in any decent collection), you'll hear it happen in the same spot. The volume might be different, because I don't remember it being nearly that loud, but that's definitely being made by the track. It's a rapid series of notes played by the piano instrument, so it might have been meant to be something different in its original form (since piano is the typical default if an instrument wasn't correctly mapped in a conversion process).

    I only ever play with Sound Blaster FM synthesis music so I don't have to deal with that weirdness.

    EDIT: This was the thread I made 10 years ago about those two audio clips. The links are long dead, but they were the same two clips you brought up.
    Last edited by Trance; 7th May 2017 at 13:44.

  6. #6
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Played some more SS - it's still a darn enjoyable game. Went an unusual (for me) path through the early levels which caused some thrilling ammo shortages - lovely. I am perceiving unusually high respawn tho - or just getting RNG-smacked or deluded.

    PS. screw the lightsaber - i am not touching that thing.

    Was not in the mood to experiment with sound today, but:
    Pretty sure now that the drop in sound quality is caused by unfortunate order of amplitude rescaling. SS just can not do sound properly when volume is close to 0, the precision just destroys the sound as its first step. Must scale final mixing at OS level - which is a major PITA ...
    Further testing needed: each sound effect seems to have 3 separate byte sized parameters in digiparm.bin, i bet one of them is gain (as surprisingly .VOC format does not have that buit in). Changing that might have a better result of suppressing annoying/loud sound effects (the .html way of killing the radiation and suppressing some of the doors was effective, but impacts the sound quality considerably).

    Quote Originally Posted by Al_B View Post
    It doesn't work in Chrome as it blocks the cross-origin request when loading the file but Firefox is fine.
    Doh! Nice to know. Not sure how one would justify that security feature - surely only the user can store the file. Does chrome cache the files openly in plain text (i know IE had that problem)?

    Quote Originally Posted by Trance View Post
    Yes, that is indeed the music. If you grab a MIDI of the reactor track (Shock04.mid in any decent collection), you'll hear it happen in the same spot. The volume might be different, because I don't remember it being nearly that loud, but that's definitely being made by the track. It's a rapid series of notes played by the piano instrument, so it might have been meant to be something different in its original form (since piano is the typical default if an instrument wasn't correctly mapped in a conversion process).
    Hm. Perhaps a bad midi bank then - sounds plausible. The instrument not being quite the right one might explain the volume problem also. Can one substitute some alternate midi bank for SS?

    Quote Originally Posted by Trance View Post
    I only ever play with Sound Blaster FM synthesis music so I don't have to deal with that weirdness.
    Um.. could you elaborate? That does not ring a bell / flew over my head.

  7. #7
    Administrator
    Registered: Oct 2000
    Location: Athens of the North
    Quote Originally Posted by zombe View Post
    Doh! Nice to know. Not sure how one would justify that security feature - surely only the user can store the file. Does chrome cache the files openly in plain text (i know IE had that problem)?
    I imagine it's to stop a html file being opened from an email attachment or similar which then allows scripts in the file accessing your hard drive. Of course, it's no more or less serious than someone running an executable that's been sent.

    It can be made to work in Chrome - starting Chrome with the "--allow-file-access-from-files" command line option works so there's nothing inherently stopping your page working other than browser security measures.

  8. #8
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Quote Originally Posted by Al_B View Post
    I imagine it's to stop a html file being opened from an email attachment or similar which then allows scripts in the file accessing your hard drive.
    Ah, yeah, that kind of makes sense. It protects other programs that might spawn Chrome to run unsolicitedly stored html files.

    Jeah noticed "--allow-file-access-from-files" when Googling for the reason ... i wonder, does that allow non-user select for the File interface?

  9. #9
    Member
    Registered: Dec 2003
    Location: Location, Location
    Quote Originally Posted by zombe View Post
    Um.. could you elaborate? That does not ring a bell / flew over my head.
    I played under DOSBox so I don't know how configurable the Night Dive editions of System Shock are, but I don't use any form of General MIDI for the music like you're doing. You can set DOSBox up to emulate a Sound Blaster card with FM synthesis music. It will sound drastically different, but I use it because it's what I always used to hear on my actual DOS machine playing it in the '90s (it had a Sound Blaster 16 card in it). The rattling noise doesn't appear in that version.

  10. #10
    Member
    Registered: Mar 2001
    Location: Melbourne, Australia
    Having just this past week playing System Shock I can say that that the music sounds wayyyyyyyyyyyy better under dosbox than in the "enhanced" edition.

    That said, some of the tracks sound great, but at the same time a few of them just sound off.
    Last edited by icemann; 24th May 2017 at 06:04.

  11. #11
    Member
    Registered: Mar 2001
    Location: Melbourne, Australia
    I've been asked by dertseha of the systemshock.org forums to relay a message:

    Hello there!

    I've seen an exchange on the TTLG forums (thread: http://www.ttlg.com/forums/showthread.php?t=147838 in which you took part) about sound parameters in a binary file of SS1 (Post #6 , about digiparm.bin).

    May I ask you to relay that I followed up on this hunch and zombe is correct, sounds are attenuated through parameters of this file. Details of my tests are described here: https://github.com/inkyblackness/ss-specs/issues/56 . Perhaps zombe spent more time already on this and wants to pitch in further information for the final documentation.

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •