R3: Music Extraction Discussion Topic

Talk about the Rayman music website.

Moderators: Droolie, English moderators

Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Synthesis
Barbara
Posts: 47
Joined: Fri Jan 02, 2009 7:48 pm
Location: France
Tings: 10235

Re: R3: Music Extraction Discussion Topic

Post by Synthesis »

IT WORKS

okay everyone check this out:

https://www.youtube.com/watch?v=n9iaGQzFArA



Sorry it took so long.
I wrote two Python scripts (one for encoding wav to apm, the other for decoding apm to wav), which were done around Nov 30, 2015.
The musics were the hardest to finish (I got busy with other stuff, then my motivation dropped at some point, so I sort of forgot about it for a few months).
All three songs are exported and played in-game at 44100 Hz (yes, it is supported!)
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

It's great news, Synthesis. Thank you so much for your hard work.
Still, I haven't remastered SFXes yet, but from music I have:

Separated segments/loops with names

I attaching file projects from Audacity with parts of songs, wavs which have been joined as final files then. Maybe they will be usefull. It's something like 1,5 GB in total...
It's just separated parts of songs/loops from initial stage of 44khz project.
Download
https://yadi.sk/d/y4mXJtI2rQmhh

Maybe you can publish some tutorial to not harass you longer.
Last edited by deton24 on Thu Jul 26, 2018 2:43 am, edited 2 times in total.
Synthesis
Barbara
Posts: 47
Joined: Fri Jan 02, 2009 7:48 pm
Location: France
Tings: 10235

Re: R3: Music Extraction Discussion Topic

Post by Synthesis »

I'm sorry, you're gonna need to upload the rest of the files. I can't extract anything.

Edit: I would prefer that you upload the separated segments instead of long joined audio files (or otherwise I'm gonna need to split them back anyway).

Also, how did you manage to get these separated segments? As far as I know, the PSX version uses 44.1 kHz ADPCM files, so I suppose you had to go through the process of converting them to PCM/wav, right?

Edit 2: I'm planning on setting up a Github repo with all my Rayman 2-related work (which would include source codes for Ray2Get, possibly Ray3Get, Zeroid, and both APM<->WAV encoding-decoding scripts). along with a giant list of how all apm files are played in-game, so you have a better idea of what to do when replacing them with your own.
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

I think there are also named segments inside this archive along with some parts of joined songs, or to extract from Audacity files. They should be splitted at least inside project files. It was long time ago, I don't remember well. Have U used WinRar 5 to extract archive?
Or maybe it was CRC checksum error?

Anyway, you can extract all segments easily from PSX CD, but names will be not preserved, and order also is not preserved:
source file is VAG, probably 4 bit or 8 bit ADPCM, named THEME.vag on Rayman 2 PSX CD, and then was is created from that.
To unpack separated loops, use ADPCM Player v1.44h, open THEME.VAG from R2 PSX disc and set, interleave to 800.
But I suggest to look into my files first, they should work in WinRar 5.
At least you have names and some order there. I don't remember precisely.

You really put lot of effort to bring us these HQ files working. Thank you very much.
We are on the good way of releasing enhanced version of Rayman 2 PC in matter of sound.

Your music is definitely worth of listening later on some better speakers than in my tab right now.
Your contribution is huge. Thanks a lot.
Synthesis
Barbara
Posts: 47
Joined: Fri Jan 02, 2009 7:48 pm
Location: France
Tings: 10235

Re: R3: Music Extraction Discussion Topic

Post by Synthesis »

For each of the .partXX.rar file, I get an error message "File cannot open as archive" or even "Not a WinRAR type archive" whenever I try to open, either with 7-Zip (Windows) or the Ubuntu archive manager. I don't have WinRAR installed so I haven't tried.

Anyway, if these files happen to be the WAV versions of the whole soundtrack you've uploaded as FLAC (which I already have downloaded some time ago, and which I can uncompress to WAV), then it is unnecessary to me, since I can use your FLAC rips.

I'll give it a try and get the audio directly from the PSX CD.

On a side note: I don't like Audacity much, because when you save a wav file, it adds noise (dither, probably), which is problematic when you're trying to do a perfect bit-by-bit conversion.

Edit: ugghh... the PSX files have big chunks of the songs. x_x Honestly don't really feel like spending my next week splitting all of them. Plus some parts are missing.
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

Brother Synthesis :) I already splitted, named and sorted segments from PSX in wavs. They should be inside archives.
Without WinRar version 5, which I don't even know if it's available on Ubuntu, I made it on Windows, you'll be not able extract it, because it's a new kind of version 5 compression implemented, which is used in my archives.
Your errors suggest that you don't have proper version of WinRar.

It will be faster to burn Hiren's Boot CD and launch Mini XP, and there extract, than wait for my new upload, since it'll take ages on 1 mb bandwidth.
My job was unfortunately more horrible because initially I got one wav file from Droolie and I needed to split segments from whole file, and detect and delete silence on beginnings and ends of a segment. Year later I found this new method. :oops2:

The only case when I met with distortions in Audacity, was when I edited one wav multiple times, so saved new wav after changes.
And also multiple saving of FLAC, probably it's even more destructive for files. That's what I spotted.
When you save your project file in Audacity multiple times, everything should be fine.
Only if it not adds anything from the beginning. But rather not in future project savings.
Wav should be created only in the end. It shouldn't be edited multiple times than. Im sure of that.
When Droolie gave his own files from the same segments during R3 arrangement, they were slightly different than mine created from the same segments. Probably he was saving changes in files in Flacs, or edited wavs, or just do not used any DAW to save changes.
I didn't have to do so when my arrangement was set in Foobar playlist to join.
But it could be also only a matter of used program/converter.

But notice that we still speaking about losses in editing losssless files.
I have spotted it several times on several examples.
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

Synthesis, any news?

"It will be faster to burn Hiren's Boot CD and launch Mini XP, and there extract, THAN wait for my new upload, since it'll take ages on 1 mb bandwidth."

not then
I made a mistake.
Small misspelling but makes a difference :)

Anyway, there is no rush.
Greetings.
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

Synthesis
I have noticed one sad thing.
Quality of replaced music played-in game are in worse quality than played from FL at the end.
If rendered video sounds the same like when you play the game, then we have some minor technical issue, but I think actually that we have that case which I feared. Engine runs 44 kHz in lower frequency or bitrate, even if it has correct files.
This is like in the CS 1.6. Unfortunately.
So replacing music by 44 kHz original ones doesn't have any sense, but by custom music in general - why not.

And your music, really, really rocks. Bows.

Still, if you'll publish some tools for it, I think at least few people will be really grateful :)
Last edited by deton24 on Sun Sep 08, 2019 3:51 am, edited 2 times in total.
Synthesis
Barbara
Posts: 47
Joined: Fri Jan 02, 2009 7:48 pm
Location: France
Tings: 10235

Re: R3: Music Extraction Discussion Topic

Post by Synthesis »

deton24 wrote:Quality of replaced music played-in game are in worse quality than played from FL at the end.
If rendered video sounds the same like when you play the game, then we have some minor technical issue, but I think actually that we have that case which I feared. Engine runs 44 kHz in lower frequency or bitrate, even if he have correct files.
I had to read what you wrote like three or four times to really understand what you mean (and I actually rewrote my post twice because I realized I misunderstood you) but I think I got it now.
I ran Rayman 2 with my custom tracks and routed it into FL Studio; and yes, you're right, there is indeed a loss of quality. :(

Not only the 44.1 kHz files are played with spectral folding (starting around 10kHz), which makes me think that the audio engine will resample any file to 22050 Hz, but there's also a slight DC offset added over time with some of my files (probably a side-effect of resampling, or maybe because the playback algorithm isn't exact IMA-ADPCM, in which case there's very little I can do with my current knowledge, unfortunately).
deton24 wrote:Still, if you'll publish some tools for it, I think at least few people will be really grateful :)
I know... I'm going through a difficult phase at the moment, for lack of a better expression, and I somehow left this work on ice, as well as a lot of other things, including audio experiments, music making... :? :oops:
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

Thank you for the response.
That's absolutely no problem at all. Take good care about your things, and some day if you'll find some opportunity, you may do it whenever you wish. Thanks for all your contribution in Rayman music ripping and tweaking and also for the great music.
Best regards.
Last edited by deton24 on Sun Aug 14, 2016 12:42 pm, edited 1 time in total.
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

Dear Synthesis.
There are some daredevils in Tonic Trouble topic - game on the same engine as Rayman 2, who tries to disassemble binary and replace there value possibly responsible for music frequency of decoding.
Maybe you'd like to follow the progress, so here it is
http://raymanpc.com/forum/viewtopic.php ... 0#p1183594
Maybe it will open the gate to play 44kHz files inside the game. They still investigating.

Edit.
So in TC they did it.
Replaced sound drivers/DLLs.
In R2 there are still some problems

edit.
TL;DR kooz had made some changes which allowed to achieve higher output files frequency during capturing on-fly, but it's still not pure 44kHz, but it can depend on source files.

Hipotesis about value in binary responsible for samplerate:
viewtopic.php?f=66&t=5981&start=60#p1183594
and no success:
viewtopic.php?f=66&t=5981&start=60#p1183627
Last edited by deton24 on Sun Sep 08, 2019 7:51 pm, edited 3 times in total.
Pixelise
Lums Vert
Posts: 18
Joined: Sun Jan 03, 2016 11:53 am
Location: Poland
Tings: 90

Re: R3: Music Extraction Discussion Topic

Post by Pixelise »

Hi! Is there any progress with Ray3Get?
I'm mystery... Can call me Shadow.... I like cookies.
The Jonster
Joe
Posts: 34053
Joined: Sat Mar 24, 2018 6:15 am
Location: The realm of Mario Karting
Tings: 78205

Re: R3: Music Extraction Discussion Topic

Post by The Jonster »

*deleted*
Always be true to yourself.
Image
Sigs by Steo and R4Y_ANC3L
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: R3: Music Extraction Discussion Topic

Post by deton24 »

Seems gmsj0001 tool crashes for me on W10, I'll write here a diffrent method of extracing Data.hst containing music and voices:

Download https://bitbucket.org/Zenchreal/decubisnd/downloads/
Open Rayman 3 Hoodlum Havoc\Gamedatabin\World\Sound\Data.hst for scanning.
Wait
Select all
Set info>samplerate 22050
1 channel
Save to wav
write random some name
press OK everytime
Voila

Output files are mixed eachother by various languages and music. No filenames preserved.
Maybe Droolie/Synthesis/gmsj0001 did it better. Filenames were somewhere in hxc files.

For proper music decoding pick 2 channels 22050 or 1 channel 44100 (which I suprised why it sounds that good, and both options works).


EN/FR/GER/IT/SPA voices with filenames extracted with Droolie's tool by ICUP321 (filenames preserved):
https://www.dropbox.com/sh/3v7gec6m0s0c ... 6kcza?dl=0
reupload
https://www.mediafire.com/folder/ox8kpq ... n_3_Sounds
(extracted voices are from PS3, the best quality version).
https://www.youtube.com/watch?v=B8GH--YXql0


Droolies extraction tool for all console versions only:
https://app.box.com/s/el5f1ne3ayj73tdrmj2jvx4hbks6a76g

PC PL voices rip [ Rayman 3 polskie pliki dialogów ] (though some files could slip me) (470 in total):
https://yadi.sk/d/AeeXSzmTK4Lzsw
https://www.youtube.com/watch?v=yf9nTyi ... e=youtu.be

PL dubbed game videos
https://yadi.sk/d/EYSF5hn0zin5Sg

For Russian, Ukrainian, Czech, Slovak and Hebrew -
Posibly universal file list to filter language files in other exclusive releases of PC version (assuming that file names will be the same for all exclusive language releases):
Still some files are needed to filter out manually, but not so much) -

1. Extract the files in decubisnd with the name "gadka" (save to wav and write "gadka" then confirm)
2. Copy the Recycler files
http://www.maddogsw.com/cmdutils/
to the extracted audio folder
3. Download bat files:
https://yadi.sk/d/XfBJH4qXpFdsyA
4. Copy two bat files there
5. Run bat files
6. Now all your language files are in recycle bin.
Just cut them from there and paste in new folder.
Such script was the easiest to write.
7. Filter out left overs

Every next 5th file name beginning from our first language file of choose was calculated in Excel.
When I hit on some music, or wrong language, I was falling back on the list, and I was trying to find new language file of choose.
Then I merged cells in Excel by "&" formula (A1&B2&C3 for /gadka/_/6/.wav/) and drag to the end of column after creating /gadka/_/11/.wav/ and picking both rows.

edit.
The voices extracting script has been updated by dr_st:
viewtopic.php?p=1366353#p1366353
Post Reply