Next Page

Converting .minusf to .xm by flowerzink at 2:51 PM EDT on June 13, 2012
So yeah, that's about it. I want to convert N64 music rips to .xm or .it files that can be then opened with a tracker.
What I need is an overview of the process I'd need to follow or to know whether it would be possible or not.
I believe I could do the coding myself if someone could point me in the right direction.
So, that's all, I hope someone can help me with this!
by Mouser X at 4:59 PM EDT on June 13, 2012
The problem is that USFs are an unknown format. Yes, you can play audio from them. However, you're not playing a USF, you're running a Nintendo 64 emulator, which loads the data inside the USF. This data contains N64 programming code. *THIS* is what plays the audio (the N64 program, running on N64 hardware, which is being emulated on your PC). The emulator then "pipes" the audio from the N64 (emulated) to your PC's speakers. As such, we don't need to know the internal structure/format used. We let the original system/software do that for us.

Think of it this way - Imagine that someone creates a new sequenced format (lets use PxTone as an example), *.org, but leaves it as closed source, compressed, and encrypted (I'm pretty sure that PxTone doesn't do this. I'm only trying to illustrate how difficult custom formats *can* be). This would make it very difficult to figure out what the internal data of the *.org is like, and thus it would be very difficult to "convert" it to a different format. Essentially, this is what a USF is. Rather than reverse engineer the N64 program, it was easier to emulate the N64, and let the original program do its own thing.

So, in short, USFs are more like a container format, in that they contain data (an N64 application, and data (which combined create a partial N64 ROM, of sorts) of an unknown type. And, because all N64 games are different (for the most part), even if you figure out the format contained in 1 USF set, you'd still have to figure out the format contained in a different USF set. There would certainly be similarities, but they would most likely not be completely the same.

That said, theoretically you could convert a USF to XM, even without knowing the internal format of the USF. However, I don't know how to do that. I think it involves "listening" on the different "channels" and then copying each "channel" individually. The process is probably similar to "converting" a NSF to a MIDI. OpenSPC could convert SPCs to IT files, without knowing the "format" inside the SPC (an SPC is, essentially, a "savestate" of the memory of the DSP unit of the SNES, if I understand it correctly. Thus, it *could* be any kind of "format". Though, at that point, I'm pretty sure I'm confusing the issue). It was able to do this, because it would emulate the SNES (or the DSP, as that's what's used to play SPCs), and through emulation, it could "split" the "channels", and then, essentially, record the samples as they were played in the emulator. It technically didn't extract the samples from the SPC (if I understand how it worked, that is).

Anyway, what you're asking for has never been done for the N64. It seems to me that you'd be best off either reverse engineering each USF set individually (thus figuring out all the different formats that were used for audio on the N64), or creating a new USF player that operates similarly to OpenSPC (or something like that).

I realize my response isn't terribly useful to you. I'm just trying to help you realize/understand that what you're asking for is a lot harder than it sounds. Mouser X over and out.
by flowerzink at 6:07 PM EDT on June 13, 2012
Oh well that's a bummer, but not entirely. You said there should be a way of splitting the tracks and that's exactly my final purpose, so even if there's no way of converting usfs I'd still be interested in playing each track individually.
Any way you could help me out?
by WDLmaster at 8:16 PM EDT on June 13, 2012
It IS possible but you have to do all the work yourself. And it depends on the game, because not all games have been reverse engineered yet. You need the ROMs of the games, not the USFs!

Get this tool here, to convert the sequences to MIDI (without samples):
http://www.goldeneyevault.com/viewfile.php?id=211

Then this tool, to extract the samples:
http://goldeneyevault.com/viewfile.php?id=212

Now to the very time consuming part: you have to re-assemble all the instruments with the samples and the key-mapping given by the tool. Not every game is supported (of course) and sometimes samples are corrupted/missing… Create an .ITI file for every instrument (assuming you're using impulse tracker format) and save it under the same decimal (not HEX!) number as shown in the tool.

The following steps assume you're using ModPlugTracker:

I don't know how good/bad other trackers can handle MIDI files, but if you're using MPT, you can drag the MIDI file into the program to convert it to impulse tracker format. But before you convert it, you should open the MIDI file in some sequencer and set the bmp to 125 or it won't match the tracker's pattern. Go to the instrument tab and load the respective .ITI file with the same number as shown in the midi program edit box. One exception is midi channel 10. It depends (again) on the game how to "implement" this correctly. Some game's drum kits are incomplete or missing altogether. If that's the case, you have to use some other sample. If the drum kit is complete, you load this instrument only ONCE and replace every "channel10-instrument" with the first "channel10-instrument" or you end up with hundreds of redundant samples. Another possibility is to use a VSTi plugin with a fitting drum kit. In some cases, the standard GM-layout is used. Depending on the game's music style, you get a pretty accurate representation of the original sequence.

But you have to tweak and correct a few things here and there. In almost every case, portamento effects and volume slides are messed up. Sometimes a note-off command is missing because an instrument suddenly jumps to another channel. But I believe that's the poor MIDI support in ModPlugTracker and not a faulty MIDI file.
by Mouser X at 9:00 PM EDT on June 13, 2012
flowerzink said:
You said there should be a way of splitting the tracks and that's exactly my final purpose, so even if there's no way of converting usfs I'd still be interested in playing each track individually.
Any way you could help me out?


No, that's far beyond my skill level (I can sort of read source code. I certainly can't write it). Also, the "splitting" I mentioned has to be done at the hardware/emulator level. It would have to be custom written to do it (and, because of the way the N64 does its audio, I don't even know if it *can* do it). This is why I mentioned openSPC. Take a look at that source code, figure out how it does its thing, and then get some N64 source code (or maybe the source to 64th Note?), and see if you can figure out how to simulate the effect in the N64 source.

Worth mentioning is that the method WDLmaster talks about is, essentially, what I talked about in my second paragraph. Someone reverse engineered the format for N64 sequences. However, as I said, not all games are the same, so the tool doesn't necessarily work perfectly (or in some cases at all?) every time. And you still have to "extract" the audio samples out of the N64 ROM (which again, doesn't always work).

The "splitting" method I mentioned is "better", because it can assign samples to the "channels" as they're generated/emulated. Whereas, with the method above, you have to do that manually. However, the manual method is something that works *right now* (even though it's very time consuming, annoying, and can easily have "glitches" in it, depending on the game/song). The "splitting" method hasn't been done on the N64, and thus you'd be starting from square one there.

Either way, it's not easy. One method works *right now*, but is a pain for every song you want to convert. The other method is a *serious* pain right now, but if done "right" will drastically simplify the process in the future. I guess it comes down to "Are you willing to put up with a little discomfort all the time, or would you rather have all the discomfort happen *ALL AT ONCE*, but (once you're out of the hospital...) then have smooth sailing afterwards?" Most people go with the extended plan, because in the short term, it's not likely you'll be doing much converting anyway.

Sorry I can't help. Hopefully the method WDLmaster talks about is more up your alley. Either that, or good luck rewriting an N64 emulator (I just can't think of any other way to do the "splitting" method). Mouser X over and out.

edited 12:10 AM EDT June 14, 2012
by flowerzink at 12:30 PM EDT on June 14, 2012
Alright, thanks guys. I think the MIDI extraction method WDL mentioned should do the trick, because my final intention was to get the notes for the songs, so a MIDI should suffice.
by Dutchie at 8:44 AM EDT on June 15, 2012
playing each track seperated is not as impossible as it sounds like, i have some neat tricks to mute specific sound channels usin an emulator and some cheats

if you manage to find the channel volume adresses, you could poke the value to 0 and then freeze the value, if this works depends on the game

however, personally i prefer to rebuild the soundtracks by ripping all possible data from the rom and use my own fellow tricks to make it sound like the origional [using a MiDi editing software]

i could give a full detailed explanation on how to listen to each track seperatly in an emulator, but its a pretty complicated story
also recordin each track seperate takes very lon and you need some serious patience
seriously, if you scan the ram of a N64 emulator, youll find over hunderds of thousands of adresses, findin the 16 channel related adresses is a pain in the ass

after all, the recordin isnt even going to sound right

cause this is wath youll end up with
Mk64 rainbow road N64 multitrack [audacity is required for playback]

this is why i prefer rebuildin them manually
Mk64 rainbow road FLS


if you found a game of wich you can rip both the samples and sequences [like super smash bros], its just a matter of convertin all the data into your favorite file extention, these conversations are the most acurate and will not take much time to make
i converted the entire super smash bros OST to FL studio, just so i can mess around with it, it took about a week have the entire soundtrack in fl studio format
by TheUltimateKoopa at 9:38 AM EDT on June 16, 2012
So, Dutchie? Remember when I uploaded Moo Moo Farm, and you said as long as I don't mention any technical details of how you did it, it'll be alright? And then said that I should put something like: "remastered by falken insane"?

Would that be OK, if I uploaded the Rainbow Road theme, and if possible, any other remakes you upload? If anyone asks "How did you do it?" should I just say "I don't know"? :P And will you eventually have done all the songs in Mario Kart 64?

On a related note.... will you be releasing the entire Super Smash Bros OST remake, when you've finished?
by Dutchie at 10:48 AM EDT on June 16, 2012
you can say everything as you dont mention midi or soundfont

its ok if you upload the song [probebly to BrawlCustomMusic], if someone ever askes how, as i said before, you can tell them everything as long as you dont mention midi or soundfont

i was actually planning on telling this before but iam still spending much time rebuilding the mk64 OST, and i can take a guess telling ill be done somewhere near the end of 2014

yes thats pretty long, realise that i need a good 12 to 20 houres to make rebuild the songs as acurate as possible

why so long? i do not aim towards acurate notes, i pretty much go after precision note timing, note velocity, channel panning [this is harder than it sounds like], mixing, equalizing and mastering

ill do some more bug fixing on the ssb ost, then ill post it here [probebly tomarrow, if not the day after]

meanwhile, keep yourself buissy with this

edited 10:48 AM EDT June 16, 2012
by TheUltimateKoopa at 5:47 PM EDT on June 16, 2012
"yes thats pretty long"

That's a good thing.

You've heard that 'famous' Miyamoto quote, haven't you?
"A bad game is always bad, but a delayed game is always good". In other words, if you rush it too quickly, it'll turn out bad, but the longer you take to make it perfect, the better.

So, does it take more than a whole day, just to get one song done? So far I've gotten Circuit, Farm, and Rainbow from you, as well as that Title theme with the extra part you added (the one where you said you weren't good with chords or something :P)

Just a short question about Smash Bros, regarding 3 tracks....

Firstly, the Menu theme.... each of the ... 'parts' of the song have their own 'loops' if you know what I mean. In otherwords, one part will be maybe over 1 minute long, and another part might be only 50 seconds long, and won't all start at the same time until a long time later.

On a similar note, the Training theme has a rather long single loop. The main part has a loop of something around 20 seconds, however, there are extra parts that are added, or taken away, after each loop of the main part, as you're most likely aware... the official soundtrack, and consequently the USF rip here, has this timed at around 4:47. However, the full length of a single loop is almost 10 minutes, because the part after 4:47 and before about 9:40 is not the same as the part before it. Let's say you have the parts named as 'A', 'B', and so on, for the first almost-5 minutes, you'll get A, B, C, D, E, F, G for example, then while it looks like it's repeated at 4:47, it might then go something like, D+A, E, B, C+F... etc, and then after about 9:40 it'll then have something like A+E, and then at about 9:50-10:00 it'll then loop. I know this is probably confusing.... but if you want the full version, I'd record it for just over 10 minutes -- yeah, it's very long. Infact, when I made a BRSTM of it for BrawlCustomMusic, the loop I have starts at 39 seconds (39.3346 to be exact), and ends at 596.6409 seconds (9:56), and the track lasts for 19:23 if you have it set for 2 loops + 10 second fade-out.

Thirdly.... the Master Hand Battle. One of the 'guitar' tracks only plays once, but never plays after the first loop, which you'll notice as soon as the loop begins again.

Now, my question is... particularly with the menu, how will you go about these problems? The 2nd one is just merely patience for being bothered to record that long, and the 3rd one isn't really a problem as much, but the Menu theme probably doesn't properly loop for maybe a few hours. So, for the menu theme will you just go for whatever length is close enough to 2 loops, which would be something around just over 2:10-2:20 in length?

Oh yeah, and you know about that 'hidden' section of the 'winning' results theme in Mario Kart 64 that plays after about 53-54 minutes, right?
http://www.youtube.com/watch?v=Iqqsewbj5Qw

edited 6:10 PM EDT June 16, 2012

edited 6:36 PM EDT June 16, 2012

Next Page
Go to Page 0 1 2 3 4

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source