Even better, just rehire the original voice actors and rent a studio and record everything at 24-bit 192Khz. :)
Printable View
You need to calm down. I was just saying that the sample rate you had your samples at was way too high. Sorry I was wrong on the exact incorrect frequency you used. For the record your samples are at 11025Hz. That's still way too fast and wrong but I guess we need to be correct about how wrong the sample rate is to satisfy you.
When I import your bins into Audacity as raw unsigned 8-bit PCM at 4800Hz it sounds spot on to what Stef posted earlier, though with a bit more aliasing.
Ripping them from the Arcade ROM would probably be best as tomaitheous mentioned if the ones I linked on the last page aren't good enough. Though it might not be a bad idea to look at the PS1 version of Capcom Generation 5. If I remember correctly the PS1 ports of Capcom's fighters typically had higher quality voices than even the Arcade versions as they were from the source recordings rather than the Arcade samples.
Given that any PS1 SF2 samples will be in PSX ADPCM format, are they really going to be any better than the original arcade ADPCM as far as playing on the MD DAC goes? Granted, Sony's ADPCM is better than the old ADPCM used in the arcade, but once you convert both to 8-bit samples, I doubt you'll hear the difference.
Quite the opposite, really: it might even sound too good and thus not at all faithful to the original MD port................. - So let's find them!!
@Stef: If I reconstruct the WAV source file you provided exactly the way it was but with new samples, you can work with that, yes ? (Just checking here to get confirmation before starting such a tedious task)
I did a few quick resampling tests with the arcade recordings using different parameters but yeah, not much better than what I got when tweaking the original MD PCM source. It's too early to give up but I am not quite as sure as before that we'll get something better out of the arcade/PS1 source material in comparison to what Capcom did.
I may be saying shit but it would probably better to wait for a first version of Stef's driver prior trying to convert all the samples to an arbitrary frequency.
I mean, it's good to know which source could give us the best quality and which tools are good for the task, but the target frequency of the samples will depend on the Stef's implementation AFAIK.
Actually, I think both the bitness and the frequency will depend on the efficiency of his code and the way he will be handling the PCM playback. And Stef probably will have to try several different options to be able to state which one will be the ideal for his driver.
Well on the positive side is that while it doesn't sound much better at first glance it certainly sounds less scratchy :)
This is a great project! I was thinking of something similar (but much sillier) involving an external sample playback circuit, where you'd just write a byte to some odd memory address to trigger a voice sample. That would leave the current sound engine in place, and just replace the voice playback calls with writes to this configuration. Of course your idea is much better and I look forward to seeing it in action.
I don't think the source is going to matter a lot. You won't be reaching 44.1KHz playback on the MD in real-time anyway, so ripping from MAME, the real arcade board, or the arcade ROM won't make a big difference here as they will all be substantially better than the original MD one even if down-sampled.
Sorry for the late reply... I would say yes, the samples i published are directly ripped from the rom so if you provide yours exactly in the same format (exact same sample rate, duration and position) i would be able to replace them byte as byte in the rom :) But i guess it's almost impossible to set them exactly as they were originally !
Actually i don't really plan to change the sample rate and doing funzies things. I want to keep sort of compatibility with the actual driver and so keep the same rom size. As there is not much blank areas left in ROM i would use the exact same locations and sizes for the samples. The only difference i can operate is to use 4 bits ADPCM encoding instead of the actual 8 bit PCM one and so have sample rate @ 9.54Khz (4.77 * 2) but again i am not sure that 9.54Khz ADPCM will sound any better than 4.77Khz PCM, ADPCM does not work well on low rate and almost time it's better to stay on PCM. To be honest, maybe the actual samples are not that bad after all, it's 8 bits PCM @4.77 Khz and maybe we cannot get any better from that :-/ Rom size limitation definitely hurts for this... still, remove the DMA contention will already improve *a lot* the playback quality compared to original game ;)
Stef: If you're sticking with the original rom size, and there's not much free space- if any, maybe you could compress them PCE style and then raise the playback rate?
8bit@4.8khz is 4800bytes per second for the original rom. PCE is doing 4370bytes per second, and they sound pretty clear; 7khz@5bit per sample. The bit unpacking isn't that bad, the z80 should be able to handle it. The sample stream is in packets. The first byte contains eight 1bit (LSbit), then followed by 4 bytes. The following four bytes are the upper 4bits to each sample. So each byte holds two samples. At room for 4800bytes per second, that would allow you to do 7.6khz playback rate at 5bit (shift/padded to 7bit for mixing).
What about doing some basic real-time interpolation? Out of the question? It should reduce the amount of noise a bit.
Interpolation is not that great, it usually sound very "low rate" when you interpolate from a such low rate. Without taking in account that will be huge for the Z80...
That might be a solution but in this case i think i would go for 4 bits sample instead (even easier to unpack), i think the out quality should be on par.Quote:
Stef: If you're sticking with the original rom size, and there's not much free space- if any, maybe you could compress them PCE style and then raise the playback rate?
8bit@4.8khz is 4800bytes per second for the original rom. PCE is doing 4370bytes per second, and they sound pretty clear; 7khz@5bit per sample. The bit unpacking isn't that bad, the z80 should be able to handle it. The sample stream is in packets. The first byte contains eight 1bit (LSbit), then followed by 4 bytes. The following four bytes are the upper 4bits to each sample. So each byte holds two samples. At room for 4800bytes per second, that would allow you to do 7.6khz playback rate at 5bit (shift/padded to 7bit for mixing).
Maybe that could be a good test : take the original CPS-1 samples and compare different conversion without any filtering :
- 8 bits @4.77KHz
- 7 bits @5.45KHz
- 6 bits @6.36KHz
- 5 bits @7.63KHz
- 4 bits @9.54KHz
Honestly i don't know what is the best... The voices in Space Harrier are played from the PSG and so are 4 bits (not really as it uses log level) and they sound really nice ! So maybe 4 bits at higher rate could be a better choice.
Either of those two should sound the best. Raise the amplitude over the overall samples to the max (clip if you need to). The human ear can't hear 'noise' in loud parts of samples as much (like yelling and such), and none of the SF2 samples have quiet parts. So prep them as such. Whatever noise you hear from the lower bit depth, will be covered up by the other music that's playing anyway. And the high frequency also makes up for the difference in depth/resolution.Quote:
- 5 bits @7.63KHz
- 4 bits @9.54KHz
Well, let me ask you some weird questions:
Let's suppose we have a 2 PCM channel driver, from Stef, running in SFIICE.
In Dhalsim's stage there are those elephants making noise.
Their noise gets cut when the 2 PCM channels are busy (sometimes just one is enough in the actual version, since there seems to be a bug in the original driver according to Stef), but let's suppose we want to preserve their noise...
Is it doable (taking efficiency and cycles into account) to "route" at least one of the noisy elephants to play its sample through the PSG *only* when there's not enough PCM channels available?
Furthermore, if we used 4-bit samples only for the elephants', could the same samples be "compatible" with both the FM chip and PSG sample playback? Or we would need to have a copy (using different format) of each sample we wanted to possibly route to the PSG?
Mixing samples in software is way cheaper than trying to play them on the PSG. Mixing 3 channels at 4.77KHz seems quite doable since there's a 4-channel 16KHz PCM driver Stef wrote for SGDK (though that one might have some limitations that are not appropriate for SF2). Actually using the 3rd channel would require some modifications on the 68K side though.
Show to Capcom Nintendobitch how to make good PCM sample in Street Fighter 2 guys :mad:
I think you misunderstood, i meant they come from the original MD game ;) I just ripped them from the MD rom as pure PCM data and converted them to a wav file ;) To be able to reuse some samples without touching address / length data of each sample (which are contained in the driver) we need to put the new samples at the exact same position.
Honestly i think it would be easier to handle 3 PCM channels just by software mixing that trying to use the PSG for the third channel. Also the base audio driver is hardcoded to handle 2 PCM channels so trying to add a third one would be a bit tricky (definitely possible but require extra processing on Z80). Right now i just want to make it sound good with the already present 2 PCM, but that could a future improvement (make it 3 or even 4 channels).Quote:
In Dhalsim's stage there are those elephants making noise.
Their noise gets cut when the 2 PCM channels are busy (sometimes just one is enough in the actual version, since there seems to be a bug in the original driver according to Stef), but let's suppose we want to preserve their noise...
Is it doable (taking efficiency and cycles into account) to "route" at least one of the noisy elephants to play its sample through the PSG *only* when there's not enough PCM channels available?
Furthermore, if we used 4-bit samples only for the elephants', could the same samples be "compatible" with both the FM chip and PSG sample playback? Or we would need to have a copy (using different format) of each sample we wanted to possibly route to the PSG?
Edit: Just realized i repeated Mask Of Destiny about the PSG solution ;)
Actually it should be pretty easy to test it, just placing the PCM data at 1MB in my test rom and that is :) I do agree your samples are less scratchy but it looks like you removed high frequencies and used interpolation so they also sound "low rate" and muffled. Still we can test it to see if the final result is better than originals ones.
I say just take out the elephants. In the CPS1 original they were always so obnoxious with their sounds on that stage. I try to clear it as fast as possible so I don't have to have that awful elephant screech going on.
Oh yes, I fukkin hate them so much!
It seems the original samples tried to "save" high frequencies by needlessly increasing the remaining mid frequencies prior to downsampling which is why they were pretty screechy. These sound a bit more natural to me for 4.77khz. Maybe too bass-y, but that can be fixed in a few seconds if needed.
Thanks for the reply, guys. It was just a theoretical question 'cause I'd like to learn a bit more on the subject.
@Others
Relax, guys, I also think those elephants are quite annoying but I thought it would be a good opportunity to learn a bit more with the tech masters of the forum around here.
Oh boy, this project mixed with Pyrons color hack... dream come true!
Keep up the good work!
Stef: There's ~43k free space right after the last "sample", in the rom.
Stef, promise me we will do something similar to SSF2 and Bare Knuckle 3 too. SSF2 has a soundtrack unique to the Mega Drive port, but the voices are way too loud in the mix (even louder than in SF2CE). Bare Knuckle 3 is pretty much perfect as far as voices go but its drums sound terrible and it cuts out voices/sfx all the time (unlike SOR2).
Well no sorry, i can't promise that ! For SSF2 if it uses a similar driver (and i believe it is the case) why not, but for SOR2 or SOR3, there is chance the driver is totally different and that would be too much work... but i can promise i will have a look in them at least ;)
Edit: somehow mixed SOR and BK :D
Wait, SoR2 and SoR3 have "good" voices? The samples are scratchy and terrible in both games. If you want a game with good samples look into Dynamite Headdy.