History

optimizing things

Jeffrey Snyder committed 4 years ago

Commit 978a64f1 parent 42af6899 files · +119 −55Browse files

Unified · Split

9 files
  1. leaf/Inc/leaf-math.h +10 −2
  2. leaf/Inc/leaf-oscillators.h +6 −2
  3. leaf/Inc/leaf-sampling.h +3 −2
  4. leaf/Inc/leaf-tables.h +1 −1
  5. leaf/Src/leaf-distortion.c +11 −3
  6. leaf/Src/leaf-math.c +63 −34
  7. leaf/Src/leaf-oscillators.c +13 −2
  8. leaf/Src/leaf-tables.c +8 −9
  9. leaf/leaf-config.h +4 −0
leaf/Inc/leaf-math.h+10−2
@@ -235,8 +235,16 @@ extern "C" { · 234 unmodified lines
235 235
236 float median3f(float a, float b, float c);236 float median3f(float a, float b, float c);
237 237
238 void place_step_dd(float *buffer, int index, float phase, float w, float scale);238#ifdef ITCMRAM
239 void place_slope_dd(float *buffer, int index, float phase, float w, float slope_delta);239void __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) place_step_dd(float *buffer, int index, float phase, float w, float scale);
240#else
241void place_step_dd(float *buffer, int index, float phase, float w, float scale);
242#endif
243#ifdef ITCMRAM
244void __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) place_slope_dd(float *buffer, int index, float phase, float w, float slope_delta);
245#else
246void place_slope_dd(float *buffer, int index, float phase, float w, float slope_delta);
247#endif
240 //==============================================================================248 //==============================================================================
241 249
242#ifdef __cplusplus250#ifdef __cplusplus
leaf/Inc/leaf-oscillators.h+6−2
@@ -674,7 +674,9 @@ extern "C" { · 673 unmodified lines
674 //==============================================================================674 //==============================================================================
675 675
676 676
677#define FILLEN 256677#define FILLEN 128 //was 256 in dekrispator code, but it seems like it just needs to be longer than dd step length (72) and probably a power of 2.
678 // smaller buffer means refilling more often but a less intense load each time it refills
679
678 680
679 /*!681 /*!
680 @defgroup tmbpulse tMBPulse682 @defgroup tmbpulse tMBPulse
@@ -799,7 +801,7 @@ extern "C" { · 118 unmodified lines
799 float sync;801 float sync;
800 float syncdir;802 float syncdir;
801 int softsync;803 int softsync;
802 float _p, _w, _b, _z;804 float _p, _w, _b, _z, quarterwaveoffset;
803 int _j, _k;805 int _j, _k;
804 float _f [FILLEN + LONGEST_DD_PULSE_LENGTH];806 float _f [FILLEN + LONGEST_DD_PULSE_LENGTH];
805 float invSampleRate;807 float invSampleRate;
@@ -954,7 +956,9 @@ extern "C" { · 148 unmodified lines
954 void tMBSawPulse_initToPool(tMBSawPulse* const osc, tMempool* const mempool);956 void tMBSawPulse_initToPool(tMBSawPulse* const osc, tMempool* const mempool);
955 void tMBSawPulse_free(tMBSawPulse* const osc);957 void tMBSawPulse_free(tMBSawPulse* const osc);
956 958
959
957 float tMBSawPulse_tick(tMBSawPulse* const osc);960 float tMBSawPulse_tick(tMBSawPulse* const osc);
961 float tMBSawPulse_sync(tMBSawPulse* const osc, float value);
958 void tMBSawPulse_setFreq(tMBSawPulse* const osc, float f);962 void tMBSawPulse_setFreq(tMBSawPulse* const osc, float f);
959 float tMBSawPulse_sync(tMBSawPulse* const osc, float sync);963 float tMBSawPulse_sync(tMBSawPulse* const osc, float sync);
960 void tMBSawPulse_setPhase(tMBSawPulse* const osc, float phase);964 void tMBSawPulse_setPhase(tMBSawPulse* const osc, float phase);
leaf/Inc/leaf-sampling.h+3−2
@@ -451,8 +451,9 @@ extern "C" { · 450 unmodified lines
451 @param sampler A pointer to the relevant tMBSampler.451 @param sampler A pointer to the relevant tMBSampler.
452 452
453 @} */453 @} */
454 454#ifndef FILLEN
455#define FILLEN 256455#define FILLEN 128
456#endif
456 457
457 typedef struct _tMBSampler458 typedef struct _tMBSampler
458 {459 {
leaf/Inc/leaf-tables.h+1−1
@@ -114,7 +114,7 @@ extern "C" { · 113 unmodified lines
114 114
115 /* in minblep_tables.c: */115 /* in minblep_tables.c: */
116 extern const float_value_delta step_dd_table[];116 extern const float_value_delta step_dd_table[];
117 extern const float slope_dd_table[];117 extern const float slope_dd_table[];
118 118
119 /*! @} */119 /*! @} */
120 120
leaf/Src/leaf-distortion.c+11−3
@@ -124,7 +124,11 @@ float tOversampler_tick(tOversampler* const osr, float input, float* oversample, · 123 unmodified lines
124}124}
125 125
126// From CMSIS DSP Library126// From CMSIS DSP Library
127#ifdef ITCMRAM
128void __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) tOversampler_upsample(tOversampler* const osr, float input, float* output)
129#else
127void tOversampler_upsample(tOversampler* const osr, float input, float* output)130void tOversampler_upsample(tOversampler* const osr, float input, float* output)
131#endif
128{132{
129 _tOversampler* os = *osr;133 _tOversampler* os = *osr;
130 134
@@ -223,7 +227,11 @@ void tOversampler_upsample(tOversampler* const osr, float input, float* output) · 92 unmodified lines
223}227}
224 228
225// From CMSIS DSP Library229// From CMSIS DSP Library
230#ifdef ITCMRAM
231float __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) tOversampler_downsample(tOversampler *const osr, float* input)
232#else
226float tOversampler_downsample(tOversampler *const osr, float* input)233float tOversampler_downsample(tOversampler *const osr, float* input)
234#endif
227{235{
228 _tOversampler* os = *osr;236 _tOversampler* os = *osr;
229 237
@@ -613,6 +621,7 @@ float tLockhartWavefolder_tick(tLockhartWavefolder* const wf, float in) · 383 unmodified lines
613// CRUSHER621// CRUSHER
614//============================================================================================================622//============================================================================================================
615#define SCALAR 5000.f623#define SCALAR 5000.f
624#define INV_SCALAR 0.0002f
616 625
617void tCrusher_init (tCrusher* const cr, LEAF* const leaf)626void tCrusher_init (tCrusher* const cr, LEAF* const leaf)
618{627{
@@ -680,14 +689,14 @@ void tCrusher_setQuality (tCrusher* const cr, float val) · 61 unmodified lines
680 689
681 c->div = 0.01f + val * SCALAR;690 c->div = 0.01f + val * SCALAR;
682 691
683 c->gain = (c->div / SCALAR) * 0.7f + 0.3f;692 c->gain = (c->div * INV_SCALAR) * 0.7f + 0.3f;
684}693}
685 694
686// what decimal to round to695// what decimal to round to
687void tCrusher_setRound (tCrusher* const cr, float rnd)696void tCrusher_setRound (tCrusher* const cr, float rnd)
688{697{
689 _tCrusher* c = *cr;698 _tCrusher* c = *cr;
690 c->rnd = fabsf(rnd);699 c->rnd = rnd;
691}700}
692 701
693void tCrusher_setSamplingRatio (tCrusher* const cr, float ratio)702void tCrusher_setSamplingRatio (tCrusher* const cr, float ratio)
@@ -695,5 +704,4 @@ void tCrusher_setSamplingRatio (tCrusher* const cr, float ratio) · 1 unmodified line
695 _tCrusher* c = *cr;704 _tCrusher* c = *cr;
696 c->srr = ratio;705 c->srr = ratio;
697 tSampleReducer_setRatio(&c->sReducer, ratio);706 tSampleReducer_setRatio(&c->sReducer, ratio);
698
699}707}
leaf/Src/leaf-math.c+63−34
@@ -323,7 +323,7 @@ float LEAF_round (float input, float rnd) · 322 unmodified lines
323 323
324 float scale = 1.f / rnd;324 float scale = 1.f / rnd;
325 325
326 return roundf(input * scale) / scale;326 return roundf(input * scale) * rnd;
327}327}
328 328
329 329
@@ -365,7 +365,11 @@ float LEAF_softClip(float val, float thresh) · 35 unmodified lines
365 }365 }
366}366}
367 367
368float LEAF_clip(float min, float val, float max)368#ifdef ITCMRAM
369float __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) LEAF_clip(float min, float val, float max)
370#else
371float LEAF_clip(float min, float val, float max)
372#endif
369{373{
370 float tempmin = min;374 float tempmin = min;
371 float tempmax = max;375 float tempmax = max;
@@ -566,7 +570,9 @@ void LEAF_generate_exp(float* buffer, float base, float start, float end, float · 194 unmodified lines
566}570}
567 571
568//572//
569void LEAF_generate_table_skew_non_sym(float* buffer, float start, float end, float center, int size)573
574
575void LEAF_generate_table_skew_non_sym_double(float* buffer, float start, float end, float center, int size)
570{576{
571 double skew = log (0.5) / log ((center - start) / (end - start));577 double skew = log (0.5) / log ((center - start) / (end - start));
572 double increment = 1.0 / (double)(size-1);578 double increment = 1.0 / (double)(size-1);
@@ -581,6 +587,21 @@ void LEAF_generate_table_skew_non_sym(float* buffer, float start, float end, flo · 8 unmodified lines
581}587}
582 588
583 589
590void LEAF_generate_table_skew_non_sym(float* buffer, float start, float end, float center, int size)
591{
592 float skew = logf (0.5) / logf ((center - start) / (end - start));
593 float increment = 1.0 / (float)(size-1);
594 float x = 0.0;
595 float proportion = 0.0;
596 for (int i = 0; i < size; i++)
597 {
598 proportion = expf (logf(x) / skew);
599 buffer[i] = (float)(start + (end - start) * proportion);
600 x += increment;
601 }
602}
603
604
584void LEAF_generate_atodb(float* buffer, int size)605void LEAF_generate_atodb(float* buffer, int size)
585{606{
586 float increment = 1.0f / (float)(size-1);607 float increment = 1.0f / (float)(size-1);
@@ -846,40 +867,48 @@ float median3f(float a, float b, float c) · 259 unmodified lines
846#if LEAF_INCLUDE_MINBLEP_TABLES867#if LEAF_INCLUDE_MINBLEP_TABLES
847/// MINBLEPS868/// MINBLEPS
848// https://github.com/MrBlueXav/Dekrispator_v2 blepvco.c869// https://github.com/MrBlueXav/Dekrispator_v2 blepvco.c
870#ifdef ITCMRAM
871void __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) place_step_dd(float *buffer, int index, float phase, float w, float scale)
872#else
849void place_step_dd(float *buffer, int index, float phase, float w, float scale)873void place_step_dd(float *buffer, int index, float phase, float w, float scale)
850 {874#endif
851 float r;875{
852 long i;876 float r;
853 877 long i;
854 r = MINBLEP_PHASES * phase / w;878
855 i = lrintf(r - 0.5f);879 r = MINBLEP_PHASES * phase / w;
856 r -= (float)i;880 i = lrintf(r - 0.5f);
857 i &= MINBLEP_PHASE_MASK; /* extreme modulation can cause i to be out-of-range */881 r -= (float)i;
858 882 i &= MINBLEP_PHASE_MASK; /* extreme modulation can cause i to be out-of-range */
859 while (i < MINBLEP_PHASES * STEP_DD_PULSE_LENGTH) {883
860 buffer[index] += scale * (step_dd_table[i].value + r * step_dd_table[i].delta);884 while (i < MINBLEP_PHASES * STEP_DD_PULSE_LENGTH) {
861 i += MINBLEP_PHASES;885 buffer[index] += scale * (step_dd_table[i].value + r * step_dd_table[i].delta);
862 index++;886 i += MINBLEP_PHASES;
863 }887 index++;
864 }888 }
889}
890#ifdef ITCMRAM
891void __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) place_slope_dd(float *buffer, int index, float phase, float w, float slope_delta)
892#else
865void place_slope_dd(float *buffer, int index, float phase, float w, float slope_delta)893void place_slope_dd(float *buffer, int index, float phase, float w, float slope_delta)
866 {894#endif
867 float r;895{
868 long i;896 float r;
869 897 long i;
870 r = MINBLEP_PHASES * phase / w;898
871 i = lrintf(r - 0.5f);899 r = MINBLEP_PHASES * phase / w;
872 r -= (float)i;900 i = lrintf(r - 0.5f);
873 i &= MINBLEP_PHASE_MASK; /* extreme modulation can cause i to be out-of-range */901 r -= (float)i;
874 902 i &= MINBLEP_PHASE_MASK; /* extreme modulation can cause i to be out-of-range */
875 slope_delta *= w;903
876 904 slope_delta *= w;
877 while (i < MINBLEP_PHASES * SLOPE_DD_PULSE_LENGTH) {905
878 buffer[index] += slope_delta * (slope_dd_table[i] + r * (slope_dd_table[i + 1] - slope_dd_table[i]));906 while (i < MINBLEP_PHASES * SLOPE_DD_PULSE_LENGTH) {
879 i += MINBLEP_PHASES;907 buffer[index] += slope_delta * (slope_dd_table[i] + r * (slope_dd_table[i + 1] - slope_dd_table[i]));
880 index++;908 i += MINBLEP_PHASES;
881 }909 index++;
882 }910 }
911}
883#endif // LEAF_INCLUDE_MINBLEP_TABLES912#endif // LEAF_INCLUDE_MINBLEP_TABLES
884 /*! @} */913 /*! @} */
885 914
leaf/Src/leaf-oscillators.c+13−2
@@ -16,6 +16,8 @@ · 15 unmodified lines
16 16
17#endif17#endif
18 18
19
20
19#if LEAF_INCLUDE_SINE_TABLE21#if LEAF_INCLUDE_SINE_TABLE
20// Cycle22// Cycle
21void tCycle_init(tCycle* const cy, LEAF* const leaf)23void tCycle_init(tCycle* const cy, LEAF* const leaf)
@@ -1249,6 +1251,7 @@ void tMBTriangle_initToPool(tMBTriangle* const osc, tMempool* const pool) · 1227 unmodified lines
1249 c->_j = 0;1251 c->_j = 0;
1250 c->_p = 0.0f; /* phase [0, 1) */1252 c->_p = 0.0f; /* phase [0, 1) */
1251 c->_w = c->freq * c->invSampleRate; /* phase increment */1253 c->_w = c->freq * c->invSampleRate; /* phase increment */
1254 c->quarterwaveoffset = c->_w * 0.25f;
1252 c->_b = 0.5f * (1.0f + c->waveform); /* duty cycle (0, 1) */1255 c->_b = 0.5f * (1.0f + c->waveform); /* duty cycle (0, 1) */
1253 c->_k = 0.0f; /* output state, 0 = high (0.5f), 1 = low (-0.5f) */1256 c->_k = 0.0f; /* output state, 0 = high (0.5f), 1 = low (-0.5f) */
1254 memset (c->_f, 0, (FILLEN + STEP_DD_PULSE_LENGTH) * sizeof (float));1257 memset (c->_f, 0, (FILLEN + STEP_DD_PULSE_LENGTH) * sizeof (float));
@@ -1286,7 +1289,7 @@ float tMBTriangle_tick(tMBTriangle* const osc) · 31 unmodified lines
1286 invB1 = 1.0f / b1;1289 invB1 = 1.0f / b1;
1287 if (sync > 0.0f && c->softsync > 0) c->syncdir = -c->syncdir;1290 if (sync > 0.0f && c->softsync > 0) c->syncdir = -c->syncdir;
1288 1291
1289 sw = w * c->syncdir;1292 sw = w * c->syncdir + c->quarterwaveoffset;
1290 p += sw - (int)sw;1293 p += sw - (int)sw;
1291 1294
1292 if (sync > 0.0f && c->softsync == 0) { /* sync to master */1295 if (sync > 0.0f && c->softsync == 0) { /* sync to master */
@@ -1478,6 +1481,7 @@ void tMBTriangle_setFreq(tMBTriangle* const osc, float f) · 185 unmodified lines
1478 _tMBTriangle* c = *osc;1481 _tMBTriangle* c = *osc;
1479 c->freq = f;1482 c->freq = f;
1480 c->_w = c->freq * c->invSampleRate; /* phase increment */1483 c->_w = c->freq * c->invSampleRate; /* phase increment */
1484 c->quarterwaveoffset = c->_w * 0.25f;
1481}1485}
1482 1486
1483void tMBTriangle_setWidth(tMBTriangle* const osc, float w)1487void tMBTriangle_setWidth(tMBTriangle* const osc, float w)
@@ -1742,8 +1746,11 @@ void tMBSawPulse_free(tMBSawPulse* const osc) · 258 unmodified lines
1742 1746
1743 1747
1744 1748
1745 1749#ifdef ITCMRAM
1750float __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) tMBSawPulse_tick(tMBSawPulse* const osc)
1751#else
1746float tMBSawPulse_tick(tMBSawPulse* const osc)1752float tMBSawPulse_tick(tMBSawPulse* const osc)
1753#endif
1747{1754{
1748 _tMBSawPulse* c = *osc;1755 _tMBSawPulse* c = *osc;
1749 1756
@@ -1982,7 +1989,11 @@ void tMBSawPulse_setFreq(tMBSawPulse* const osc, float f) · 232 unmodified lines
1982 c->_w = c->freq * c->invSampleRate; /* phase increment */1989 c->_w = c->freq * c->invSampleRate; /* phase increment */
1983}1990}
1984 1991
1992#ifdef ITCMRAM
1993float __attribute__ ((section(".itcmram"))) __attribute__ ((aligned (32))) tMBSawPulse_sync(tMBSawPulse* const osc, float value)
1994#else
1985float tMBSawPulse_sync(tMBSawPulse* const osc, float value)1995float tMBSawPulse_sync(tMBSawPulse* const osc, float value)
1996#endif
1986{1997{
1987 _tMBSawPulse* c = *osc;1998 _tMBSawPulse* c = *osc;
1988 1999
leaf/Src/leaf-tables.c+8−9
@@ -10043,7 +10043,7 @@ const float __leaf_table_attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE] = { · 10042 unmodified lines
100430.166809f, 0.166807f, 0.166804f, 0.166802f, 0.166799f, 0.166796f, 0.166794f, 0.166791f, 0.166789f, 0.166786f, 0.166784f, 0.166781f, 0.166779f, 0.166776f, 0.166774f, 0.166771f, 0.166768f, 0.166766f, 0.166763f, 0.166761f,100430.166809f, 0.166807f, 0.166804f, 0.166802f, 0.166799f, 0.166796f, 0.166794f, 0.166791f, 0.166789f, 0.166786f, 0.166784f, 0.166781f, 0.166779f, 0.166776f, 0.166774f, 0.166771f, 0.166768f, 0.166766f, 0.166763f, 0.166761f,
100440.166758f, 0.166756f, 0.166753f, 0.166751f, 0.166748f, 0.166746f, 0.166743f, 0.16674f, 0.166738f, 0.166735f, 0.166733f, 0.16673f, 0.166728f, 0.166725f, 0.166723f, 0.16672f, 0.166718f, 0.166715f, 0.166712f, 0.16671f,100440.166758f, 0.166756f, 0.166753f, 0.166751f, 0.166748f, 0.166746f, 0.166743f, 0.16674f, 0.166738f, 0.166735f, 0.166733f, 0.16673f, 0.166728f, 0.166725f, 0.166723f, 0.16672f, 0.166718f, 0.166715f, 0.166712f, 0.16671f,
100450.166707f, 0.166705f, 0.166702f, 0.1667f, 0.166697f, 0.166695f, 0.166692f, 0.16669f, 0.166687f, 0.166684f, 0.166682f, 0.166679f, 0.166677f, 0.166674f, 0.166672f, 0.166669f, 100450.166707f, 0.166705f, 0.166702f, 0.1667f, 0.166697f, 0.166695f, 0.166692f, 0.16669f, 0.166687f, 0.166684f, 0.166682f, 0.166679f, 0.166677f, 0.166674f, 0.166672f, 0.166669f,
10046};10046} _CONSTANT_DATA_LOCATION;
10047#endif // LEAF_INCLUDE_ADSR_TABLES10047#endif // LEAF_INCLUDE_ADSR_TABLES
10048//this filter table assumes midinote input scaled from 16-130, then scaled into 12-bit (4096 values). So to convert midinote to this format, do this (cutoff-16.0f) * 35.929824561403509f10048//this filter table assumes midinote input scaled from 16-130, then scaled into 12-bit (4096 values). So to convert midinote to this format, do this (cutoff-16.0f) * 35.929824561403509f
10049#if LEAF_INCLUDE_FILTERTAN_TABLE10049#if LEAF_INCLUDE_FILTERTAN_TABLE
@@ -10253,7 +10253,7 @@ const float __leaf_table_filtertan[FILTERTAN_TABLE_SIZE] = { · 203 unmodified lines
102531.24185f, 1.245509f, 1.249186f, 1.252883f, 1.256599f, 1.260335f, 1.26409f, 1.267865f, 1.27166f, 1.275476f, 1.279312f, 1.283168f, 1.287045f, 1.290943f, 1.294862f, 1.298802f, 1.302763f, 1.306747f, 1.310752f, 1.314779f,102531.24185f, 1.245509f, 1.249186f, 1.252883f, 1.256599f, 1.260335f, 1.26409f, 1.267865f, 1.27166f, 1.275476f, 1.279312f, 1.283168f, 1.287045f, 1.290943f, 1.294862f, 1.298802f, 1.302763f, 1.306747f, 1.310752f, 1.314779f,
102541.318828f, 1.3229f, 1.326994f, 1.331111f, 1.335252f, 1.339415f, 1.343602f, 1.347812f, 1.352046f, 1.356305f, 1.360587f, 1.364894f, 1.369226f, 1.373583f, 1.377965f, 1.382373f, 1.386806f, 1.391265f, 1.39575f, 1.400261f,102541.318828f, 1.3229f, 1.326994f, 1.331111f, 1.335252f, 1.339415f, 1.343602f, 1.347812f, 1.352046f, 1.356305f, 1.360587f, 1.364894f, 1.369226f, 1.373583f, 1.377965f, 1.382373f, 1.386806f, 1.391265f, 1.39575f, 1.400261f,
102551.4048f, 1.409365f, 1.413957f, 1.418577f, 1.423224f, 1.427899f, 1.432603f, 1.437335f, 1.442095f, 1.446885f, 1.451704f, 1.456553f, 1.461431f, 1.46634f, 1.471279f, 1.476249f, 102551.4048f, 1.409365f, 1.413957f, 1.418577f, 1.423224f, 1.427899f, 1.432603f, 1.437335f, 1.442095f, 1.446885f, 1.451704f, 1.456553f, 1.461431f, 1.46634f, 1.471279f, 1.476249f,
10256};10256} _CONSTANT_DATA_LOCATION;
10257#endif // LEAF_INCLUDE_FILTERTAN_TABLE10257#endif // LEAF_INCLUDE_FILTERTAN_TABLE
10258 10258
10259#if LEAF_INCLUDE_MTOF_TABLE10259#if LEAF_INCLUDE_MTOF_TABLE
@@ -10462,7 +10462,7 @@ const float __leaf_table_mtof1[MTOF1_TABLE_SIZE] = {34.66965f, 34.722983f, 34.77 · 202 unmodified lines
1046216732.85848f, 16758.598847f, 16784.37881f, 16810.198431f, 16836.057771f, 16861.95689f, 16887.895851f, 16913.874713f, 16939.89354f, 16965.952391f, 16992.051329f, 17018.190415f, 17044.369711f, 17070.58928f, 17096.849182f, 17123.14948f, 17149.490236f, 17175.871513f, 17202.293372f, 17228.755877f,1046216732.85848f, 16758.598847f, 16784.37881f, 16810.198431f, 16836.057771f, 16861.95689f, 16887.895851f, 16913.874713f, 16939.89354f, 16965.952391f, 16992.051329f, 17018.190415f, 17044.369711f, 17070.58928f, 17096.849182f, 17123.14948f, 17149.490236f, 17175.871513f, 17202.293372f, 17228.755877f,
1046317255.259088f, 17281.803071f, 17308.387886f, 17335.013596f, 17361.680266f, 17388.387957f, 17415.136733f, 17441.926657f, 17468.757792f, 17495.630202f, 17522.54395f, 17549.4991f, 17576.495715f, 17603.533859f, 17630.613597f, 17657.734992f, 17684.898107f, 17712.103009f, 17739.34976f, 17766.638424f,1046317255.259088f, 17281.803071f, 17308.387886f, 17335.013596f, 17361.680266f, 17388.387957f, 17415.136733f, 17441.926657f, 17468.757792f, 17495.630202f, 17522.54395f, 17549.4991f, 17576.495715f, 17603.533859f, 17630.613597f, 17657.734992f, 17684.898107f, 17712.103009f, 17739.34976f, 17766.638424f,
1046417793.969068f, 17821.341754f, 17848.756548f, 17876.213515f, 17903.712719f, 17931.254226f, 17958.8381f, 17986.464406f, 18014.133211f, 18041.844578f, 18069.598575f, 18097.395266f, 18125.234716f, 18153.116993f, 18181.042161f, 18209.010287f, 18237.021437f, 18265.075676f, 18293.173072f, 18321.31369f,1046417793.969068f, 17821.341754f, 17848.756548f, 17876.213515f, 17903.712719f, 17931.254226f, 17958.8381f, 17986.464406f, 18014.133211f, 18041.844578f, 18069.598575f, 18097.395266f, 18125.234716f, 18153.116993f, 18181.042161f, 18209.010287f, 18237.021437f, 18265.075676f, 18293.173072f, 18321.31369f,
1046518349.497597f, 18377.72486f, 18405.995546f, 18434.30972f, 18462.667451f, 18491.068804f, 18519.513848f, 18548.002649f, 18576.535275f, 18605.111793f, 18633.73227f, 18662.396775f, 18691.105375f, 18719.858137f, 18748.655131f, 18777.496423f };1046518349.497597f, 18377.72486f, 18405.995546f, 18434.30972f, 18462.667451f, 18491.068804f, 18519.513848f, 18548.002649f, 18576.535275f, 18605.111793f, 18633.73227f, 18662.396775f, 18691.105375f, 18719.858137f, 18748.655131f, 18777.496423f } _CONSTANT_DATA_LOCATION;
10466#endif // LEAF_INCLUDE_MTOF_TABLE10466#endif // LEAF_INCLUDE_MTOF_TABLE
10467 10467
10468#if LEAF_INCLUDE_ADC_TABLE10468#if LEAF_INCLUDE_ADC_TABLE
@@ -13950,7 +13950,7 @@ const float __leaf_table_tanh1[TANH1_TABLE_SIZE] = {-0.964028f, -0.964023f, -0.9 · 3481 unmodified lines
139500.963703f, 0.963707f, 0.963711f, 0.963716f, 0.96372f, 0.963724f, 0.963729f, 0.963733f, 0.963738f, 0.963742f, 0.963746f, 0.963751f, 0.963755f, 0.963759f, 0.963764f, 0.963768f, 0.963772f, 0.963777f, 0.963781f, 0.963785f,139500.963703f, 0.963707f, 0.963711f, 0.963716f, 0.96372f, 0.963724f, 0.963729f, 0.963733f, 0.963738f, 0.963742f, 0.963746f, 0.963751f, 0.963755f, 0.963759f, 0.963764f, 0.963768f, 0.963772f, 0.963777f, 0.963781f, 0.963785f,
139510.96379f, 0.963794f, 0.963798f, 0.963803f, 0.963807f, 0.963811f, 0.963816f, 0.96382f, 0.963824f, 0.963829f, 0.963833f, 0.963837f, 0.963842f, 0.963846f, 0.96385f, 0.963855f, 0.963859f, 0.963863f, 0.963868f, 0.963872f,139510.96379f, 0.963794f, 0.963798f, 0.963803f, 0.963807f, 0.963811f, 0.963816f, 0.96382f, 0.963824f, 0.963829f, 0.963833f, 0.963837f, 0.963842f, 0.963846f, 0.96385f, 0.963855f, 0.963859f, 0.963863f, 0.963868f, 0.963872f,
139520.963876f, 0.963881f, 0.963885f, 0.963889f, 0.963894f, 0.963898f, 0.963902f, 0.963907f, 0.963911f, 0.963915f, 0.96392f, 0.963924f, 0.963928f, 0.963933f, 0.963937f, 0.963941f, 0.963946f, 0.96395f, 0.963954f, 0.963959f,139520.963876f, 0.963881f, 0.963885f, 0.963889f, 0.963894f, 0.963898f, 0.963902f, 0.963907f, 0.963911f, 0.963915f, 0.96392f, 0.963924f, 0.963928f, 0.963933f, 0.963937f, 0.963941f, 0.963946f, 0.96395f, 0.963954f, 0.963959f,
139530.963963f, 0.963967f, 0.963971f, 0.963976f, 0.96398f, 0.963984f, 0.963989f, 0.963993f, 0.963997f, 0.964002f, 0.964006f, 0.96401f, 0.964015f, 0.964019f, 0.964023f, 0.964028f, };139530.963963f, 0.963967f, 0.963971f, 0.963976f, 0.96398f, 0.963984f, 0.963989f, 0.963993f, 0.963997f, 0.964002f, 0.964006f, 0.96401f, 0.964015f, 0.964019f, 0.964023f, 0.964028f, } _CONSTANT_DATA_LOCATION;
13954#endif // LEAF_INCLUDE_TANH_TABLE13954#endif // LEAF_INCLUDE_TANH_TABLE
13955 13955
13956#if LEAF_INCLUDE_SINE_TABLE13956#if LEAF_INCLUDE_SINE_TABLE
@@ -14057,7 +14057,7 @@ const float __leaf_table_sinewave[SINE_TABLE_SIZE] = {0.0f, 0.00305f, 0.00613f, · 100 unmodified lines
14057-0.14673f, -0.14371f, -0.14069f, -0.13763f, -0.13458f, -0.13156f, -0.12851f, -0.12546f, -0.12244f, -0.11938f, -0.11633f, -0.11328f, -0.11023f, -0.10718f, -0.10413f, -0.10107f, -0.09802f, -0.09497f, -0.09192f, -0.08887f,14057-0.14673f, -0.14371f, -0.14069f, -0.13763f, -0.13458f, -0.13156f, -0.12851f, -0.12546f, -0.12244f, -0.11938f, -0.11633f, -0.11328f, -0.11023f, -0.10718f, -0.10413f, -0.10107f, -0.09802f, -0.09497f, -0.09192f, -0.08887f,
14058-0.08582f, -0.08276f, -0.07968f, -0.07663f, -0.07358f, -0.07053f, -0.06744f, -0.06439f, -0.06134f, -0.05826f, -0.05521f, -0.05215f, -0.04907f, -0.04602f, -0.04294f, -0.03989f, -0.03683f, -0.03375f, -0.0307f, -0.02762f,14058-0.08582f, -0.08276f, -0.07968f, -0.07663f, -0.07358f, -0.07053f, -0.06744f, -0.06439f, -0.06134f, -0.05826f, -0.05521f, -0.05215f, -0.04907f, -0.04602f, -0.04294f, -0.03989f, -0.03683f, -0.03375f, -0.0307f, -0.02762f,
14059-0.02457f, -0.02148f, -0.01843f, -0.01535f, -0.0123f, -0.00922f, -0.00616f, -0.00308f14059-0.02457f, -0.02148f, -0.01843f, -0.01535f, -0.0123f, -0.00922f, -0.00616f, -0.00308f
14060};14060} _CONSTANT_DATA_LOCATION;
14061#endif // LEAF_INCLUDE_SINE_TABLE14061#endif // LEAF_INCLUDE_SINE_TABLE
14062 14062
14063#if LEAF_INCLUDE_MINBLEP_TABLES14063#if LEAF_INCLUDE_MINBLEP_TABLES
@@ -14086,8 +14086,7 @@ const float __leaf_table_sinewave[SINE_TABLE_SIZE] = {0.0f, 0.00305f, 0.00613f, · 22 unmodified lines
14086 *14086 *
14087 * Brandt, "Hard Sync Without Aliasing" (2001)14087 * Brandt, "Hard Sync Without Aliasing" (2001)
14088 */14088 */
14089 14089const float_value_delta
14090const float_value_delta
14091step_dd_table[MINBLEP_PHASES * STEP_DD_PULSE_LENGTH + 1] =14090step_dd_table[MINBLEP_PHASES * STEP_DD_PULSE_LENGTH + 1] =
14092{14091{
14093 { 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},14092 { 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},
@@ -15243,7 +15242,7 @@ step_dd_table[MINBLEP_PHASES * STEP_DD_PULSE_LENGTH + 1] = · 1149 unmodified lines
15243 {-2.486342e-09, 3.908079e-10},{-2.095534e-09, 4.032922e-10},{-1.692242e-09, 4.148309e-10},{-1.277411e-09, 4.254000e-10},15242 {-2.486342e-09, 3.908079e-10},{-2.095534e-09, 4.032922e-10},{-1.692242e-09, 4.148309e-10},{-1.277411e-09, 4.254000e-10},
15244 {-8.520110e-10, 4.349773e-10},{-4.170337e-10, 4.170337e-10},{ 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},15243 {-8.520110e-10, 4.349773e-10},{-4.170337e-10, 4.170337e-10},{ 0.000000e+00, 0.000000e+00},{ 0.000000e+00, 0.000000e+00},
15245 { 0.000000e+00, 0.000000e+00}15244 { 0.000000e+00, 0.000000e+00}
15246};15245} _CONSTANT_DATA_LOCATION;
15247 15246
15248const float15247const float
15249slope_dd_table [MINBLEP_PHASES * SLOPE_DD_PULSE_LENGTH + 1] =15248slope_dd_table [MINBLEP_PHASES * SLOPE_DD_PULSE_LENGTH + 1] =
@@ -15817,5 +15816,5 @@ slope_dd_table [MINBLEP_PHASES * SLOPE_DD_PULSE_LENGTH + 1] = · 567 unmodified lines
15817 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,15816 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,
15818 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,15817 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,
15819 0.000000e+0015818 0.000000e+00
15820};15819} _CONSTANT_DATA_LOCATION;
15821#endif // LEAF_INCLUDE_MINBLEP_TABLES15820#endif // LEAF_INCLUDE_MINBLEP_TABLES
leaf/leaf-config.h+4−0
@@ -66,6 +66,10 @@ · 65 unmodified lines
66#define LEAF_USE_DYNAMIC_ALLOCATION 066#define LEAF_USE_DYNAMIC_ALLOCATION 0
67#endif67#endif
68 68
69#ifndef _CONSTANT_DATA_LOCATION
70#define _CONSTANT_DATA_LOCATION
71#endif
72
69//==============================================================================73//==============================================================================
70 74
71#endif // LEAF_CONFIG_H_INCLUDED75#endif // LEAF_CONFIG_H_INCLUDED

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t