Author Topic: [Beta release] Ultrasound - sound effect replacement/addition mod  (Read 41065 times)

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
A new topic seems to make sense to me so I can update post 1 with download links as and when.

So, Ultrasound v0.42: http://www.ficedula.co.uk/voices/Ultrasound_0_42.zip

Changes since v0.41:
-Added 7H plugin support

Changes since v0.4:
-Support for voicing choices on popup/selection

Changes since v0.3:
-OpenAL output
-OGG support
-Support selecting audio files based on party members

Changes since v0.2:

-Lower latency on sound playback
-Fix a few crashes
-Add Pan and Volume properties to sounds
-Add Ambient sounds, optionally looping


How to use the options:

See audio\Ultrasound.xml in the download ;) But to go into detail:

Ambient sounds are sounds that are triggered to play not because FF7 was playing a sound effect, but because some variable in the game (so far - FieldID or PPV) changed.
Currently only one ambient sound is playing at a time - whenever the FieldID/PPV changes, Ultrasound checks its list of ambient sounds, and finds the first one whose conditions match. It stops any sound that's already playing, and then plays the new sound (if any!).

(The only kind-of exception so that is that if the new sound filename is the same as the old one, it just updates the existing sound with a new pan/volume - it doesn't actually stop and then start the same sound playing.)

So, for example;

  <Ambient FieldIDs="195" Loop="true">ultrasound\rain-heavy.mp3</Ambient>
  <Ambient FieldIDs="202" Loop="true" Volume="0.5">ultrasound\rain-heavy.mp3</Ambient>

  ...if FieldID is 195, it plays the rain-heavy file (on loop). When you go into FieldID 202 (which is indoors), it carrys on playing the same sound, but at 50% volume.
  If you need to set a pan, an attribute called Pan sets the panning; 0 = Full left, 1 = Full right, 0.5=Middle (default). It won't have any effect on stereo files though!

  You can set Volume on replacement sound effects, but Pan won't work - Ultrasound uses whatever pan FF7 has set on the sound instead.
« Last Edit: 2015-12-13 12:14:27 by ficedula »

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Uploaded v0.35: http://www.ficedula.co.uk/voices/Ultrasound_0_35.zip

Changes:

-Triggers voice files based on dialogue IDs correctly, not text comparison
-Supports multiple ambient sound effects playing at once

For the last feature, the way it works is that <Ambient> entries in the configuration file can have a Group attribute set against them, e.g.

Code: [Select]
  <Ambient FieldIDs="195" Group="1" Loop="true">ultrasound\blip2.mp3</Ambient>

If you don't set the group ID, it defaults to zero (0). When deciding which ambient sound effect(s) to play the program uses the first valid ambient sound effect it finds from each possible group. So for an example:

Code: [Select]
  <Ambient FieldIDs="195" PPVs="191" Loop="true">ultrasound\rain-heavy.mp3</Ambient>
  <Ambient FieldIDs="195" Loop="true" Volume="0.5">ultrasound\rain-heavy.mp3</Ambient>
  <Ambient FieldIDs="195" Group="1" Loop="true">ultrasound\blip2.mp3</Ambient>

The first two ambient effects have no group ID set, so they belong to group 0. When you go into field ID 195 (which is mrkt2) Ultrasound looks at these effects, and because the first two belong to the same group, it will only play one of them (it decides based on the PPV in this case - if PPV=191, it plays the first one, otherwise, the second one).

However the third effect belongs to a different group so it will also play this effect and you'll end up with two ambient effects playing. Hopefully that makes sense.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Uploaded v0.37: http://www.ficedula.co.uk/voices/Ultrasound_0_37.zip

-Fix choices showing under wrong dialogue ID
-Added logging option as per Shard's request

Shard

  • *
  • Posts: 330
    • View Profile
I'm having trouble getting Ultrasound to do anything. I changed the config to find the VoiceHook.dll and data folders, it runs FF7 when I click Go, but no sounds get played (not even the ones you recorded), and no logging happens.

I installed using the original 1998 discs, plus whatever Bootleg does to the exe. The exe has probably also been changed by TouphScript.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Tricky to work out exactly what's happening when the problem is that nothing's happening... ;)

Can you upload your EXE somewhere and PM me a link - so I can try with your exe and see if the same happens for me?

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
"Whatever Bootleg does to the exe" is awfully vague, too. It can do a number of things, some of which are automatic, some not. Tell me what settings you had and I'll tell you what changed.

Shard

  • *
  • Posts: 330
    • View Profile
I'm running more or less the default options from Bootleg (no gameplay modifications, just models/textures). I'm pretty sure it only applied the automatic patches. I think the only option I changed from the defaults was the materia model/texture.
« Last Edit: 2014-11-13 08:55:23 by Shard »

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
1.02 Patch and probably the outdated Menu Overhaul, then.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
I'm having trouble getting Ultrasound to do anything. I changed the config to find the VoiceHook.dll and data folders, it runs FF7 when I click Go, but no sounds get played (not even the ones you recorded), and no logging happens.

I installed using the original 1998 discs, plus whatever Bootleg does to the exe. The exe has probably also been changed by TouphScript.

Hm, your exe works fine with Ultrasound for me, so it's not any of the patches you've applied.

Do you not get any sounds at all, not even the standard ones...? That suggests your configuration is broken somehow.

Alternatively, try using Debugview - http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx - and see what messages get output when you run the game through Ultrasound.

Shard

  • *
  • Posts: 330
    • View Profile
I get the regular game sounds, just not the ones you setup in your Ultrasound package (the guy near the inn and the boy looking at the cat statue).

This is the DebugView output. I ran the game, loaded a save at Wall market, walked over the save point a few times, talked to the cat boy and the guy near the inn, then closed the game.

I recorded my monitor while doing it as well. YouTube.

Code: [Select]
[1452] SHIMVIEW: ShimInfo(Complete)
[1452] WM_ACTIVATEAPP
[1452] INITIALIZE DD/D3D START
[1452] WM_ACTIVATEAPP
[1452] WM_ACTIVATEAPP
[1452] FF7AlwaysRunKranmer.dll
[1452] FF7anyCDv2.dll
[1452] Hext.dll
[1452] MIDI set volume trans: 127->0; step=60
[1452] MIDI stop
[1452] reading midi file: ROCKET.mid
[1452] MIDI stop
[1452] END UNINITIALIZE DD

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
That's pretty uninformative :/  If I had to guess it looks like it's not loading the VoiceHook.dll library properly; you're completely sure the path to the DLL in the config file is correct?

If so, I'll have to put a new release out with more logging to try and track this down.

Shard

  • *
  • Posts: 330
    • View Profile
So, it turns out Avast (antivirus) blocks dll injections. I had to add an exception for the dll specifically. Now, the ambient and menu sounds (piano tones) play, but dialogue still does not play. Ultrasound is detecting the voice files are being found and says they're being played, but they aren't actually playing.

In any case, the logging does work, and that's what I really needed for the project at the moment. LMK if you think of any reason the voice files aren't playing.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Well, glad you got the DLL working anyway ... only difference that comes to mind between the dialogue and ambient sounds is that the dialogue is in WAV files, but the ambient/SFX files are MP3s. Can't think of an obvious reason why the WAVs would be problematic, but I guess it's possible.

TBH, I'd expect we'd want to use MP3 or OGGs for distributing things anyway, so it's not the end of the world if the wav decoder I'm using isn't working completely reliably.

Shard

  • *
  • Posts: 330
    • View Profile
Found a bug. Ultrasound crashes right before the bike minigame in Midgar, right as the game's giving you the controls.

I haven't been able to check the other minigames yet.

EDIT: It looks like it's not the minigame itself, but the boxes that pop up before it. I'm getting a lot of crashes in places where multiple windows pop up at the same time, including
  • Bike minigame explanation
  • Explanation of Mr. Dolphin segment
  • Junon soldier training and minigame
  • Shera's flashback in Rocket Town (when the countdown for the rocket starts)
  • The "sephiroth enters Nibelheim" scene in the Tifa+Cloud Lifestream
« Last Edit: 2014-11-25 23:25:20 by Shard »

Ayara

  • *
  • Posts: 1
    • View Profile
I don't assume Ultrasound works for FF8, does it? If not, is there any project out there that does something similar?

Shard

  • *
  • Posts: 330
    • View Profile
The FF8 voiceover project is in development. It doesn't use an external tool to play the sounds, though. They're all built into the game instead.

You can use FF8Audio to replace FF8's sound effects.
« Last Edit: 2014-11-28 15:27:35 by Covarr »

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Found a bug. Ultrasound crashes right before the bike minigame in Midgar, right as the game's giving you the controls.

I haven't been able to check the other minigames yet.

EDIT: It looks like it's not the minigame itself, but the boxes that pop up before it. I'm getting a lot of crashes in places where multiple windows pop up at the same time, including
  • Bike minigame explanation
  • Explanation of Mr. Dolphin segment
  • Junon soldier training and minigame
  • Shera's flashback in Rocket Town (when the countdown for the rocket starts)
  • The "sephiroth enters Nibelheim" scene in the Tifa+Cloud Lifestream

Hm, OK. In theory that should be able to fix once I can see it happening on my PC: do you happen to have a savegame close to the location of one of the crashes?

Shard

  • *
  • Posts: 330
    • View Profile
I sure do!

http://www.mediafire.com/download/3ts9a6t58okjuw5/save.zip

You should try the airport passage saves. You shouldn't have to play very far until you get to the crash points.

I can upload other saves for the other crashes, but I'm pretty sure it's a single problem.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Annoyingly it doesn't crash for me.

Can you clarify - when you say Ultrasound crashes, are you seeing the Ultrasound window crash & disappear, but FF7 keeps on running? Or FF7 crashes as well?

Shard

  • *
  • Posts: 330
    • View Profile
FF7 keeps running. The Windows WERFault thing comes up and tells me Ultrasound has stopped running.

I'm running on Windows 8 64 bit.

Shard

  • *
  • Posts: 330
    • View Profile
We found a snag. There are some lines that multiple characters give depending on who's in your party which all share the same text window (eg in the Gold Saucer play, every one of the potential dates has some lines). Will we have a way to play a different sound effect based on who's in the party, or will we have to find another workaround?

Also, FF7 has a text macro for {PARTY1}, {PARTY2}, and {PARTY3} which will obviously be impossible to voice over individually.
« Last Edit: 2014-12-22 01:42:17 by Shard »

meesbaker

  • *
  • Posts: 324
    • View Profile
You just have to add a small if clause to the script when calling the dialogue to get who is in your party and call the sound effect accordingly. For the protagonist's names you have to record every possible statement and add every possible text to the scene and replace the script command calling the dialogue with a variable in it by another slightly more complex if structure.

Shard

  • *
  • Posts: 330
    • View Profile
We wanted to do this without modifying the game's scripting because it causes lots of incompatibilities with some other mods.

meesbaker

  • *
  • Posts: 324
    • View Profile
Oh, I see. In that case I fear that there is no good way around this other than altering the texts removing all variable content so it doesn't matter who says it. For the first issue you probably have to replace all those statements by text that the party leader speaks.

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Isn't it possible to determine the character by the field model file? The other solution might be to get information about the party constellation.