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

Author Topic: How to edit out certain sounds?  (Read 2319 times)

rach

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
How to edit out certain sounds?
« on: May 29, 2016, 06:04:51 pm »
Hi, could someone point me in the right directions to do this? I have zero hacking/ROM hacking knowledge.

I'd like to edit a few of the sounds out of the arcade game Rave Racer for the Viva Nonno emulator. The female voice is annoying, maybe some of the male's voice, too.

Thanks.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: How to edit out certain sounds?
« Reply #1 on: May 30, 2016, 08:37:04 am »
The most stylish way is to find the spot in the program code that triggers those sounds and replace them with nops.

But there is also the option to tamper with the sound data, such as changing the length of it to zero or replacing the data with silence.

FAST6191

  • Hero Member
  • *****
  • Posts: 2650
    • View Profile
Re: How to edit out certain sounds?
« Reply #2 on: May 30, 2016, 09:45:38 am »
Also depending upon the emulator and the system it is playing on and the system it is emulating you might also find that some sound channels are only used for the effects. If you can then disable them in an emulator you might retain the music but keep the sounds. For any other 1995 game I might have said don't bother as it is not likely (things like the DS have 16 fully customisable audio channels to play with and can dedicate things, older consoles had to make do with a lot less but the arcades can be the exception).

As it is an arcade game someone might have already analysed the game. Indeed https://github.com/mamedev/mame/blob/3afd990226a2c647290579bebb5537bd0fd3faac/src/mame/drivers/namcos22.cpp mentions things for the audio which might help focus things more quickly than if you tried it for the NES or something where it could be nice and custom from the ground up.

After that yeah you are doing what henke37 said.

rach

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: How to edit out certain sounds?
« Reply #3 on: May 30, 2016, 06:32:52 pm »
Hmm, well, it's not possible to edit the code for Viva Nonno, but if I could get this to work for MAME then that would be ok, except I don't know what I'm looking for. Guess I'm not smart enough for the smart option.

I found that you can open .bin files from the game in Audacity but it's a bit funky. It seems you need to reduce the playback speed about 75% and even then, the sound is scratchy for some reason. I can blank the section of sound containing the voices, but I don't know what format to save it in. I guess MAME will reject it anyway since it'll have a different CRC number.

FAST6191

  • Hero Member
  • *****
  • Posts: 2650
    • View Profile
Re: How to edit out certain sounds?
« Reply #4 on: May 31, 2016, 03:11:06 am »
Sorry I meant to say I linked the Mame source as the source for it also doubles as documentation for the hardware, in many cases the games themselves (it is not often that there are more than about 10 games for a given board rather than hundreds or thousands of games for a home console, to that end it is possible to more deeply analyse all the games and approach emulation from that angle) and more besides. In this case it sort of did both, for a game then search for rave and you will find a few things eventually.

It might not be raw wave either (might have a header or something) -- audio will often sound distorted/scratchy until you get the right numbers. Also if you have to reduce the speed then you imported with the wrong sample rate (if you imported at 44K then it is more likely to be around 30KHz sample rate, which was common enough for the time).

rach

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: How to edit out certain sounds?
« Reply #5 on: May 31, 2016, 04:33:26 am »
I previously tried a combination of all the encoding options and altered the default 44100 HZ sample rate to 42000 which was what was on some wiki page for Namco hardware but still needs to be slowed down a lot. The play speed is closer when you import it as 8000 Hz. I still don't know what's right. 30kHz is like hyper chipmunks :)

If anyone would like to have a look, it's the ROM raveracw.zip and the sound file with all of the dialogue I'd like to edit is called rv1wav1.10p. This is referenced in the namcos22.cpp you linked to but it's just one line and doesn't seem to have individual samples. Am I right thinking that I could at least nop that line somehow, which would get rid of the sounds, but a little more than I'd like?

Jorpho

  • Hero Member
  • *****
  • Posts: 4210
  • The cat screams with the voice of a man.
    • View Profile
Re: How to edit out certain sounds?
« Reply #6 on: May 31, 2016, 09:03:23 pm »
even then, the sound is scratchy for some reason.
I seem to recall reading about one other case where sound ended up being scratchy because custom, non-audio data was purposefully interspersed among the audio samples for some obscure, game-related purpose.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

rach

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: How to edit out certain sounds?
« Reply #7 on: June 02, 2016, 01:25:50 pm »
I seem to recall reading about one other case where sound ended up being scratchy because custom, non-audio data was purposefully interspersed among the audio samples for some obscure, game-related purpose.
Oh, bugger..

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: How to edit out certain sounds?
« Reply #8 on: June 06, 2016, 05:23:35 am »
Also check for different encodings. Normalized floats vs 8/16 bit pcm vs 4 bit adpcm. Use the wrong one in this set and you can usually get a really distorted version playing.

rach

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: How to edit out certain sounds?
« Reply #9 on: June 06, 2016, 03:24:43 pm »
Also check for different encodings. Normalized floats vs 8/16 bit pcm vs 4 bit adpcm. Use the wrong one in this set and you can usually get a really distorted version playing.
I'm using Audacity and the raw audio import option. Been through every setting there and this was the best I could find. There's a darker part on the outside of the spectrum and like someone said, it might be data but I can't find a way to separate it.