[hatari-devel] LMC1992 and Microwire emulation
Laurent Sallafranque
laurent.sallafranque at free.fr
Thu Mar 18 23:39:07 CET 2010
Hello,
I've uploaded the first release of LMC1992 bass/treble emulation.
I haven't optimized anything for now on purpose. (I've kept all the
float variables).
Optimizations will come after everything works well.
I'm doing all my tests with Protracker STE.
For now, it works but I can detect some problems :
- if I move the bass slider to negatives, there's no more sound.
- if I return to positive values, sound comes again
- if I go to -10 value, sound is definitely lost.
I've also got a question : how should I use the gain variable ?
(can I consider it as the master volume ?)
Which range of values does it accept ?
I've set it to 1.0 for now.
for info, here is the microwire range of values for the master volume :
000 000 : -80 dB
010 100 : -40 dB
101 XXX : 0 dB
TODO:
- take into account the table_50, table_25
- take into account the 6, 12, 24 and 50 Khz sound replay frequencies
- optimize everything from float to int.
If code isn't finished for the main release, there's just to comment the
following lines to remove the bass/treble emulation.
/* Apply LMC1992 sound modifications (Bass and Treble) */
for (i = 0; i < nSamplesToGenerate; i++) {
nBufIdx = (nMixBufIdx + i) % MIXBUFFER_SIZE;
MixBuffer[nBufIdx][0] = IIRfilterL(MixBuffer[nBufIdx][0]);
MixBuffer[nBufIdx][1] = IIRfilterR(MixBuffer[nBufIdx][1]);
}
Many thanks to David for the FIR code.
Regards
Laurent
More information about the hatari-devel
mailing list