From f4cc45d367442f850baecd814003ec09790a43b0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 2 Mar 2013 14:09:39 +0200 Subject: MT32: Sync with the latest changes in munt The major change is the addition of a refined wave generator based on logarithmic fixed-point computations and LUTs --- audio/softsynth/mt32/mt32emu.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'audio/softsynth/mt32/mt32emu.h') diff --git a/audio/softsynth/mt32/mt32emu.h b/audio/softsynth/mt32/mt32emu.h index 6812f7bc8a..971a0886d5 100644 --- a/audio/softsynth/mt32/mt32emu.h +++ b/audio/softsynth/mt32/mt32emu.h @@ -59,18 +59,6 @@ #define MT32EMU_MONITOR_TVA 0 #define MT32EMU_MONITOR_TVF 0 -// The WG algorithm involves dozens of transcendent maths, e.g. exponents and trigonometry. -// Unfortunately, the majority of systems perform such computations inefficiently, -// standard math libs and FPUs make no optimisations for single precision floats, -// and use no LUTs to speedup computing internal taylor series. Though, there're rare exceptions, -// and there's a hope it will become common soon. -// So, this is the crucial point of speed optimisations. We have now eliminated all the transcendent maths -// within the critical path and use LUTs instead. -// Besides, since the LA32 chip is assumed to use similar LUTs inside, the overall emulation accuracy should be better. -// 0: Use LUTs to speedup WG. Most common setting. You can expect about 50% performance boost. -// 1: Use precise float math. Use this setting to achieve more accurate wave generator. If your system performs better with this setting, it is really notable. :) -#define MT32EMU_ACCURATE_WG 0 - // Configuration // The maximum number of partials playing simultaneously #define MT32EMU_MAX_PARTIALS 32 @@ -87,6 +75,10 @@ // 2: Use Bit-perfect Boss Reverb model aka BReverb (for developers, not much practical use) #define MT32EMU_USE_REVERBMODEL 1 +// 0: Use refined wave generator based on logarithmic fixed-point computations and LUTs +// 1: Use legacy accurate wave generator based on float computations +#define MT32EMU_ACCURATE_WG 0 + namespace MT32Emu { // The higher this number, the more memory will be used, but the more samples can be processed in one run - @@ -110,6 +102,8 @@ const unsigned int MAX_PRERENDER_SAMPLES = 1024; #include "Tables.h" #include "Poly.h" #include "LA32Ramp.h" +#include "LA32WaveGenerator.h" +#include "LegacyWaveGenerator.h" #include "TVA.h" #include "TVP.h" #include "TVF.h" -- cgit v1.2.3