Birds fly. Sun shines. And brother? Brutes shoot people.

Possibly converting a small MP3 file into uax?

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: ividyon, Semfry, zYnthetic

User avatar UBerserker
Nali Priest Nali Priest
Posts: 7565
Joined: 11 Nov 2007, 21:00
Contact:

Subject: Possibly converting a small MP3 file into uax?

Post Posted: 27 Jun 2016, 12:25

To wav and then into uax, viable/possible? Or do I really need wavs?
I really don't understand how importing sounds work and what's the acceptable quality for them to work in the game without them getting screwed up.
Image

User avatar Jet v4.3.5
Skaarj Elder Skaarj Elder
Posts: 1239
Joined: 24 Dec 2007, 17:40
Contact:

Subject: Re: Possibly converting a small MP3 file into uax?

Post Posted: 27 Jun 2016, 15:30

UBerserker wrote:To wav and then into uax, viable/possible? Or do I really need wavs?
I really don't understand how importing sounds work and what's the acceptable quality for them to work in the game without them getting screwed up.


I can't really speak to any other process other than converting through Audacity, so I'll give a brief rundown for what you need to do. If you have other software, you can probably do similar things to get your sound working.

Here's what you usually start with:
  • .mp3
  • Stereo
  • 44100 Hz
  • 32-bit Float

Here's what you need to get to for importing into Unreal:
  • .wav
  • Mono
  • 22050 Hz
  • 16-bit PCM

In Audacity, this is simple. If you have the sound opened up, I'll start from there.

Select your stereo track. Up in the main menu bar, select Tracks->Stereo Track to Mono. To get the sample rate down, click the dropdown arrow on title bar for the track, go to Sample Rate, and switch it from 32-bit Float to 16-bit PCM. Lastly, ensure you track is selected and in the menu bar, select Tracks->Resample. In the window that pops up, click the dropdown and select 22050 Hz, then click OK.

So now you can select File->Export..., ensure that WAV (Microsoft) signed 16 bit PCM is selected as the file type, then save your file. You should then be able to import it directly into the editor.
Image
ModDb Portfolio
"Bear," she cried. "I love you. Pull my head off."

User avatar zYnthetic
Trustee Member Trustee Member
Posts: 507
Joined: 12 Nov 2007, 00:10

Subject: Re: Possibly converting a small MP3 file into uax?

Post Posted: 27 Jun 2016, 16:33

You might want to look into using an alternate driver with script for streaming. I know there were some in dev years ago but not sure if they ever got released. Otherwise it's possible but it turns into a cost/benefit issue. Unreal doesn't care what the sample rate is as long as the sound is 16bit mono. It'll treat anything in uax as sound so it's vulnerable to spatialization and culling (getting cutoff by another sound). As umx it isn't going to have the same problem. What generally is the problem is size. A 16bit mono wav at 44k is 5mb/minute. At 24k it's 2.5mb/minute. It's usually a question of is it so good that even an awful sounding song is worth the disproportionatly large file size.
Image

User avatar UBerserker
Nali Priest Nali Priest
Posts: 7565
Joined: 11 Nov 2007, 21:00
Contact:

Subject: Re: Possibly converting a small MP3 file into uax?

Post Posted: 02 Jul 2016, 09:31

Yo thanks guys, finally able to add sounds in now!
Image

User avatar zYnthetic
Trustee Member Trustee Member
Posts: 507
Joined: 12 Nov 2007, 00:10

Subject: Re: Possibly converting a small MP3 file into uax?

Post Posted: 07 Jul 2016, 19:14

It's been years since I've used trackers. In light of streaming I wanted to do the same thing for a "please stand by" map to use as a menu background. Using modplug/openmpt I remembered the best way to do it.

* Import the wav on instruments and on the sample tab set it to full length loop.
* Add it to the first row on the first pattern.
* Create a new pattern and on the last row add a pattern break to the top of that pattern (B01).

It's simple but you wouldn't believe how many people fight with tempo and pattern lengths to get a loop that isn't premature or late. This way just sets audio to loop without relying on pattern length/tempo, playing it, and having the mod continue to run without interrupting the audio by looping a blank pattern.

My resulting umx is 47mb though. Like I mentioned before it's not really practical but considering this is only ever going to run on my comp I'm ok with that.
Image


Who is online

Users browsing this forum: No registered users and 4 guests