Bregalad wrote:Looks great !
Too bad your video doesn't demonstrate decoding of unstable BRR samples that caused so much problems to emulators (heard for example in "Musica Machina" from FF5).
Those all work, however I do still seem to have a minor issue; the channel to channel modulation does not appear to work correctly; it seems that it needs to modulate more than the docs say.
I used the blargg documentation and checked out his library code to make sure it conformed to the documentation and it seems to.
This results in the wind effect on chrono trigger not sounding quite right: they modulate the channel playing the "unstable" BRR sample to cause its pitch to rise/fall. It works OK but the depth of the pitch change isn't enough.
Other than that I can find no issue decoding the samples. I use all fixed point decoding of course (like a real spc would), and having even one tiny error is enough to cause huge problems with most samples. Even something like one wrong carry on a low bit of one of the coefficients is plenty to cause some things to wrap which causes clipping.
I wonder if the earlier emulators that had problems were using floating point to calculate the IIR filtering after the BRR decoding or something. That would cause them to sound OK for normal samples, but to go pear shaped on anything that required bit precise wrapping behaviour.