Help with N64 music rip by Volkov73 at 2:35 AM EDT on April 28, 2017
Hey guys. I'm looking to rip some N64 songs. However, I would like each track as a seperate WAV so I can choose to mute certain instruments if I wish.
Does any software exist which allows muting of certain channels during playback, or direct WAV recording of each track? The only method I've found is using gameshark codes in the game/emulator, but this would be very tedious and would result in sub-par results (audio not lined up).
Doing it within the game itself will be hardly possible, since every N64 game mixes the audio internally before sending it out. Unlike SuperNintendo for instance, there is no place in hardware, where an emulator, music ripper or whatever could intervene. It might be possible using some simple GameShark codes, but this highly depends on the game and can get pretty complicated. It would be all manual work, at least I dont know an automatic way to do this (probably there is none).
A much easier, direct and more general approach is to use Subdrags's Sound and Midi Tool, to extract the midi and soundbank of a game (and creating e.g. a soundfont from it). Then playing it back with an external synth (e.g. fluidsynth).
This work might have already been done, which game are you looking for?
I'm looking to extract various songs from various games. I was able to use SubDrag's tools to extract some songs, and they sounded great. I was able to remove some tracks (like the melody line) and then ended up with quality tracks.
However, the more I tried to do this, the more problems I encountered. There were discrepancies with ADSR (I think)....sometimes playback did not match what was heard on the OST. Samples would not play for the correct length of time (reverb? adsr?) - this was main problem I found. Often the percussion sounds needed some manual work but that was fine to do myself.
Have you used Subdrag's tools yourself? I'm using Synthsoft 2 for playback.
Now.....when I extract MIDI and sf2 files from Nintendo DS roms, they all sound pretty much 100% during playback. I was able to get a few songs I wanted using this method, unfortunately not all great N64 games made an appearance on NDS.
So for ripping the N64 songs, I still need some guidance.
I use his tool for ripping some Rareware games (BK, BT, DK64, JFG, CBFD). You're right, getting ADSR correct is a mess. Reverb sounds different. And the way how the synth reacts to note velocity is different than the game does (that's why I prefer to use an opensource synth like fluidsynth to adjust that behaviour for my needs).
The ADSR times usually need to be extended all by some factor. If it still sounds wrong I analyze the original audio's spectrogram using sonic-visualizer, or simply do it by ear.
The ambiance tracks work fine for Rare games, havent tested Zelda games though.
Using the soundfonts and midi's extracted is very cool, but unfortunately requires a lot of manual work (not bothered) and they also sound a bit off.
The more songs I extract, the more I notice instruments being too loud or the timbre being a bit off.
What are my goals here? To make as accurate copies of the original music as possible but with the ability to exclude a chosen instrument (like the bass or melody)
I've been able to do this 100% accurately for nes, snes, gbx, genesis, and nds.
In my mind, if it possible for a program to extract this data from the roms (Subdrag tool), and it is able to seperate each instrument into it's own midi track with the correctly assigned sound - then it should be possible to eliminate it from playback in the first place.
Would it be possible to edit the exacted midi files to exclude the notes I don't want played, and then inject them back into the rom. Then playback through regular old emulation should result in what I am looking for.
I know this is probably a bigger feat then I am aware of, and I by no means have the skills or knowledge to program something like that myself. Am I on the right track or am I way off?
You want 100% accurate copies? Grab the N64 SDK (specifically libaudio) scratch out all that microcode stuff and create your own synth around it. Add a bunch of variables to it that allow you to control every aspect of rendering and for every game, then figure out what parameters are most suitable for accurate playback. Think of: - response to note velocity - ADSR envelopes (linear?, exp?) - reverb algorithm - reverb settings (roomsize, damping, etc.) - implementing custom effects (e.g. IIR filter of CBFD and JFG)
Even if you can make it, you'll probably have the audio rendered at a higher samplerate, which again creates a "brighter" sound.
In short: just say goodbye to the idea of replicating the audio with 100% accuracy.
If you still want 100% acc., your best option is indeed removing notes from exported midi and reimport it to the ROM. However this most likely involves more manual work than just setting up a proper soundfont once...
I really mean 100% accurate as far as the best emulators can already do. I cannot design anything from scratch.
Perhaps editing the rom somewhow so the notes simply do not play would be the simplest option? Do you think it would be that difficult to do the reverse of what Subdrag's tools already do?
Either that or edit the midi/soundfont to sound more reminiscent of the originals.
Also, I don't know if it would be possible. but replacing data on the rom through injected an edited midi could result in the song being played on original hardward, no?
What game are you importing to? It shouldn't crash the game.
What you want to do basically is remove certain channels from songs I take it. If so there is no easy or automated way to do that as there are a variety of sequence formats. If you have a decent amount of knowledge in reading sequence formats, and hex editing you should be able to go to a channel starting offset and simply put a end track flag at the start. That would "mute" it. If you're not sure how a sequence format works, there is a export "debug file" option in N64MidiTool that allows you to export a .txt along side a midi and that will give you a general understanding of the sequence format (type 1 sequence formats do not have this option eg: RareWare games). From there you could find the channel offsets, export that sequence as bin in N64MidiTool and hex edit the channel you want muted with a end track flag at the starting of the channel, then finally re-import the bin. Doing this will insure that you're not losing song information as midi cannot translate / import special commands. However, if it is a game that uses type 1 sequence format, it should be safe to export as midi, mute channel, then re-import.
It all sounds a bit tricky but this would be the only way to do what you want to achieve.
I'm using SEQ64. I managed to get the songs to play, but it crashed at 15secs in. I thought it might be pitch bend, but still looking into it.
I export the midi, edit it to remove the notes I don't want to hear, and export the midi back into the rom with SEQ64. It changes the formatting slightly due to the SEQ64 optimization process. It play with the notes missing until Project64 crashed at the same time.
I'm only using first- party game for now. Working with Mario Kart 64, Luigi Raceway at the moment. Project 64 crashed at 15seconds when the 2nd section of the song starts (bass line pitched bend down at this point). I removed the notes that pitch bend and it still crashed.
Will tinker around a bit more today to see if I can find why it crashed.