Previous Page

by Nisto at 10:01 AM EDT on May 25, 2018
@MarkGrass: Thank you for sharing that. However, I see that it makes use of the center and finetune values. Unfortunately, I don't think you can rely on center/finetune to be configured in such a way that middle C will play the original sample rate (and I assume that was your idea with using SsPitchFromNote?). Because, it seems that sometimes, composers may also tweak these values to inherently "redefine" the original pitch of a sample (if that makes sense?).

I've tried doing something similar with Silent Hill (using the center and finetune values), but it just didn't add up. We know where the majority of the BGM samples in Silent Hill are sourced from, so the outcome should have matched the pitch of at least some of those, but it simply didn't for any of the samples I checked.

I believe all samples are actually natively interpreted as having a rate of 44100 Hz, even if that wasn't the original sample rate, because if you play the Center-assigned key, the output pitch will be just like if you were to play the raw sample data at that rate (provided finetune is 0 of course). Awave Studio also interprets VAB samples as 44100 Hz.

(Sorry for stealing the thread.)
by AceK at 7:23 AM EDT on October 12, 2018
@Nisto

Question. Did you had concerns about detecting the sample frequency of .vab files encoded from the .vh (header) file? I have a save state mod with this game that can be used with Cheat Engine (using the SPU debug) to detect the frequency of the .vab (at least until whenever the calculation method is figured out). You just need the frequency/other values in mind to verify and replace the values as it loads it up in-game.

edited 7:23 AM EDT October 12, 2018
by Nisto at 5:01 PM EDT on October 13, 2018
@AceK: I appreciate your tip. However, the problem is that the sample rate/frequency would stem from a key-on (if I understand your idea correctly), so the reported sample rate would really only be the playback rate of the sample. I think it's impossible to (reliably) calculate the original sample rate of VAB samples.

Here's my theory: the SPU clock rate is 44100 Hz, so the base frequency of VAB samples is inherently 44100 Hz as well. But you also have the Center (semitones) and Finetune (cents) values (in the sample's "tone" entry in the VAB), plus the notes in the sequence data. So basically, everything is relative to 44100 Hz, and the composers and/or conversion staff are forced to conform to this spec when converting/creating their data. For an example, if you set Center to be, say, 64, then, playing key 64 would play the sample at 44100 Hz; key 52 (one octave down) would play it at 22050 Hz; key 76 (one octave up) would play it at 88200 Hz, and so on.

If you're lucky, the creators used the Center/Finetune values so that playing middle C (not to be confused with the Center value) would match the original frequency, in which case you could *probably* use those values to determine the rate. But when you think about it, there's certainly more than one way to achieve the composer's intended output than tweaking the Center and Finetune values so that they match the original sample rate. To reflect the new base frequency, you could transpose all the keys in the sequence data instead, for example. Another possibility is that they didn't even convert any data to begin with - the VAB bank could have been built from scratch with VABTool, with a Center/Finetune configuration that was simply to the composer's liking for the music they had in mind, where they may have simply "redefined" the base pitch of the sample.
by AceK at 6:24 AM EDT on October 14, 2018
@Nisto

I agree with the fact that playback rate is varied based on key note, but not sure about the original sample rate unless it was assigned with a key-note outside the original range. To be fair, I can't really establish where the key-note offset is in this case.

My reasoning may be off, but I attempted to use this when comparing a sound file from other games that use the same bgm and comparing frequency rates from there. So for example, in Street Fighter EX3, the Capcom logo is slightly lower pitched than what is normally played when comparing to other games that use the same logo bgm (MvC2 on PS2 for example)... a rough guess is like maybe 43500 Hz.

With help using the save state override value modification on TM4 for PSX, the frequency pitch converts/calculates to 44100 Hz (003C Little Endian calculates to 44100 Hz) which, if compared with the audio in-game, is very "slightly" higher pitch than normal. What's weird though is that it plays at a frequency very close/identical to the logo theme present in MvC2 and other games.

By chance, was the file structure already worked on (unless it is different per game/system)? Street Fighter EX 3 and Twisted Metal 4 seems mostly the same (the values in offset 0x00~0x01 differ and am not sure about what they do, at least in TM4... I'm going to see what it does in SFEX3 [Edit: got nothing]).

edited 10:10 AM EDT October 14, 2018

Previous Page
Go to Page 0 1

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