Tractor Mod

Tractor Mod

367k Downloads

[Content Patcher] Patching audio loses pitch variations

slserpent opened this issue ยท 2 comments

commented

Describe the bug
Modifying the audio files with Content Patcher makes it so that the sounds will no longer play at random different pitches.

If there is a way to define pitch settings in Content Patcher, I can find no mention of it. So, I'd just assume that it would use the original pitch settings for the sound event otherwise.

To Reproduce

  1. Make a mod to patch a sound file.
  2. Change a sound cue that uses pitch originally.
  3. Put a sound file in assets that you can clearly hear pitch changes in, like a basic sine tone.
  4. Load up the game and listen to the sound only play at its default pitch.

Here's a mod that changes chest sound to a sine tone:

{
	"Format": "2.5.0",
	"Changes": [{
		"Action": "EditData",
		"Target": "Data/AudioChanges",
		"Entries": {
			"QuietChest": {
				"Id": "openChest",
				"Category": "Sound",
				"FilePaths": [ "{{AbsoluteFilePath: assets/tone.wav}}" ],
				"StreamedVorbis": false,
				"Looped": false
			}
		}
	}]
}

Log file
Don't think you'll see too much in the log, only that the mod I was testing with (Quieter Chests) loaded. There are no other mods present.

https://smapi.io/log/835dab61ea5a4949957d4d5ad39eec8e

commented

Hi! That's an issue with the base game rather than Content Patcher. The pitch variable is part of the underlying XACT audio cue, it's not a separate feature you can apply to any audio.

I don't know if anyone has looked into loading a custom audio file with pitch settings yet. I suggest asking in #making-mods-general on the Stardew Valley Discord, so you can get input from other mod authors who either (a) may have done something similar or (b) may have more expertise with audio editing.

commented

Oh, okay. I thought that was probably the case but just wanted to check in case it was anything your mod could fix. Should probably have a note about this limitation somewhere in the documentation, though, i.e. https://stardewvalleywiki.com/Modding:Audio.

Thanks for the input.