Extracting sound from Alex Builds His Farm
Moderators: English moderators, Modding and utilities team
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Extracting sound from Alex Builds His Farm
I have a (dutch) copy of the game "Alex builds his farm" for PC. I'd like to extract (some of) the audio files, but I have no idea how to get it done. Apparantly the game uses the same engine as Rayman 2, so some of the tools do kinda work.
Unfortunately, kinda works isn't good enough to get usable audio files, so maybe some experts can help me along?
Unfortunately, kinda works isn't good enough to get usable audio files, so maybe some experts can help me along?
Re: Extracting sound from Alex Builds His Farm
Personally I used tonictac to extract the music from the game. I don't remember if the software also extracted the other ambient sounds or the voices though, but I think they must use the same file formats, so it should work. The software only works via the command prompt though, but it's pretty easy to use.
https://mega.nz/file/A9AhELgB#jiKbyqi49 ... XJFhWgutUA
https://mega.nz/file/A9AhELgB#jiKbyqi49 ... XJFhWgutUA
-
- Posts: 21
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 105
Re: Extracting sound from Alex Builds His Farm
Please explain how it works, that's the most important part.ElZboub wrote: ↑Thu Jan 12, 2023 9:41 pm Personally I used tonictac to extract the music from the game. I don't remember if the software also extracted the other ambient sounds or the voices though, but I think they must use the same file formats, so it should work. The software only works via the command prompt though, but it's pretty easy to use.
https://mega.nz/file/A9AhELgB#jiKbyqi49 ... XJFhWgutUA
Re: Extracting sound from Alex Builds His Farm
- You must copy the files present in "Alex Builds His Farm\Gamedata\World\Sound" and that you paste them in the folder "tonictac"
- Once you have pasted them, launch the Windows command prompt by typing "cmd" in the search bar of Windows
- In the CMD you should have a command line like this : "C:\Users\<YourPCName>"
- Now you have to go to the place where you put the "tonictad" folder. If you put it for example in "Downloads", you must type "cd C:\Users\<YourPCName>\Downloads\tonictac"
- Then you must type "tonictac.exe b <NameOfTheFileYouWantToExtract>.bnm" and the software should extract you the musics/sounds in the form of files .wav
- If the format of the file you want to extract is not .bnm but .apm, you have to replace the "b" in the command with an "a", otherwise it won't work
It seems complicated at first, but in the end you only have to enter two commands to extract the files
- Once you have pasted them, launch the Windows command prompt by typing "cmd" in the search bar of Windows
- In the CMD you should have a command line like this : "C:\Users\<YourPCName>"
- Now you have to go to the place where you put the "tonictad" folder. If you put it for example in "Downloads", you must type "cd C:\Users\<YourPCName>\Downloads\tonictac"
- Then you must type "tonictac.exe b <NameOfTheFileYouWantToExtract>.bnm" and the software should extract you the musics/sounds in the form of files .wav
- If the format of the file you want to extract is not .bnm but .apm, you have to replace the "b" in the command with an "a", otherwise it won't work
It seems complicated at first, but in the end you only have to enter two commands to extract the files
- Attachments
-
- Sans titre.png (35.3 KiB) Viewed 3394 times
-
- Posts: 21
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 105
Re: Extracting sound from Alex Builds His Farm
I did it all correctly and extracted the two required DLL files the extractor keeps asking for, and when I try to extract Bnk_1.bnm, it gives me this error, but for smaller files it works just fine, just when the source file is big enough it says there isn't enough memory or external files are missing lol, how do I solve this?ElZboub wrote: ↑Sun Jan 29, 2023 4:43 pm - You must copy the files present in "Alex Builds His Farm\Gamedata\World\Sound" and that you paste them in the folder "tonictac"
- Once you have pasted them, launch the Windows command prompt by typing "cmd" in the search bar of Windows
- In the CMD you should have a command line like this : "C:\Users\<YourPCName>"
- Now you have to go to the place where you put the "tonictad" folder. If you put it for example in "Downloads", you must type "cd C:\Users\<YourPCName>\Downloads\tonictac"
- Then you must type "tonictac.exe b <NameOfTheFileYouWantToExtract>.bnm" and the software should extract you the musics/sounds in the form of files .wav
- If the format of the file you want to extract is not .bnm but .apm, you have to replace the "b" in the command with an "a", otherwise it won't work
It seems complicated at first, but in the end you only have to enter two commands to extract the files
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Extracting sound from Alex Builds His Farm
How much RAM do you have?
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
-
- Posts: 21
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 105
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Extracting sound from Alex Builds His Farm
Hmm, then that's probably not the problem then I'm not familiar with this software so I'm not sure what would make it error out like that…
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Extracting sound from Alex Builds His Farm
Maybe try to launch it in Powershell or copy the libraries from the English version if they differ.
The tool was written for Tonic Trouble, and if it didn't have such big segments (or English version of Alex Builds His Farm), that might be a new problem they didn't take under consideration, because it worked before.
If the problem happens just for BNM files, I believe there should be some other extractor able to do the job.
For BNM files you can use this extrator:
http://homepage.tinet.ie/~expatjen/files/f1bnm.zip
The tool was written for Tonic Trouble, and if it didn't have such big segments (or English version of Alex Builds His Farm), that might be a new problem they didn't take under consideration, because it worked before.
If the problem happens just for BNM files, I believe there should be some other extractor able to do the job.
For BNM files you can use this extrator:
http://homepage.tinet.ie/~expatjen/files/f1bnm.zip
Rayman 2 Soundtrack PSX (HQ CD like - 44kHz FLAC/Mp3) + Revolution - 31 exclusive tracks & others remastered | Rayman 3 HD High Quality Soundtrack (Ubi Remaster) FLAC/ Mp3 | Rayman 2 Graphics mod Reshade | Rayman 2 32 bit color fix | Rayman 3 Reshade | AI uspcaled and remade HD tex mod for PC | for Gamecube | Rayman 2 PC HD Texture Mod AI | Rayman M/Arena AI HD Tex Mod | Rayman 2 Rayman 3 Rayman M Widescreen Patch | Arena Widescreen Patch | Rayman 2 Revolution PCSX2 - get v. 1.4.0 and up for emulation speed up /or this fix | Revolution 60 FPS hack | Tonic Trouble OST 44kHz!
Re: Extracting sound from Alex Builds His Farm
Sadly it's not just Alex Builds His Farm...
The format is also used by Hype: The Time Quest (PC). I like that soundtrack a lot so I tried messing with this tool today...
Turns out it crashes on the first file of every BNM file. Okay, so I modified an existing QuickBMS script to automate extracting MPX/MPU/MPD files.
After that, tonictac's errors are gone, but still only about half of the MPX files are converted correctly - the rest output silence for the duration of the track. So sadly, it's currently impossible to rip the soundtrack of that game. I imagine it's similar for Alex Builds His Farm.
Of course, there's a PS2 version too, but that uses 22kHz tracks, and the PC version's MPX files are 44kHz. And Alex Builds His Farm and Laura's Happy Adventures don't have other versions anyway.
It seems this whole UbiSoft MPEG mess just won't end...
EDIT 1 > Ok, it seems like the other half of the MPX files are converted correctly only if they're extracted from the BNM with the "b" bank option. But the banks need to be edited manually first because it isn't possible to extract any of them. I'll just see if I can edit & recompile tonictac to fix this, that'd be the easiest solution.
EDIT 2 > After I sank into a pit of depression because I kept struggling to recompile this program, Spitfire_x86 helped out and rewrote part of it, fixing the compilation issue. This was a huge help and I cannot thank him enough!!! After that I was able to debug the code and fix some big issues that prevented it from working on Hype. It now works flawlessly - and I would be very surprised if it didn't have some issues with Tonic Trouble before... For Hype, the offset from which it tried to read files was almost always incorrect, and the "theme merging" tool (the author's attempt at merging segments while exporting) sometimes caused entire tracks to be ignored while exporting as well as just guessing the segment order??? As a result I've disabled that, which means more segments - but at least you can control how they are merged now.
I will share the updated tool here later after I test it with more games.
EDIT 3 > So I was told we have the source code for Ubisoft's MPEG algorithm. I will probably look into that and try reimplementing it in the future (in a few months maybe). In the meantime, I'll release the updated version of tonictac and its source: https://app.box.com/s/z7iiex4bzo23rppg81ynd64dzq9ln7rs
To use it, just put the exe, DLLs and bat file in the sound directory of the game and run bnm2wav.bat. It'll create a ton of wav files. Some of them are converted from ADPCM, some are converted from MPEG. This works on most(/all?) games that use BNM files.
For the files converted from ADPCM, you should know that the game DLLs always output them at 22.05kHz even if a different sample rate is specified, and it is better to convert them using another tool (like vgmstream) instead. MPEG files might have quality loss too, I will look into that further later.
Again, a HUGE thanks to Spitfire_x86: he made the detours version of this tool which allowed me to build on that.
The format is also used by Hype: The Time Quest (PC). I like that soundtrack a lot so I tried messing with this tool today...
Turns out it crashes on the first file of every BNM file. Okay, so I modified an existing QuickBMS script to automate extracting MPX/MPU/MPD files.
After that, tonictac's errors are gone, but still only about half of the MPX files are converted correctly - the rest output silence for the duration of the track. So sadly, it's currently impossible to rip the soundtrack of that game. I imagine it's similar for Alex Builds His Farm.
Of course, there's a PS2 version too, but that uses 22kHz tracks, and the PC version's MPX files are 44kHz. And Alex Builds His Farm and Laura's Happy Adventures don't have other versions anyway.
It seems this whole UbiSoft MPEG mess just won't end...
EDIT 1 > Ok, it seems like the other half of the MPX files are converted correctly only if they're extracted from the BNM with the "b" bank option. But the banks need to be edited manually first because it isn't possible to extract any of them. I'll just see if I can edit & recompile tonictac to fix this, that'd be the easiest solution.
EDIT 2 > After I sank into a pit of depression because I kept struggling to recompile this program, Spitfire_x86 helped out and rewrote part of it, fixing the compilation issue. This was a huge help and I cannot thank him enough!!! After that I was able to debug the code and fix some big issues that prevented it from working on Hype. It now works flawlessly - and I would be very surprised if it didn't have some issues with Tonic Trouble before... For Hype, the offset from which it tried to read files was almost always incorrect, and the "theme merging" tool (the author's attempt at merging segments while exporting) sometimes caused entire tracks to be ignored while exporting as well as just guessing the segment order??? As a result I've disabled that, which means more segments - but at least you can control how they are merged now.
I will share the updated tool here later after I test it with more games.
EDIT 3 > So I was told we have the source code for Ubisoft's MPEG algorithm. I will probably look into that and try reimplementing it in the future (in a few months maybe). In the meantime, I'll release the updated version of tonictac and its source: https://app.box.com/s/z7iiex4bzo23rppg81ynd64dzq9ln7rs
To use it, just put the exe, DLLs and bat file in the sound directory of the game and run bnm2wav.bat. It'll create a ton of wav files. Some of them are converted from ADPCM, some are converted from MPEG. This works on most(/all?) games that use BNM files.
For the files converted from ADPCM, you should know that the game DLLs always output them at 22.05kHz even if a different sample rate is specified, and it is better to convert them using another tool (like vgmstream) instead. MPEG files might have quality loss too, I will look into that further later.
Again, a HUGE thanks to Spitfire_x86: he made the detours version of this tool which allowed me to build on that.
Re: Extracting sound from Alex Builds His Farm
Does this also work to encode WAV files back to BNM? I just saw this post and weren't able to get this up and running