Jump to content

Audio Modding


Corona688

Recommended Posts

Still working blind, here...  I've edited the Rapier engine to use a different switching sound.  I put the sound into GameData\Squad\Sounds and it definitely gets loaded:

[LOG 21:25:12.857] Load(Audio): Squad/Sounds/sound_whump

...but can't be used:

[LOG 21:26:10.359] Cannot assign AudioClip 'sound_whump' to AudioFX

The wav file is 48KHz 16-bit stereo, which I thought was the appropriate kind.

Link to comment
Share on other sites

I don't see any way to attach files to this forum, and doubt you want all 100kb of it spammed here.

Literally all I did was place the .wav file where I mentioned, and text-replace sound-soft-vent like so inside rapierEngine.cfg:

 

        engage
        {
            AUDIO
            {
                channel = Ship
                clip = sound_vent_soft
                volume = 1.0
                pitch = 2.0
                loop = false
            }
        }
        engage
        {
            AUDIO
            {
                channel = Ship
                clip = sound_whump
                volume = 1.0
                pitch = 2.0
                loop = false
            }
        }

I've verified the .wav is 48000 16-bit stereo in VLC.

Edited by Corona688
Link to comment
Share on other sites

Might be something wrong on the export side. Are you using audacity to export the sound file? The first time I tried making custom sounds, I had to play with volume settings a lot, before I could actually hear it in game. For some reason it would play very softly. This was especially true for the engage sound.

Try setting volume = 2.0 or higher to make sure it isn't playing soft. Also remember this gets overlapped with the running_closed/open sound, so it might be getting drowned out.

Edited by Bonus Eventus
Link to comment
Share on other sites

51 minutes ago, Bonus Eventus said:

Might be something wrong on the export side.

To repeat:

8 hours ago, Corona688 said:

I've verified the .wav is 48000 16-bit stereo in VLC.

The WAV in question was downloaded from the internet.  It's not some a weird kind of WAV, it's 16-bit little-endian PCM.

Quote

The first time I tried making custom sounds, I had to play with volume settings a lot, before I could actually hear it in game. For some reason it would play very softly. This was especially true for the engage sound.

It is not a quiet sound.  Also, to repeat:

10 hours ago, Corona688 said:

[LOG 21:26:10.359] Cannot assign AudioClip 'sound_whump' to AudioFX

 

...unless you know this is a false alarm, errors are being logged of the 'cannot do this thing' sort.  What causes this error?

I'll try making the sound mono when I have time later today.

Edited by Corona688
Link to comment
Share on other sites

A lot more can be wrong with an audio file than simply being not 16 bit and a wav file, doesn't mean it's unplayable. Anyways, since you downloaded it off the internet, try opening the file with an audio editor and not vlc (audio player), then export the file to a wav. VLC in my experience will play practically anything even when the file is corrupted. This is a unity error, which means that the audioclip could not be loaded because it is not what was expected. So, download audacity (open source software for any os) open the file and try to export as wav with proper settings. 

Link to comment
Share on other sites

1 minute ago, Bonus Eventus said:

This is a unity error, which means that the audioclip could not be loaded because it is not what was expected.

So it wasn't actually loading it earlier, when it said this?

10 hours ago, Corona688 said:

Still working blind, here...  I've edited the Rapier engine to use a different switching sound.  I put the sound into GameData\Squad\Sounds and it definitely gets loaded:

 


[LOG 21:25:12.857] Load(Audio): Squad/Sounds/sound_whump

 

...but can't be used:

 


[LOG 21:26:10.359] Cannot assign AudioClip 'sound_whump' to AudioFX

 

The wav file is 48KHz 16-bit stereo, which I thought was the appropriate kind.

I know VLC can play almost anything, but the codec information can't lie and still work...  It could be a newer revision of WAV than unity understands, perhaps, or some sort of non-WAV wrapper.

Link to comment
Share on other sites

Re-saving in audacity didn't work.  Yes, saving as a sane 16-bit wav, not a 32-bit float wav, or an MP3-encoded WAV, or an Intel-compressed WAV, or any other funky kind of wav, just a normal 16-bit uncompressed little-endian PCM wav a la 1990.

Mixing to mono didn't work.

Adjusting volume to 2.0 didn't work.

I wish there was more information to report.  It just didn't work.  The error message didn't change at all (well, the filename changed as I changed the filename, but that's it.)

Edited by Corona688
Link to comment
Share on other sites

 

4 minutes ago, Corona688 said:

Re-saving in audacity didn't work.  Yes, saving as a sane 16-bit wav, not a 32-bit float wav, or an MP3-encoded WAV, or an Intel-compressed WAV, or any other funky kind of wav, just a normal 16-bit uncompressed little-endian PCM wav a la 1990.

Mixing to mono didn't work.

Adjusting volume to 2.0 didn't work.

I wish there was more information to report.  It just didn't work.  The error message didn't change at all (well, the filename changed as I changed the filename, but that's it.)

Well, now we know for sure nothing is wrong with the audio file. There's one more thing I can think to try: 

clip = Squad/Sounds/sound_whump

if that fails, try making a new folder in GameData named Test. Inside test create a new folder named Sounds. Place your audio file inside of the new Sounds folder then update the cfg like so:

clip = Test/Sounds/sound_whump

------

Also, what version of the game are you running?  Press Alt + f12 to pull up the debug tools, and see if there are any warnings in the console log (yellow) or errors (red).

Link to comment
Share on other sites

@Corona688,did you consider to use:

 engage
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/sound_whump
                volume = 1.0
                pitch = 2.0
                loop = false
            }
        }

if you trying to change any sound in "ModuleEnginesFX",you need to specify the path to sound you want to use.You can even create your own folder with custom sounds.

Edited by sebi.zzr
apparently i was not typing fast enough XD
Link to comment
Share on other sites

The "cannot assign" is gone!  Progress!

But it still doesn't work.

I'll need to leave shortly.  :( I'll try other suggestions after work today.

[edit]

I tried to be clever and commented out a line when I used the full path.  Now that I just deleted it instead of commented, the sound effect DOES WORK.

THANK YOU!

Edited by Corona688
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...