News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Extract Music/SFX and maybe change it.  (Read 1526 times)

ivecocrossway

  • Newbie
  • *
  • Posts: 1
    • View Profile
Extract Music/SFX and maybe change it.
« on: June 13, 2020, 07:39:07 pm »
SOLVED
« Last Edit: July 03, 2020, 05:10:17 pm by ivecocrossway »

peixemacaco

  • Jr. Member
  • **
  • Posts: 72
  • 70 65 69 78 65 6d 61 63 61 63 6f
    • View Profile
    • Old peixemacaco site found
Re: Extract Music/SFX and maybe change it.
« Reply #1 on: August 02, 2020, 01:36:46 pm »
Hi ivecocrossway , would you please say for what system was and the solution?

I'm definitely interested in Music/SFX change and I think some others too.

Tks,
Nelson
Super Monaco GP... It garnered an at-the-time unprecedented 10–10–9–9 rating from Electronic Gaming Monthly's Review and wasn`t a F Indy title.

FAST6191

  • Hero Member
  • *****
  • Posts: 2896
    • View Profile
Re: Extract Music/SFX and maybe change it.
« Reply #2 on: August 02, 2020, 05:11:59 pm »
Hi ivecocrossway , would you please say for what system was and the solution?

I'm definitely interested in Music/SFX change and I think some others too.

Tks,
Nelson

Generally speaking

16 bit and older. Most devices here were custom sound hardware that you actually programmed. https://daily.redbullmusicacademy.com/2014/09/yuzo-koshiro-interview http://shmuplations.com/streetsofrage2/ and various other things he did, or maybe some of the stuff for the C64 are good here.http://shmuplations.com/streetsofrage2/

As such everything was custom. Check to see if someone has gone before you*, if not then time to have some fun with the hardware documents for the system in question.
N64 was also somewhat this, or at least was in many games (I remember watching the developer let's play of various Rare titles and they went in some depth about the sound). This is what leads to the perception that sound hacking is hard, and it is not an unjustified position for those systems. Other systems however might be far easier such that someone that can follow a simple guide is more likely to run out of musical talent before they run out of technical hacking talent.
Exception might be the Amiga, though much like anything based on optical media then anything with a floppy disc and a thus usually a file system changes things (as does PC of the era but that always will, PC also increases chances for encryption). Amiga has various quite high end sequencer/tracker type formats which various devs use and thus you might even be able to open them straight with https://openmpt.org/ , many later game devs and console makers would use formats started here and familiar to those tools.
As time went on the hardware tended to get if not better then more expansive and able to play more audio notes at once, more quickly and by the time we started to see CDs appear most things could probably play enough notes that the average perfect pitch possessing music school composition type can't pick them all out.

*various people do extract audio to be used with various playback emulators and plugins for things. Check around where these plugins are made , https://www.zophar.net/utilities/audio-multi.html and https://www.hcs64.com/mboard/forum.php (though also good for newer stuff) also worth linking at this point.

PS1. See if it is CD Audio first of all. There are some that would go outside it.
Dreamcast and beyond. Various audio formats that might depend upon the system. Sometimes it also varies depending upon the format within the system -- pulling apart Wii downloadable games, or xbox 360 xbla/indie downloadable games, is sometimes rather different to the disc based stuff on the same system(s).
http://wiki.xentax.com/index.php/Game_File_Format_Central
https://wikivisually.com/wiki/ADX_(file_format)
https://wiki.vg-resource.com/GameCube
http://www.amnoid.de/gc/
https://wiki.multimedia.cx/index.php?title=Category:Game_Formats
and so on

https://github.com/vgmtrans/vgmtrans and https://sourceforge.net/projects/vgmtoolbox/ are also valuable tools.

GBA. See if it the Sappy audio format http://www.romhacking.net/documents/462/ . This is the one Nintendo provided, though there are others. http://belogic.com/gba/ is a nice hardware document on the GBA audio hardware.
DS. See if it is the SDAT audio format, and hardware wise it is loads of free to use channels compared to a handful of dedicated ones. Most games used this which Nintendo provided. Split between a sequenced format called SSEQ with its audio samples being called SBNK, short wave samples under the banner of SWAV/SWAR and long wave (PCM or ADPCM, which the hardware itself supports) called STRM but not all games support that (though there are simple enough hacks for a few games to shove a measure of wave decoding in). VGMtrans, vgmtoolbox and much more are available to mess with this. https://gbatemp.net/threads/the-various-audio-formats-of-the-ds.305167/ covers some of the other formats that have been pulled out of things.
3ds, PSP, Vita and beyond also have their formats. Newer games on consoles might share things with a PC, though I should note the xbox 360 had a custom version of the WMA (it is a Microsoft device after all) thing it decoded in hardware so there is that.
GBA and beyond are where audio hacking turns from "yeah you are going to have to be an accomplished hacker to do much other than mute things" to said follow along with a guide maybe 10 steps in length and then it is your composing skills that will be the limiting factor.

Extraction is different to alteration, indeed you can usually just find a nice point in the emulator or game on hardware if you have a means of getting sound out/out of your TV and loop it back if you really want. Even if you do have to make a decoder that will usually be easier than figuring out what the game/system wants for the encoding side of things (might want data in a given format and only of a given length, but you might have more options than the original devs used...).
Alteration will depend upon what the audio is -- sequenced audio is basically a list of notes to play back (though various systems will have either software defined notes, or baked into hardware ones, and sometimes for the soft stuff the console makers will provide a premade audio library a lot of devs used. The library of sounds is often referred to as a sound font) and maybe a few fun features like loop and audio bend things. Figure out the format and you are good. If it is a digitised sound file then you are left with editing that how you will, but not before figuring out the format used (MP3 was until recently in patent so a lot of things will either be straight wave or something rather more custom, though others might be OGM which was specifically designed to dodge this) https://www.audacityteam.org/ and its import raw option then being a valuable tool. It will tend to be a final mix in the game, even if you otherwise have many free and clear audio channels, so separating instruments might be harder. Big exception being music games which at one point were noted as being a better source for some music than the official CDs -- https://www.wired.com/2008/09/does-metallicas/ but that was more loudness war issues than having multi layer tracks available to play with as you will. Said music games will also often need a gameplay track as well to play along/dance along to -- audiosurf is great fun but it would struggle to pick out notes to turn into something, never mind make a dance ( https://www.youtube.com/watch?v=M8SIxE-MCFY , though playing hacker you are presumably less bothered by clearing all the rights if you did want to change something around if it is one of those "publisher would only spring for a sound alike" games).

peixemacaco

  • Jr. Member
  • **
  • Posts: 72
  • 70 65 69 78 65 6d 61 63 61 63 6f
    • View Profile
    • Old peixemacaco site found
Re: Extract Music/SFX and maybe change it.
« Reply #3 on: August 02, 2020, 08:07:42 pm »
How complete your reply, Fast6191  :o

But I need to say, that we are successfully changing audio from Mega Drive games.
For example, Fifa 2020 our (me and T.A. Marcos) last hack , published here... we had changed chantes from the crowd in the game even with audible voices. The goal when you press A, and another voice when you press C (after the goal) , and when a player suffer foul, there is a voice saying this, not present in original Fifa 95.

And I'm with another project SSF2 that I'm changing with success voices and other sound effects by the Arcade ones.

So, because of this, I am curious about what system and the solution ivecocrossway did...

Nelson
Super Monaco GP... It garnered an at-the-time unprecedented 10–10–9–9 rating from Electronic Gaming Monthly's Review and wasn`t a F Indy title.

FAST6191

  • Hero Member
  • *****
  • Posts: 2896
    • View Profile
Re: Extract Music/SFX and maybe change it.
« Reply #4 on: August 03, 2020, 10:42:06 am »
That was a terribly basic overview as far as I was concerned, missed out on loads of things that make for easy hacks.

As far as megadrive and prior. It is not that you can't change it (far from it -- we have both evidence of it and there is no theoretical barrier to it) but that changing will either require someone to have gone before you and categorised the game/engine or format (most of which were not really shared between games) and possibly made a tool or for you to get down and dirty with a debugger to figure out what the given game did, something generally considered a high level skill, and either way you will still be limited by either what the hacker expanded it to or the hardware itself, most of which has serious limitations.
Compare that to later systems where formats were common to the system, in games or in general (all those amiga formats went wide), and there is a decent chance there is a plugin for your favourite audio sequencer/tracker editor such that someone whose association with the word register is not "small section of memory within a CPU or memory handling a piece of hardware" but either what your teacher wrote in during school to make sure you were there or usually prepended with "pitch".

peixemacaco

  • Jr. Member
  • **
  • Posts: 72
  • 70 65 69 78 65 6d 61 63 61 63 6f
    • View Profile
    • Old peixemacaco site found
Re: Extract Music/SFX and maybe change it.
« Reply #5 on: August 03, 2020, 02:38:50 pm »
Understood Fast6191, but I think you must play and listen the audio changes we actually did.

Ok, I will say a tip.

Open on an Audio Editor (Sony SoundForge, Goldwave, Audacity, etc.) for example, a Mega Drive/Sega Genesis rom.

Normally with this settings: On SoundForge (to the app import and work with the rom) per example
Sample rate 11025 , Sample tipe 8bit PCM, Format Unsigned, Byte order (none), Format: Mono

You click to open and voilá! Appears the track, you can click and play, with success you will find the audio and maybe some music in it.

But this settings vary from game to game.  So, you may try changing from 11025 to 8000, 5500 or even 4000 (sample rate) ... And some games only open with Stereo , or even Signed  bit.

To change, you must respect the format you'd imported and the same duration of the clip.

To export, simply go to File/export/ As raw
Finished, exported? Now , rename the extension to .bin (Mega Drive)

Do the checksum fix and play to see if worked... sometimes fail, but we are having success...

Please, if you try Fifa 20 by T.A. Marcos, you will listen my voice in the beginning and several new sounds into the game.

Thanks,
Nelson

ps: Of course this tip works for other system console roms.... :thumbsup:
Super Monaco GP... It garnered an at-the-time unprecedented 10–10–9–9 rating from Electronic Gaming Monthly's Review and wasn`t a F Indy title.