I was able to extract the full set of sounds from the file after making a small edit to the python script dfsdtpk.py (which is called from SND2WAV). A DTPK sound file contains a certain number of sound "groups", each of which can have multiple "tracks" that represent a single sound. The Shenmue SYSTEM1.SND file does not specify the number of tracks so the script was extracting only the first track from each group. To extract all the sounds, set the number of tracks directly (around line 96 of dfsdtpk.py) to something larger e.g. "ntracks = 0x10".
Anyway, these are the sounds that make up the third "group" in the file - mainly the QTE-related sounds plus the notebook page turning sound:
Tracks 0-7: short QTE beep
Track 8: four quick beeps
Track 9: QTE action correct sound
Track 10: QTE action incorrect buzzer
Track 11: notebook page turn 1
Track 12: notebook page turn 2
Track 13: short beep
Track 14: short beep (quieter)
Tracks 15, 16: silence
Track 17: warning chime
raymonf wrote: Looking at it, it could be a pointer to where the sound file is at, or the length of the audio file after that header.
Maybe you made the game keep trying to play the sound at 0x0000 (because that's where you set it to) for a certain thread of the sound engine (not sure if thread is the right here, not sure what the DC arch is like), causing it to become an infinite loop there, and thus not play any sound from that file/thread or something?
Yes, something like that sounds likely. And since the four bytes correspond to the third group of sounds, all the sounds in the group listed above get muted after if these bytes are modified.
Radar wrote:It's been more than year since I tried to do anything with sound, but from what I remember this is how I approached it
This is how snd file looks like. First part I believe consist of data, like where samples located,Volume,Pan,DSP effects, notes(frequencies) etc. and etc.. Second part is pure samples. So my approach was to locate certain sample(s), fill them with "silence" and that's it!
That's great! I did not realize these samples could be played directly from the file. I think this is the easiest way to achieve BlueMue's goal for now.
I referenced your old post
here and tried loading the file into AWave Studio after renaming it to SYSTEM1.YADPCM and can play & view the waveform as in your screenshot. Now it should not be too difficult to locate the position of the QTE-related sounds from within the waveform.
About the DTPK sound file format, I was able to glean some interesting clues about the structure from kingshriek's extractor python scripts but not enough to be able to identify how specific samples are treated. Some more poking around might pay off though.
KiBa wrote:What is this mutilation of innocent code? You'll never get away with this.