PDA

View Full Version : How to fix ZC's SPC APU



Dart Zaidyer
07-10-2004, 03:15 PM
Okay, since the old thread got nuked, I'm going to re-cap the current findings.

Right now, ZC's SPC APU is the cream of the crap. The best way to fix it is to just get a better one.
In the meantime, fixing AlSPC by taking the pitch down 50 percent (or one sharp note lower on a musical scale) ought to correct the pitching problem. Be SURE to compare the results with a sample of SNESAmp's output. If that doesn't work, then what sort of scale are we working with here?
Remember though that this still won't solve the muddy timing or lack of a lowpass filter.

Dark Nation
07-12-2004, 07:38 AM
Fifty percent would drop a song by an entire octave, not a half-step lower. Repost the examples you have and I'll try to figure out the correct pitch change. As for getting a better SPC engine, find me one that is written completely in C/C++ (no assembly) and I'll look at incorporating it.

Dart Zaidyer
07-12-2004, 05:37 PM
HERE (http://www.zcworld.net/filemanager/Users/Hero_Link/Music/zcspc-compare.wav) is the original comparison wav file. It's going at 32khz, the same quality as a real SNES.
There doesn't seem to be any kind of reliable mathematical formula I can figure out that doesn't change when you decrease the hz rate, so... You may have to play it by ear. On that note, I'd recommend fiddling with AlSPC's standalone player to hammer out the absolutes instead of recompiling ZC a bunch.

Before the old thread was time-ripped, FCF posted something that could translate Assembly to C++. Perhaps you could ask him about it and check it out?

fatcatfan
07-12-2004, 07:06 PM
yeah, but the software was not free, and the demo is not functional enough to convert snesapu. Besides, even a conversion like that would probably fall under its GNU license.

MottZilla
07-13-2004, 03:57 PM
What ever was wrong with using OpenSPC to convert SPCs to IT files?

Dart Zaidyer
07-13-2004, 10:17 PM
What's wrong with OpenSPC dumps? Well, I said it in the old thread, but I guess I'll have to repeat it. The primary reason is that it takes up a lot more space. ZC users have displayed an alarming allergy to downloading anything that could amount to an entire quest along with an entire quest.
The other primary reason is that OpenSPC suffers from the exact same problem as AlSPC, and imprints it into the IT dump. Which means in order to get a decent reproduction, you not only have to adjust every single sample by hand, but you also have to edit the song itself to fix the muddy timing and insane note handling. (It turns down the volume to end a note, rather than actually cutting the note off like a real SNES. I have spent months trying to work this out of the LttP soundtrack alone.)

SPC Emulation is a catch-all solution to these problems, and only really needs to be fixed once or twice at the core of the programming so that everyone can enjoy true SNES music without having to go out of their way.
But, it turned out to be crappy and nobody realised it, so that's why this thread exists.

MottZilla
07-14-2004, 12:42 AM
Uh, I never noticed anything horrible about OpenSPC's converted ITs. I DO see eye to eye with you on size, but I still think SPC emulation seems like it should be of low priority, afterall MOD music support was added and should be used. :p

Rydia
07-14-2004, 02:14 AM
IT files sound like total crap in ZC. They crackle and are very unpleasent. I wouldn't use the IT's.

Dart Zaidyer
07-14-2004, 10:38 PM
I'm going to have to ask that this thread be kept to dealing with ZC's SPC emulation issues, rather than spin off into a debate.
How's that fixing coming, DN?

Dark Nation
07-15-2004, 09:35 AM
The pitch issue has been fixed, I believe.

MottZilla
07-15-2004, 03:49 PM
DN, what does ZC use for tracker music? I guess later allegro's support trackers? I think I still use 4.0, but I use FMOD for my sound needs.

fatcatfan
07-15-2004, 04:02 PM
DUMB is what we currently use for tracker music.

Dart Zaidyer
07-15-2004, 10:35 PM
Wasn't it said once that the reason Tracker is all scratchy and poppy in ZC is because the settings were turned down low to avoid trouble? Assuming that's the case, perhaps it's time to turn them back up.

So, when can we expect some sample output of ZC playing an SPC with the new "fix"?

MottZilla
07-16-2004, 04:21 AM
That depends, does "DUMB" initialize the sound for itself or does it use allegro? Last I remember, atleast from seeing the DOS ZC, it initializes 22100hz. You'd want 32000hz for SNES quality. But ofcourse, all it may not be that simple. All I can say is with my programs I've used FMOD to play IT files created with OpenSPC and gotten good results.

Dark Nation
07-16-2004, 07:40 AM
Currently, ZC initializes DUMB with DUMB's default values. At some point, we're going to add the option to let the user determine what the settings should be.

As for a new music sample, wait for the testers to get Alpha 4 (no ETA on that). If the new code still isn't up to snuff, I'll probably have take it out altogether, since everyone here seems to hate the horrible noise it generates.

MottZilla
07-16-2004, 03:27 PM
I've never even heard what it sounds like. :o Never been aware of anything public that plays such and if so how.