A few questions about logging VGM's.

Talk about anything and everything about Sega's 16 Bit console and its addons here - hardware, games, memories. You name it.
Post Reply
WizardTheme
New Around Here
Posts: 8
Joined: Thu Feb 03, 2011 3:13 am

A few questions about logging VGM's.

Post by WizardTheme »

I've read through the tutorial and it all makes enough sense. I can log, trim, etc, no problem. Two things though:

1. I'm having some trouble finding loop points. Are there any shortcuts, tips or tricks to make finding them easier? Just getting a total (non-looped) song length would be great. I've heard mention of a VGM-to-MIDI method. Surely there must be a better way than listening nonstop until you just know where it loops.

2. I'd like some general info on the pointer hacking procedure for games that have no sound test. I've done some minor ROM hacking in the past and have dealt with pointers in some small way (mainly text pointers), but it's been a while.

So, are there any documents/tutorials on this? After reading through much of this forum and failing on Google search, all I've found is that there's a byte in the 68000 portion of RAM that can be changed to determine the track played. But what's the actual procedure for this? Is it something like: save state > open save state in hex editor > go to specific offset > incrementally change byte at offset > reload save state?

Any info will be greatly appreciated and I hope to have something to contribute sometime soon. :D
User avatar
Landale
Posts: 15
Joined: Thu Jun 29, 2006 6:49 pm
Location: Sweden

Post by Landale »

WizardTheme wrote:
1. I'm having some trouble finding loop points.


Making VGM packs isn't easy, it depends of course on how
careful you are. I can spend days with just one song.

Sometimes there is silence between each part of a song, often just a few milliseconds. Zoom in where you think the end of the loop is and look for a gap or a straight line. It's always satisfying to find the exact place. You can also take a snapshot of the loop points and compare them. If a trimming starts too late some channels may be silent, then move the finish marker to the left just a little bit, trim and listen... VGM-to-MIDI method may work, i've never tried it. You can also use VGM Loop Finder (vgmlpfnd):

http://www.smspower.org/forums/viewtopic.php?t=12441
It seems to be a pretty good program, but i prefer to find loops manually.
"Deel Klesso Ma Hahm"
WizardTheme
New Around Here
Posts: 8
Joined: Thu Feb 03, 2011 3:13 am

Post by WizardTheme »

Thanks for the tip, that's just what I was looking for. Though it seems manual verification is still needed/recommended. I at least have somewhere to start now.

I found a few games with sound tests that haven't been uploaded yet, so I plan to get my feet wet with those. But there are a few without sound tests that I'd still really like to learn the music pointer hack for, so someone take pity on me and give me some infos, please. :p
User avatar
Dark Pulse
Board Regular
Posts: 141
Joined: Wed Jun 28, 2006 2:16 am
Location: Buffalo, NY, USA
Contact:

Post by Dark Pulse »

I've always done my sets by ear. We had no handy-dandy tools like this of course. :p

However, despite such tools now existing, it is in my opinion - and as Landale said - best done by ear. Automated algorithms may not necessarily find the best spot; instead, it may pick a place that's considerably further off than it "needs" to be, so it will increase the file size due to having more logged. This is something that can only be solved by manual trimming, because no automated loop finder will find the shortest possible loop 100% of the time.

Also, ideally, the point should be as close to center-line as possible. This way you minimize the risk of some weird note or something like that.
Image
ValleyBell
Board Regular
Posts: 128
Joined: Mon Aug 30, 2010 7:10 am

Post by ValleyBell »

Depending on the game, the Loop Finder may or may not work. (The GENS engine, for example, plays all notes on "random" channels, so it doesn't work.)
In all other cases, it finds only correct loops (correct on command-by-command comparisation). Of course, you need to pick the right line, but the tool can evaluate the quality of the loops. (See readme)
The real advantage of the tool is, that you don't need to care about looping bugs.
But note, that the DAC is completely ignored. The desert-tune of Brave Battle Saga was one of these rare cases where the Loop Finder got a wrong loop.


Now I'll try to explain how the vgm2mid-trimming works. I'm using MIDI Orchestrator Plus for this and attached some screenshots.
Note: I used (already trimmed, but looped) vgms from the Sega Channel pack, because their loops are quite hard to find with waves and the Loop Finder doesn't work.

Step 1: Convert you vgm to a MIDI-file and open it in a MIDI Editor (should have a Piano Roll)
Step 2: (optional) Copy all tracks into one track (so you have an overview of all channels)
Step 3: Search for the note where the tune begins (in screenshot 19_01_Start it's the first one)
Double-click on the note to view its attributes (see screenshot 19_02_Start_Note) and write the time down
Step 4: Scroll through the file (or just listen to it) until you find a place where you think that it may be a loop point
Screenshot 19_03_NoLoop shows a loop that looks quite good, but proves wrong when you compare it to the start.
Screenshot 19_04_Loop shows the right loop. There's a red circle around that note.
Note its time, too (see screenshot 19_05_Loop_Note)
Step 5: Copy all notes (beginning with the circled one) to a new track and move them so, that you can switch between the 2 tracks to easily compare them. If you did something wrong, you'll notice it here.

Step 6: Now as you got all the times you need, convert the vgm to a txt-file and open it.
Step 7: Search for the start time noted (add or subtract 00.01, if the search fails) and look for the next larger delay (> 400 samples or so) you can find.
Then note the sample value at that time (see screenshot 19_06_Start_in_vgm2txt)
Step 8: Do that for all other times you noted (end point and loop start maybe)
Step 9: Use the sample values to trim. (Tip: vgm_trim generates smaller vgms, but you need to care a lot more about your start sample.)

I think that should be all. Some feedback would be nice.
You do not have the required permissions to view the files attached to this post.
Post Reply