Hello again! I have made some discoveries:
- I believe I have found the problem with the Voxelito patch, and it is actually from the
oscillator.cc(so any use of the vowel wave should sound bad). The problematic line is
uint8_t x = S16ClipS8(4 * result) + 128;
Specifically, the (optimised)
op.hdoesn’t work properly. You should replace it with the unoptimised one:
return x < -128 ? -128 : (x > 127 ? 127 : x);. The
RenderVowel()function is the only time ever in the Ambika code that the
S16ClipS8function is called, which I think is why it was hard to pick this one up.
My Voxelito patch sounds good now, but could you try this change out in your code and see if it fixes the problem?
- As for the RenderCz* functions: interestingly, they have all in common that they use ReadSample(), which is used nowhere else in the code. I wonder if manually inlining the
ReadSample()function by hand - i.e. replacing calls to it with the corresponding
ResourcesManager::Lookupcall might improve things? Anyway, I used the UPDATE_PHASE_MORE_REGISTERS trick that you suggested, and the ‘Badtaste’ patch sounds good, so no real worries here.
So at this point I’d say that the new voicecard firmware is sounding just like the stock one! I’ll upload a hex file here in case anyone wants to test.
ambika_voicecard.hex.zip (36.3 KB)