Tonic Trouble Soundtrack

Talk about the Rayman music website.

Moderator: Droolie

Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

Dammit! :pascontent:

I don't know what went wrong, but these captures aren't full quality. I just realized while editing that they are capping out at 11kHz. My original rip from '01 shows significantly higher frequencies captured... ARGH.

Back to the drawing board for the moment. At least I still have all the scripts I used. I just need to figure out why they're not playing back at the right rate. Maybe my copy differs from the one I used to originally record it... It was bundled with a Matrox graphics card. I don't know - I seriously doubt it. Stay tuned I suppose.
Last edited by kooz on Mon Aug 01, 2016 7:21 am, edited 1 time in total.
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

Previously you've captured music via analog, now digitally, right?
Previously it was called just "analog noise".
But both versions are played by engine, not exactly unpacked if I understand right, so I don't know.
You can also try previous method of recording and compare.
Generally for very deep post processing, files with even dirtier highs are better, if they are the most bit perfect to the source, as possible.
Ex. Revolution rip vs your DC.
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

Okay. Yeah, you're right. It looks like the extra highs on the old rip were probably produced by sample rate conversion or line noise. It seems the original MPX files are just lower quality than what the game states in its code.

I can't seem to discern a quality difference between my old rip and the new one. Maybe you'd like to do some listening tests yourself just to be certain.
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

~monday afternoon.
And if we will have the same observations, it'll turns out again like again "analog noise" produces better quality xD
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

The new soundtrack is done. I took a few creative liberties in arranging this in an effort to maintain the retail version's completeness as closely as possible. Some tracks, however, were re-arranged purely in the interest of better flow/coherency throughout the track. In particular, I decided to remove the (redundant) North Plain section from Grögh HQ, as it seems out of place in contrast with the rest of that track. Other sections were abridged as necessary to accommodate for the missing material.

Let me know what you guys think. :)

https://mega.nz/#!JdtV2aDa!cBraQcRm0O7N ... BOg3M8e3YY
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

Thank you very much kooz for your huge contribution in providing this soundtrack to us.
Sorry for not having enough time to compare quality, I remember about it still.

Droolie, could you replace current soundtrack on Raytunes by this one ? Thank you
Droolie
Musician
Posts: 5340
Joined: Wed Apr 20, 2005 7:31 pm
Tings: 67820

Re: Tonic Trouble Soundtrack

Post by Droolie »

kooz wrote:The new soundtrack is done. I took a few creative liberties in arranging this in an effort to maintain the retail version's completeness as closely as possible. Some tracks, however, were re-arranged purely in the interest of better flow/coherency throughout the track. In particular, I decided to remove the (redundant) North Plain section from Grögh HQ, as it seems out of place in contrast with the rest of that track. Other sections were abridged as necessary to accommodate for the missing material.

Let me know what you guys think. :)

https://mega.nz/#!JdtV2aDa!cBraQcRm0O7N ... BOg3M8e3YY
I haven't had time yet to listen to the whole thing, but from what I've heard so far it really sounds great. Fantastic work! :)
deton24 wrote:Droolie, could you replace current soundtrack on Raytunes by this one ? Thank you
I won't replace it since it's lacking some segments, but I'll make sure to put it up as an alternative - it's an alternative version of the game after all.
I'll do that some time after my thesis deadline, so next month. :)
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

Drolpiraat wrote:I haven't had time yet to listen to the whole thing, but from what I've heard so far it really sounds great. Fantastic work!
Thanks. :)
This has been a lot of work, and while I am feeling rather accomplished for what I was able to achieve, this victory is feeling bittersweet. :pfff:

Basically, after I realized that the spectrum analysis was revealing a frequency limit of around 11kHz, I went back to the drawing board looking for answers. This lead me to discover that Tonic Trouble (both beta and retail) and Rayman 2 (which actually uses the same audio engine) do their mixing/output at a 22050Hz sample rate. I was able to verify this both with Virtual Audio Cable as well as Total Recorder. Each of these programs are able to identify and display the bit/sample rate/number of channels of the source.

I went through multiple sound cards and operating systems, and in all test cases, all 3 games (TT, TTSE, Ray2) generated a 16 bit, 22050Hz, stereo PCM stream upon launching the game.

So, while my segment rips are no doubt the closest thing to a bit-perfect copy of the game's output... the actual source files (which according to several in-game files should be sampled at 44100Hz) may yet possess quality that nobody outside of Ubi staff or Eric Chevalier himself has actually ever heard! :shock:

Then again, they may not actually have any recorded/encoded frequencies above 11kHz... it seems we will never know until we get them decoded outside of the game. :pascontent:

Drolpiraat wrote:I won't replace it since it's lacking some segments, but I'll make sure to put it up as an alternative - it's an alternative version of the game after all.
Exactly. I tagged the soundtrack specifically to indicate that it is the "Special Edition (beta)" soundtrack.
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

Tonic Trouble (both beta and retail) and Rayman 2 (which actually uses the same audio engine) do their mixing/output at a 22050Hz sample rate.
Don't worry. Unpacked files from the game instead of recorded one have usually bigger potential during remastering. It was analogically with your R2 DC line-in-rip. But it would be interesting to see at some file recorded digitally, to exclude existence of analog noise in assessing this as major culprit of potential rise of quality.
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

There is no added analog noise in this rip. It is a perfect digital recording of the segments as played by the game engine. Digital silence (all zeros data) was the only thing being recorded before and after each segment was played.

If the game's engine weren't re-sampling to 22,050Hz, this rip would essentially be identical to one achieved by unpacking the files with an external tool.
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

You mean this last one release?
It is digitally recorded?

And the first one from many years ago was recorder with line in?
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

That is correct.
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

Droolie
Musician
Posts: 5340
Joined: Wed Apr 20, 2005 7:31 pm
Tings: 67820

Re: Tonic Trouble Soundtrack

Post by Droolie »

deton24 wrote:Are those files differ the same?

http://i.imgur.com/aL7Uca3.jpg
http://i.imgur.com/wJeZvdSl.jpg

xD
Why must you keep bringing that up? :(
But yes, the difference is similar, but not exactly the same.
At that time, we were comparing a line-in (analog) recording and a direct conversion of the source files.
Now, we are comparing a line-in (analog) recording and a bit-perfect (digital) recording of the game's output. Converting the source files directly may still provide better results if they are indeed 44kHz as the metadata says.

About that, kooz, it's pretty sure by now that the R2/TT audio engine indeed resamples to 22kHz - Synthesis found the same thing when he tried to play 44kHz audio files. Do you think it might be possible that one of the DLLs or the EXE has this 22kHz limit hardcoded somewhere? If so, we might be able to change it to 44kHz. If the value is not literally present in the assembly, it'll probably too complicated for us though. :P
EDIT -> Looks like it's in the main exe. This code shows the audio engine calls a function to get the capabilities of the audio driver and then decides on which of its 3 modes to use: one for 11025Hz or below, one for 22050Hz and below, and one for above 22050Hz. My guess is the last mode will resample anything to 22050Hz. I wonder what would happen if we edited that check value to 44100Hz. I still have too little time at the moment to try this though. :(
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

Haha... wow, that is really awesome, Droolie - I think we must be communicating telepathically! I actually spent a few hours in disassemblers today with that EXACT same idea. If you hadn't guessed already, that's also why I was trying out Rayman 2 and TT (retail). I even went so far as to look at other games published by Ubi around the same era. Some racing sim games... etc. I came to the conclusion they were all outputting at 22kHz as well.

It's nice to see that validated in Synthesis' testing. I did not know that anyone else had come to this conclusion yet.

I'm totally amazed (and excited) that you were able to find the audio output modes of the driver already! I am going to test this out when I get home this morning, as long as I can find the code/value you referenced.

If all goes well, maybe I'll have a 44.1kHz sample to show off afterwords :D
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

Why must you keep bringing that up
Am I worse than others or something?
If you confessed that there are some changes, they are also in line-in rip. It's not really that different or completely not important. Only in case if I'm not that person who not saying that :fou:

But... wow... Things that you are doing are crazy.
I'll inform Synthesis about this topic and what you are doing to let him track you progress. He'll be interested.
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

deton24 wrote:If you confessed that there are some changes, they are also in line-in rip.
I may have misinterpreted what you were trying to say here, but I think you might be confused. The old analog line-in rip from 2001 suffers from the exact same frequency cutoff that my new digital rip does. Both rips use the game engine itself (which we have concluded is output at 22050Hz) as its source. Any appearance of higher frequency information in the original rip is byproduct of the analog signal transfer, or possibly an artifact of sample rate conversion.

If you study the ~11kHz threshold in spectral analysis, you'll notice that the higher frequencies appear to simply mirror the frequencies below.
deton24
Art Rytus
Posts: 1194
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8932

Re: Tonic Trouble Soundtrack

Post by deton24 »

Ok. It's not really worth of deeper discussion, but you have written that this line in rip sounds better, that's why I was speaking about it. It's the similar situation like with R2.
Maybe it's not the most the most important what is strictly responsible for that, whether it's that mirror or not. It's great that you are making progress.
kooz
Murkin
Posts: 39
Joined: Mon Aug 15, 2011 2:00 pm
Tings: 1195

Re: Tonic Trouble Soundtrack

Post by kooz »

deton24 wrote:but you have written that this line in rip sounds better
I wrote that the line-in rip had a clearly higher frequency range. I should've clarified that I was basing that solely on the spectrum analysis. In the very next post, I noted that I could not hear an obvious difference between the new and old rips.

Why don't you do some listening tests yourself? Both rips are available, lossless:

Tonic Trouble SE (beta) OST v1 [Analog capture]
Tonic Trouble SE (beta) OST v2 [Digital capture]


I'm off to try that audio driver sample-rate hack now... :hehe:
Last edited by kooz on Tue Aug 30, 2016 2:39 am, edited 1 time in total.
Synthesis
Barbara
Posts: 47
Joined: Fri Jan 02, 2009 7:48 pm
Location: France
Tings: 10235

Re: Tonic Trouble Soundtrack

Post by Synthesis »

I tried changing the value at the offset you mentioned from 22 56 (22050 in little-endian hex) to 44 AC (44100), unfortunately it didn't change anything. :(
The original in-game files aren't played at twice the speed, and my files are still played with the same spectral folding as the original files, and they still have that slight DC offset building up over time. Now I don't know much about IDA (and disassembling in general), and I don't have much time nor motivation to lose myself in such a task for hours...
kooz wrote:I may have misinterpreted what you were trying to say here, but I think you might be confused. The old analog line-in rip from 2001 suffers from the exact same frequency cutoff that my new digital rip does. Both rips use the game engine itself (which we have concluded is output at 22050Hz) as its source. Any appearance of higher frequency information in the original rip is byproduct of the analog signal transfer, or possibly an artifact of sample rate conversion.

If you study the ~11kHz threshold in spectral analysis, you'll notice that the higher frequencies appear to simply mirror the frequencies below.
That's right, exactly. Deton24, you don't seem to be aware of what the Shannon-Nyquist theorem (also known as the sampling theorem) has to do with aliasing, do you?
Basically, the interpolation method you choose when upsampling (eg. from 22k to 44k), or when converting to analog, will impact how much spectral folding there is in your audio (that "mirror" effect kooz is talking about). Zero-order hold ("stairsteps") causes strong mirroring -- and a big ringing effect (that's the principle of a bitcrusher, really) --, linear interpolation attenuates the effect, and with ideal sinc interpolation, you get no mirroring at all (or very little, depending on how many neighboring sample points you use).
But I might be a bit too technical for you.

The thing you have to keep in mind is, what you call "quality" is the fact that there are (or not) frequencies in the high-end of the spectrum. If you want to use the Crystalizer to strengthen the spectral folding under the assumption that it sounds better to you, then good for you. But that's not the "quality" we're looking for. We (as in, at least Droolie and I) are (or were, now that it's done) looking for a bit-perfect extraction of the soundtrack, which should show absolutely nothing in the spectrum above 11kHz (since they were sampled at 22kHz). The only frequencies we'd want above that threshold are the ones that got lost in the 44k > 22k resampling process, and which are irretrievable.
Anyway, I'm getting carried away. We've done awesome work, and I think there might be things left to dig.
Post Reply