Customizing music for Prophecy

ourchair

Spaceman
I'm not sure if this kind of question is supposed to go into Tech Support or anywhere else, but I just wanted to ask: Does anyone here know how to hack, tweak or modify Wing Commander: Prophecy to use music other than what's in the .tre files?

I'm hoping to pop in some MP3s for alternative combat music. I would really appreciate if anyone has a definite answer for that.
 
I don't think a handy MP3-to-music.tre tool exists. Personally I just run Winamp in the background. But maybe someone on the UE team will know how to make your own music.tre.
 
mp3 files can be easily converted to wav files, and there are several players that will do it, but I don't have the time to hunt for them, and I'm too lazy.
 
Yamp is one. It will decode mp3s to wav format. It will also encode wav files into mp3s. How convenient. Hunt for it on Download.com
 
Meson said:
mp3 files can be easily converted to wav files, and there are several players that will do it, but I don't have the time to hunt for them, and I'm too lazy.

Like say Winamp? ;-)
 
I'm pretty sure Quarto knows about this. I know the mp3 frequency needs to be a certain thing or it won't play. Then it needs to be converted to an MGI using a tool HCl created. I just wrote the music, I didn't worry too much about the technical aspects of getting the mp3s I supplied to work in game - Q took care of that for me. Eder I believe knows how now as well. If you ask one of them, I'm sure you'll have the answer.

I know it is possible to convert from MP3 - all the music in UE when it was finished was in MP3 format. After that I'm not totally positive of what happened to it.
 
What Eder said.

The pity is that you'll get double loss on the compression. First from the MP3, then again on the conversion to MGI.
 
I don't get that. I'm a musician, I have an extremely well trained ear, and I still don't hear any real loss of quality between MP3 and wav. I know the MP3 is compressed, but honestly, I barely notice a difference between it and the wav. Often, I don't notice the difference at all.
 
I'm not an "audiophile", but I'm not an 'everyday' listener either. I suppose it can also have something to do with how good your sound equipment is (mine is very cheap!).

When I first started listening to MP3s (primarily game music remixes, I'm no music pirate), I didn't think there was that much loss of quality, but after a while, I can tell how music has been distorted. Even just a couple of days ago, I was playing WC3 MP3s (from the CIC) through the DVD player (connected to the TV), and the high frequency sounds (percussion, etc) sounded very - um, filtered? - by the encoding process.

Which brings me to the point: If you're encoding MP3s, please, please, please don't use Xing! LAME might take longer, but the quality is top-notch, if you know how to fiddle with the settings. But even constant bit-rate LAME encoded MP3s are vastly superior to Xing encoded files...

BTW, Needaham, do you know what happens during the MP3 encoding process?
 
Sure - quality depends a lot on equipment. Lots of people say they hear exactly what your talking about - a flitered sound. I don't, but that doesn't mean it isn't there. I just find it usually unnoticeable unless you're really really listening for it.

To answer your question, no, I'm not really sure. I know the file is somehow compressed. I believe it works similar to the way zipping a file works - basically just compresses the data somehow. Then as the MP3 is being played, its being decoded by the player so it can be heard normally. That's my limited understanding with some guess work involved. I can't say for sure what's going on though, no.
 
Well, let's start with encoding then.

ZIP files use a type of compression which is termed loss-less. ie They retain all of the original information of the uncompressed data.

AFAIK, all MPEGs (VCDs, DVDs, and whatever the next generation might be) use lossy compression. They throw away bits of information which the viewer/listener will hopefully not miss/notice.

MPEG Layer-3 is based on psycho-acoustics - sound as perceived by people. There is a threshold limit to what the human ear can detect, and this threshold is different for different frequencies (of course, different ears have different thresholds - another possible reason why you don't notice that much difference).

IIRC, MP3 encoding performs a Fourier transform to change the waveform into a frequency spectrum and 'throws away' any sounds quieter than the threshold. Masking effects also come into play - louder sounds mask softer sounds in the same frequency region.

There are several other tricks and things done as well, but I think that's the essence of what goes on. Anyone who knows more feel free to correct me or elaborate - I have to go to class...
 
Hmm... interesting. I didn't know any of that. All I know is, whatever is trimmed out, it seems that I don't miss it too much. But are there really that many things that are outside the range of the human ear recorded that eliminating them makes the file almost 10 times smaller? It seems like a lot to me, and while there are overtones that come out at times from notes, songs are recorded using a range that humans hear. How could there be that much stuff we're not hearing recorded? There has to be something more at work there...
 
Well, yes, there are other things going on. But the idea behind using lossy compression is that a small loss can yield an incredible increase in compression rates. The trick is to find what bits to throw out.

Also, any waveform can be described as a (possibly infinite) series of sine waves of varying frequency - that's what the Fourier transform is supposed to do.

There are plenty of good articles and FAQs on MP3 compression (the technology is as old as first generation MPEG), I just can't seem to find any right now (without bumping into MP3 spamming sites).

IIRC, one of the first things an MP3 encoder does is send the wave through a low-pass filter. I think even regular CD players do this at 20 kHz to avoid aliasing at high frequencies, since theoretically, CD audio can reproduce frequencies up to 22050 Hz. Note that sampling rates and frequencies are not the same - as a 'rule of thumb', sampling rate needs to be at least 2 x highest frequency.

Anyway, since high frequencies are much harder to encode than lower frequencies, the low-pass filter really helps on compression. Depending on the encoder and the file to be compressed, a 128 kbs MP3 can have a high frequency cut-off as low as 12-13 kHz. Even 192 kbs MP3s cut-off at 18-19 kHz, but that's okay, since it's hard to hear anything higher than 19.5 kHz, and that's if you have the tweeters to output that high, and don't have any other sounds masking it. (The old Xing encoders automatically cut off at 16 kHz, IIRC.)

BTW, all that is only considering constant bit-rate MP3s.

Sorry if I'm being confusing, I'm just writing anything I can remember about this. This post isn't very coherent...
 
Needaham45 said:
Hmm... interesting. I didn't know any of that. All I know is, whatever is trimmed out, it seems that I don't miss it too much. But are there really that many things that are outside the range of the human ear recorded that eliminating them makes the file almost 10 times smaller? It seems like a lot to me, and while there are overtones that come out at times from notes, songs are recorded using a range that humans hear. How could there be that much stuff we're not hearing recorded? There has to be something more at work there...

Actually a good deal of the compression (in MPEG and MP3) is gained by just transforming the data into a different format. This transformation is almost lossless (only loss is caused by rounding errors). After the transformation you start throwing away the least important data until you reach the filesize you want.
Neither BMP nor WAV are an especial good data format for storing information. They are quite bloated.
Regarding quality - I bet that given the proper eqipment (a really good monitor/TV) I can tell you which movie was MPEGed (even on DVD quality) and which one wasn't.
On music scale I am not that good, but if you get the chance, try to listen to the same piece of music (preferably something with strong base) from a DVD, a CD and as 128bit MP3 on a really high end HiFi System. Especially the loss on the CD (which is esentially WAV) is extremely high when heart in comparision.
 
here are some tips of listening to mp3s (and hearing the compression):

1.) grab one of your audio cds (bought, or burned atleast, NOT audio cds done from mp3s)
2.) rip one track to WAV format, keep that file
3.) compress the WAV to MP3 in 192, 128 and 96, maybe also 64
4.) burn all files (WAV + MP3s) to a cd, then put into a cd player (hifi stereo if possible)
5.) listen and compare

6.) if you want, you can also use a discman + earphones (i hear most "artifacts" of compression better with earphones...)

thats just to play around. i can hear from cd if the track on there was a mp3 (128 and below i hear very easily, 192 maybe also), if you compress your mp3 file very small (64 and below) you hear all the artifact sounds you have to listen for...

just my info about listening to mp3s...
 
Wow... I go to bed, I wake up, I read this thread, and I have a headache :p

I'll have to try that thp, thanks.

Wedge - where'd you learn that stuff? It's not that I'm doubting you, I'm just suprised I didn't know it, and I often deal with audio files for things other than personal listening. Thanks for all that info (even if it wasn't exactly 'coherent', as you put it).
 
cff said:
Neither BMP nor WAV are an especial good data format for storing information. They are quite bloated.
They are incredibly bloated. :) This is because there is no attempt whatsoever to compress the data in those formats. A bitmap stores the colour value of every single pixel. A wave stores the value of every single sample.

thp said:
i can hear from cd if the track on there was a mp3 (128 and below i hear very easily, 192 maybe also), if you compress your mp3 file very small (64 and below) you hear all the artifact sounds you have to listen for...
I didn't think it was possible to encode 44 kHz MP3s using only 64 kbs. Not with a CBR, anyway. There is much debate on what is the 'best' bitrate to use in encoding - most 'experts' seem to agree that 256 kbs is indistinguishable from CD audio, but that's often over-kill. That's why I prefer VBR - variable bit-rate. Maximise the quality with minimum of bit-rate 'wastage'.

Needaham45 said:
Wedge - where'd you learn that stuff?
Reading. As I said before there's plenty of info in it, I just can't recall the URLs. r3mix.net used to have good info, even if it became out-dated (try http://web.archive.org/web/20010720143908/http://r3mix.net/), but the Hydrogen Audio forums also helped me a bit too, even if it's full of audiophiles. :/
 
Back
Top