History

added tSlide, atodb, and dbtoa

spiricom committed 6 years ago

Commit 982eb8e1 parent 8ea545c36 files · +1668 −798Browse files

Unified · Split

36 files
  1. .DS_Store +0 −0
  2. LEAF/Inc/leaf-analysis.h +8 −0
  3. LEAF/Inc/leaf-delay.h +8 −0
  4. LEAF/Inc/leaf-distortion.h +9 −0
  5. LEAF/Inc/leaf-dynamics.h +32 −0
  6. LEAF/Inc/leaf-effects.h +8 −0
  7. LEAF/Inc/leaf-electrical.h +8 −0
  8. LEAF/Inc/leaf-envelopes.h +28 −0
  9. LEAF/Inc/leaf-filters.h +30 −1
  10. LEAF/Inc/leaf-global.h +22 −9
  11. LEAF/Inc/leaf-instruments.h +8 −0
  12. LEAF/Inc/leaf-math.h +3 −0
  13. LEAF/Inc/leaf-mempool.h +62 −30
  14. LEAF/Inc/leaf-midi.h +282 −41
  15. LEAF/Inc/leaf-oscillators.h +469 −67
  16. LEAF/Inc/leaf-physical.h +8 −0
  17. LEAF/Inc/leaf-reverb.h +8 −0
  18. LEAF/Inc/leaf-sampling.h +8 −0
  19. LEAF/Inc/leaf-tables.h +25 −25
  20. LEAF/Src/leaf-analysis.c +22 −22
  21. LEAF/Src/leaf-delay.c +30 −30
  22. LEAF/Src/leaf-distortion.c +16 −16
  23. LEAF/Src/leaf-dynamics.c +64 −4
  24. LEAF/Src/leaf-effects.c +72 −72
  25. LEAF/Src/leaf-electrical.c +2 −2
  26. LEAF/Src/leaf-envelopes.c +78 −20
  27. LEAF/Src/leaf-filters.c +112 −29
  28. LEAF/Src/leaf-instruments.c +8 −8
  29. LEAF/Src/leaf-math.c +38 −6
  30. LEAF/Src/leaf-mempool.c +37 −42
  31. LEAF/Src/leaf-midi.c +14 −14
  32. LEAF/Src/leaf-oscillators.c +88 −299
  33. LEAF/Src/leaf-physical.c +18 −18
  34. LEAF/Src/leaf-reverb.c +8 −8
  35. LEAF/Src/leaf-sampling.c +14 −14
  36. LEAF/Src/leaf-tables.c +22 −22
.DS_Store+0−0

Binary file not shown.

LEAF/Inc/leaf-analysis.h+8−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
2121 #include "leaf-filters.h"
2222 #include "leaf-envelopes.h"
2323
24+ /*!
25+ * @internal
26+ * Header.
27+ * @include basic-oscillators.h
28+ * @example basic-oscillators.c
29+ * An example.
30+ */
31+
2432 //==============================================================================
2533
2634 /* Envelope Follower */
LEAF/Inc/leaf-delay.h+8−0
@@ -18,6 +18,14 @@ extern "C" { · 17 unmodified lines
1818 #include "leaf-math.h"
1919 #include "leaf-mempool.h"
2020
21+ /*!
22+ * @internal
23+ * Header.
24+ * @include basic-oscillators.h
25+ * @example basic-oscillators.c
26+ * An example.
27+ */
28+
2129 //==============================================================================
2230
2331 /* Non-interpolating delay, reimplemented from STK (Cook and Scavone). */
LEAF/Inc/leaf-distortion.h+9−0
@@ -19,6 +19,14 @@ extern "C" { · 18 unmodified lines
1919 #include "leaf-mempool.h"
2020 #include "leaf-math.h"
2121
22+ /*!
23+ * @internal
24+ * Header.
25+ * @include basic-oscillators.h
26+ * @example basic-oscillators.c
27+ * An example.
28+ */
29+
2230 //==============================================================================
2331
2432 typedef struct _tSampleReducer
@@ -136,6 +144,7 @@ extern "C" { · 111 unmodified lines
136144 void tCrusher_setSamplingRatio (tCrusher* const, float ratio);
137145
138146 //==============================================================================
147+
139148
140149 #ifdef __cplusplus
141150 }
LEAF/Inc/leaf-dynamics.h+32−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
2121 #include "leaf-mempool.h"
2222 #include "leaf-analysis.h"
2323
24+ /*!
25+ * @internal
26+ * Header.
27+ * @include basic-oscillators.h
28+ * @example basic-oscillators.c
29+ * An example.
30+ */
31+
2432 //==============================================================================
2533
2634 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@@ -80,6 +88,30 @@ extern "C" { · 53 unmodified lines
8088
8189 //==============================================================================
8290
91+
92+ //Threshold with hysteresis (like Max/MSP thresh~ object)
93+
94+ typedef struct _tThreshold {
95+ float highThresh, lowThresh;
96+ int currentValue;
97+
98+ } _tThreshold;
99+
100+ typedef _tThreshold* tThreshold;
101+
102+ void tThreshold_init (tThreshold* const, float low, float high);
103+ void tThreshold_free (tThreshold* const);
104+ void tThreshold_initToPool (tThreshold* const, float low, float high, tMempool* const);
105+ void tThreshold_freeFromPool(tThreshold* const, tMempool* const);
106+
107+ int tThreshold_tick (tThreshold* const, float input);
108+ void tThreshold_setLow (tThreshold* const, float low);
109+ void tThreshold_setHigh (tThreshold* const, float high);
110+
111+
112+
113+ //////======================================================================
114+
83115 #ifdef __cplusplus
84116 }
85117 #endif
LEAF/Inc/leaf-effects.h+8−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
2121 #include "leaf-analysis.h"
2222 #include "leaf-envelopes.h"
2323
24+ /*!
25+ * @internal
26+ * Header.
27+ * @include basic-oscillators.h
28+ * @example basic-oscillators.c
29+ * An example.
30+ */
31+
2432 //==============================================================================
2533
2634 /* tTalkbox */
LEAF/Inc/leaf-electrical.h+8−0
@@ -18,6 +18,14 @@ extern "C" { · 17 unmodified lines
1818 #include "leaf-math.h"
1919 #include "leaf-mempool.h"
2020
21+ /*!
22+ * @internal
23+ * Header.
24+ * @include basic-oscillators.h
25+ * @example basic-oscillators.c
26+ * An example.
27+ */
28+
2129 //==============================================================================
2230
2331 typedef enum WDFComponentType
LEAF/Inc/leaf-envelopes.h+28−0
@@ -24,6 +24,14 @@ extern "C" { · 23 unmodified lines
2424 #include "leaf-analysis.h"
2525 #include "leaf-envelopes.h"
2626
27+ /*!
28+ * @internal
29+ * Header.
30+ * @include basic-oscillators.h
31+ * @example basic-oscillators.c
32+ * An example.
33+ */
34+
2735 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
2836
2937 /* Attack-Decay envelope */
@@ -154,6 +162,26 @@ extern "C" { · 124 unmodified lines
154162 void tRamp_setVal (tRamp* const, float val);
155163
156164
165+
166+ //Slide (based on Max/MSP's slide~)
167+ typedef struct _tSlide {
168+ float prevOut;
169+ float currentOut;
170+ float prevIn;
171+ float invUpSlide;
172+ float invDownSlide;
173+
174+ } _tSlide;
175+
176+ typedef _tSlide* tSlide;
177+
178+ void tSlide_init (tSlide* const, float upSlide, float downSlide);
179+ void tSlide_free (tSlide* const);
180+ void tSlide_initToPool (tSlide* const, float upSlide, float downSlide, tMempool* const);
181+ void tSlide_freeFromPool (tSlide* const, tMempool* const);
182+
183+ float tSlide_tick (tSlide* const, float in);
184+
157185 #ifdef __cplusplus
158186 }
159187 #endif
LEAF/Inc/leaf-filters.h+30−1
@@ -20,6 +20,14 @@ extern "C" { · 19 unmodified lines
2020 #include "leaf-delay.h"
2121 #include "leaf-tables.h"
2222
23+ /*!
24+ * @internal
25+ * Header.
26+ * @include basic-oscillators.h
27+ * @example basic-oscillators.c
28+ * An example.
29+ */
30+
2331 //==============================================================================
2432
2533 /* tAllpass: Schroeder allpass. Comb-filter with feedforward and feedback. */
@@ -344,10 +352,31 @@ extern "C" { · 318 unmodified lines
344352 void tFIR_freeFromPool (tFIR* const, tMempool* const);
345353
346354 float tFIR_tick (tFIR* const, float input);
347− void tFIR_coeffs (tFIR* const, float in);
355+
348356
349357 //==============================================================================
350358
359+
360+ typedef struct _tMedianFilter
361+ {
362+ float* val;
363+ int* age;
364+ int m;
365+ int size;
366+ int middlePosition;
367+ int last;
368+ int pos;
369+ } _tMedianFilter;
370+
371+ typedef _tMedianFilter* tMedianFilter;
372+
373+ void tMedianFilter_init (tMedianFilter* const, int size);
374+ void tMedianFilter_free (tMedianFilter* const);
375+ void tMedianFilter_initToPool (tMedianFilter* const, int size, tMempool* const);
376+ void tMedianFilter_freeFromPool (tMedianFilter* const, tMempool* const);
377+
378+ float tMedianFilter_tick (tMedianFilter* const, float input);
379+
351380 #ifdef __cplusplus
352381 }
353382 #endif
LEAF/Inc/leaf-global.h+22−9
@@ -15,17 +15,29 @@ · 14 unmodified lines
1515 extern "C" {
1616 #endif
1717
18− typedef struct _LEAF
18+#include "leaf-mempool.h"
19+
20+ /*!
21+ * @ingroup leaf
22+ * @brief The struct of the global LEAF instance `leaf`. Contains global variables and settings.
23+ */
24+ struct LEAF
1925 {
20− float sampleRate;
21− float invSampleRate;
22− int blockSize;
23− float twoPiTimesInvSampleRate;
24− float (*random)(void);
25− int clearOnAllocation;
26− } LEAF;
26+ ///@{
27+ float sampleRate; //!< The current audio sample rate. Set with LEAF_setSampleRate().
28+ float invSampleRate; //!< The inverse of the current sample rate.
29+ int blockSize; //!< The audio block size.
30+ float twoPiTimesInvSampleRate; //!< Two-pi times the inverse of the current sample rate.
31+ float (*random)(void); //!< A pointer to the random() function provided on initialization.
32+ int clearOnAllocation; //!< A flag that determines whether memory allocated from the LEAF memory pool will be cleared.
33+ tMempool mempool; //!< The default LEAF mempool object.
34+ _tMempool _mempool;
35+ size_t header_size; //!< The size in bytes of memory region headers within mempools.
36+ ///@}
37+ };
38+ typedef struct LEAF LEAF;
2739
28− extern LEAF leaf; // The global instance of LEAF.
40+ extern LEAF leaf;
2941
3042 //==============================================================================
3143
@@ -37,3 +49,4 @@ extern "C" { · 5 unmodified lines
3749
3850 //==============================================================================
3951
52+
LEAF/Inc/leaf-instruments.h+8−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
2121 #include "leaf-filters.h"
2222 #include "leaf-envelopes.h"
2323
24+ /*!
25+ * @internal
26+ * Header.
27+ * @include basic-oscillators.h
28+ * @example basic-oscillators.c
29+ * An example.
30+ */
31+
2432 //==============================================================================
2533
2634 // 808 Cowbell
LEAF/Inc/leaf-math.h+3−0
@@ -167,6 +167,9 @@ extern "C" { · 166 unmodified lines
167167
168168 float dbtorms(float f);
169169
170+ float atodb(float a);
171+
172+ float dbtoa(float db);
170173 //==============================================================================
171174
172175 #ifdef __cplusplus
LEAF/Inc/leaf-mempool.h+62−30
@@ -54,8 +54,11 @@ extern "C" { · 53 unmodified lines
5454
5555 //#define size_t unsigned long
5656
57− /**
58− * memory pool structure
57+ /*!
58+ * @defgroup tmempool tMempool
59+ * @ingroup mempool
60+ * An object that can contain an additional mempool for the allocation of LEAF objects.
61+ * @{
5962 */
6063
6164 // node of free list
@@ -66,28 +69,75 @@ extern "C" { · 4 unmodified lines
6669 size_t size;
6770 } mpool_node_t;
6871
69− typedef struct mpool_t {
72+ typedef struct _tMempool
73+ {
7074 void* mpool; // start of the mpool
7175 size_t usize; // used size of the pool
7276 size_t msize; // max size of the pool
7377 mpool_node_t* head; // first node of memory pool free list
74− } mpool_t;
75−
76− void mpool_create (char* memory, size_t size, mpool_t* pool);
78+ } _tMempool;
7779
78− void* mpool_alloc(size_t size, mpool_t* pool);
79− void* mpool_calloc(size_t asize, mpool_t* pool);
80+ typedef _tMempool* tMempool;
81+
82+ //! Initialize a tMempool for a given memory location and size to the default LEAF mempool.
83+ /*!
84+ @param pool A pointer to the tMempool to be initialized.
85+ @param memory A pointer to the chunk of memory to be used as a mempool.
86+ @param size The size of the chunk of memory to be used as a mempool.
87+ */
88+ void tMempool_init (tMempool* const pool, char* memory, size_t size);
89+
90+
91+ //! Free a tMempool from the default LEAF mempool.
92+ /*!
93+ @param pool A pointer to the tMempool to be freed.
94+ */
95+ void tMempool_free (tMempool* const pool);
96+
97+
98+ //! Initialize a tMempool for a given memory location and size to a specified mempool.
99+ /*!
100+ @param pool A pointer to the tMempool to be initialized.
101+ @param memory A pointer to the chunk of memory to be used as a mempool.
102+ @param size The size of the chuck of memory to be used as a mempool.
103+ @param poolTo A pointer to the tMempool to which a tMempool should be initialized.
104+ */
105+ void tMempool_initToPool (tMempool* const pool, char* memory, size_t size, tMempool* const poolTo);
106+
107+
108+ //! Free a tMempool from a specified mempool.
109+ /*!
110+ @param pool A pointer to the tMempool to be freed from the default LEAF mempool.
111+ @param poolFrom A pointer to the tMempool from which a tMempool should be freed.
112+ */
113+ void tMempool_freeFromPool (tMempool* const pool, tMempool* const poolFrom);
114+
115+ /*! @} */
116+
117+ //==============================================================================
80118
81− void mpool_free(void* ptr, mpool_t* pool);
119+ // typedef struct mpool_t {
120+ // void* mpool; // start of the mpool
121+ // size_t usize; // used size of the pool
122+ // size_t msize; // max size of the pool
123+ // mpool_node_t* head; // first node of memory pool free list
124+ // } mpool_t;
125+
126+ void mpool_create (char* memory, size_t size, _tMempool* pool);
127+
128+ void* mpool_alloc(size_t size, _tMempool* pool);
129+ void* mpool_calloc(size_t asize, _tMempool* pool);
82130
83− size_t mpool_get_size(mpool_t* pool);
84− size_t mpool_get_used(mpool_t* pool);
131+ void mpool_free(void* ptr, _tMempool* pool);
132+
133+ size_t mpool_get_size(_tMempool* pool);
134+ size_t mpool_get_used(_tMempool* pool);
85135
86136 void leaf_pool_init(char* memory, size_t size);
87137
88138 void* leaf_alloc(size_t size);
89139 void* leaf_calloc(size_t size);
90−
140+
91141 void leaf_free(void* ptr);
92142
93143 size_t leaf_pool_get_size(void);
@@ -97,24 +147,6 @@ extern "C" { · 3 unmodified lines
97147
98148 void leaf_mempool_overrun(void);
99149
100− // User object for creating additional mempools
101−
102− typedef struct _tMempool
103− {
104− mpool_t pool;
105− } _tMempool;
106−
107− typedef _tMempool* tMempool;
108−
109− void tMempool_init (tMempool* const, char* memory, size_t size);
110− void tMempool_free (tMempool* const);
111− void tMempool_initToPool (tMempool* const, char* memory, size_t size, tMempool* const);
112− void tMempool_freeFromPool (tMempool* const, tMempool* const);
113−
114− //==============================================================================
115−
116− extern tMempool leaf_mempool;
117−
118150 #ifdef __cplusplus
119151 }
120152 #endif
LEAF/Inc/leaf-midi.h+282−41
@@ -20,10 +20,25 @@ extern "C" { · 19 unmodified lines
2020 #include "leaf-math.h"
2121 #include "leaf-envelopes.h"
2222
23+ /*!
24+ * @internal
25+ * Header.
26+ * @include basic-oscillators.h
27+ * @example basic-oscillators.c
28+ * An example.
29+ */
30+
2331 //==============================================================================
2432
2533 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
2634
35+ /*!
36+ * @defgroup tstack tStack
37+ * @ingroup midi
38+ * @brief A basic stack of integers with a fixed max size of 128, used by tPoly to keep track of MIDI notes.
39+ * @{
40+ */
41+
2742 // STACK implementation (fixed size)
2843 #define STACK_SIZE 128
2944 typedef struct _tStack
@@ -38,21 +53,120 @@ extern "C" { · 8 unmodified lines
3853
3954 typedef _tStack* tStack;
4055
41− void tStack_init (tStack* const);
42− void tStack_free (tStack* const);
43− void tStack_initToPool (tStack* const, tMempool* const);
44− void tStack_freeFromPool (tStack* const, tMempool* const);
45−
46− void tStack_setCapacity (tStack* const, uint16_t cap);
47− int tStack_addIfNotAlreadyThere (tStack* const, uint16_t item);
48− void tStack_add (tStack* const, uint16_t item);
49− int tStack_remove (tStack* const, uint16_t item);
50− void tStack_clear (tStack* const);
51− int tStack_first (tStack* const);
52− int tStack_getSize (tStack* const);
53− int tStack_contains (tStack* const, uint16_t item);
54− int tStack_next (tStack* const);
55− int tStack_get (tStack* const, int which);
56+ //! Initialize a tStack to the default LEAF mempool.
57+ /*!
58+ @param stack A pointer to the tStack to be initialized.
59+ */
60+ void tStack_init (tStack* const stack);
61+
62+
63+ //! Free a tStack from the default LEAF mempool.
64+ /*!
65+ @param stack A pointer to the tStack to be freed.
66+ */
67+ void tStack_free (tStack* const stack);
68+
69+
70+ //! Initialize a tStack to a specified mempool.
71+ /*!
72+ @param stack A pointer to the tStack to be initialized.
73+ @param pool A pointer to the tMempool to which the tStack should be initialized.
74+ */
75+ void tStack_initToPool (tStack* const stack, tMempool* const pool);
76+
77+
78+ //! Free a tStack from a specified mempool.
79+ /*!
80+ @param stack A pointer to the tStack to be freed.
81+ @param pool A pointer to the tMempool from which the tStack should be freed.
82+ */
83+ void tStack_freeFromPool (tStack* const stack, tMempool* const pool);
84+
85+ //! Set the capacity of the stack.
86+ /*!
87+ @param stack A pointer to the relevant tStack.
88+ @param cap The new capacity.
89+ */
90+ void tStack_setCapacity (tStack* const stack, uint16_t cap);
91+
92+
93+ //! Add a value to the stack only if that value is not already in the stack.
94+ /*!
95+ @param stack A pointer to the relevant tStack.
96+ @param item The value to be added.
97+ */
98+ int tStack_addIfNotAlreadyThere (tStack* const stack, uint16_t item);
99+
100+
101+ //! Add a value to the stack.
102+ /*!
103+ @param stack A pointer to the relevant tStack.
104+ @param item The value to be added.
105+ */
106+ void tStack_add (tStack* const stack, uint16_t item);
107+
108+
109+ //! Remove a single instance of a value from the stack.
110+ /*!
111+ @param stack A pointer to the relevant tStack.
112+ @param item The value to be removed.
113+ */
114+ int tStack_remove (tStack* const stack, uint16_t item);
115+
116+
117+ //! Clear the stack.
118+ /*!
119+ @param stack A pointer to the relevant tStack.
120+ */
121+ void tStack_clear (tStack* const stack);
122+
123+
124+ //! Get the first value in the stack.
125+ /*!
126+ @param stack A pointer to the relevant tStack.
127+ @return The first value in the stack.
128+ */
129+ int tStack_first (tStack* const stack);
130+
131+
132+ //! Get the current size of the stack.
133+ /*!
134+ @param stack A pointer to the relevant tStack.
135+ @return The current size of the stack.
136+ */
137+ int tStack_getSize (tStack* const stack);
138+
139+ //! Check if the stack contains a value, and if it does, get the index of that value.
140+ /*!
141+ @param stack A pointer to the relevant tStack.
142+ @param item The value to check against the stack.
143+ @return The index of the value or -1 if the stack does not contain the value.
144+ */
145+ int tStack_contains (tStack* const stack, uint16_t item);
146+
147+ //! Get the next value in the stack, starting from the earliest added values.
148+ /*!
149+ @param stack A pointer to the relevant tStack.
150+ @return The next value in the stack or -1 if there are no values in the stack.
151+ */
152+ int tStack_next (tStack* const stack);
153+
154+ //! Get the value at a given index of the stack.
155+ /*!
156+ @param stack A pointer to the relevant tStack.
157+ @param index The index of the stack from which to get a value.
158+ @return The value at the given index.
159+ */
160+ int tStack_get (tStack* const stack, int index);
161+
162+ /*! @} */
163+
164+ /*!
165+ * @defgroup tpoly tPoly
166+ * @ingroup midi
167+ * @brief An object for polyphonic handling.
168+ * @{
169+ */
56170
57171 /* tPoly */
58172 typedef struct _tPoly
@@ -93,32 +207,159 @@ extern "C" { · 34 unmodified lines
93207 typedef _tPoly* tPoly;
94208
95209 /* MPoly*/
96− void tPoly_init (tPoly* const, int maxNumVoices);
97− void tPoly_free (tPoly* const);
98− void tPoly_initToPool (tPoly* const, int maxNumVoices, tMempool* const);
99− void tPoly_freeFromPool (tPoly* const, tMempool* const);
100−
101− //ADDING A NOTE
102− int tPoly_noteOn (tPoly* const, int note, uint8_t vel);
103− int tPoly_noteOff (tPoly* const, uint8_t note);
104− void tPoly_orderedAddToStack (tPoly* const, uint8_t noteVal);
105− void tPoly_setNumVoices (tPoly* const, uint8_t numVoices);
106−
107− void tPoly_setPitchBend (tPoly* const, float pitchBend);
108− void tPoly_setPitchGlideActive (tPoly* const, oBool isActive);
109− void tPoly_setPitchGlideTime (tPoly* const, float t);
110− void tPoly_setBendGlideTime (tPoly* const polyh, float t);
111− void tPoly_setBendSamplesPerTick (tPoly* const polyh, float t);
112− void tPoly_tickPitch (tPoly* const);
113− void tPoly_tickPitchGlide (tPoly* const);
114− void tPoly_tickPitchBend (tPoly* const);
115−
116− int tPoly_getNumVoices (tPoly* const);
117− int tPoly_getNumActiveVoices (tPoly* const);
118− float tPoly_getPitch (tPoly* const, uint8_t voice);
119− int tPoly_getKey (tPoly* const, uint8_t voice);
120− int tPoly_getVelocity (tPoly* const, uint8_t voice);
121− int tPoly_isOn (tPoly* const, uint8_t voice);
210+ //! Initialize a tPoly to the default LEAF mempool.
211+ /*!
212+ @param poly A pointer to the tPoly to be initialized.
213+ @param maxNumVoices The maximum number of voices this tPoly can handle at once.
214+ */
215+ void tPoly_init (tPoly* const poly, int maxNumVoices);
216+
217+
218+ //! Free a tPoly from the default LEAF mempool.
219+ /*!
220+ @param poly A pointer to the tPoly to be freed.
221+ */
222+ void tPoly_free (tPoly* const poly);
223+
224+
225+ //! Initialize a tPoly to a specified mempool.
226+ /*!
227+ @param poly A pointer to the tPoly to be initialized.
228+ @param pool A pointer to the tMempool to which the tPoly should be initialized.
229+ */
230+ void tPoly_initToPool (tPoly* const poly, int maxNumVoices, tMempool* const pool);
231+
232+
233+ //! Free a tPoly from a specified mempool.
234+ /*!
235+ @param poly A pointer to the tPoly to be freed.
236+ @param pool A pointer to the tMempool from which the tPoly should be freed.
237+ */
238+ void tPoly_freeFromPool (tPoly* const poly, tMempool* const pool);
239+
240+ //! Add a note with a given velocity to the poly handler.
241+ /*!
242+ @param poly A pointer to the relevant tPoly.
243+ @param note The MIDI note number to add.
244+ @param vel The MIDI velocity of the note to add.
245+ @return The voice that will play the note.
246+ */
247+ int tPoly_noteOn (tPoly* const poly, int note, uint8_t vel);
248+
249+
250+ //! Remove a note from the poly handler.
251+ /*!
252+ @param poly A pointer to the relevant tPoly.
253+ @param note The MIDI note number to remove.
254+ @return The voice that was playing the removed note.
255+ */
256+ int tPoly_noteOff (tPoly* const poly, uint8_t note);
257+
258+ void tPoly_orderedAddToStack (tPoly* const poly, uint8_t note);
259+
260+
261+ //! Set the number of voices available to play notes.
262+ /*!
263+ @param poly A pointer to the relevant tPoly.
264+ @param numVoices The new number of available voices. Cannot be greater than the max number voices given in tPoly_init().
265+ */
266+ void tPoly_setNumVoices (tPoly* const poly, uint8_t numVoices);
267+
268+ //! Set whether pitch glide over note changes in voices is active.
269+ /*!
270+ @param poly A pointer to the relevant tPoly.
271+ @param isActive Whether pitch glide should be active or not.
272+ */
273+ void tPoly_setPitchGlideActive (tPoly* const poly, oBool isActive);
274+
275+ //! Set how long pitch glide over note changes in voices takes.
276+ /*!
277+ @param poly A pointer to the relevant tPoly.
278+ @param t The time to glide in milliseconds.
279+ */
280+ void tPoly_setPitchGlideTime (tPoly* const poly, float t);
281+
282+ //! Set the amount of pitch bend
283+ /*!
284+ @param poly A pointer to the relevant tPoly.
285+ @param pitchBend The new amount of pitch bend.
286+ */
287+ void tPoly_setPitchBend (tPoly* const poly, float pitchBend);
288+ void tPoly_setBendGlideTime (tPoly* const poly, float t);
289+ void tPoly_setBendSamplesPerTick (tPoly* const poly, float t);
290+
291+
292+ //! Execute all tick-rate changes in the poly handler's pitch, including glide and bend.
293+ /*!
294+ @param poly A pointer to the relevant tPoly.
295+ */
296+ void tPoly_tickPitch (tPoly* const poly);
297+
298+
299+ //! Execute the tick-rate change of the poly handler's pitch glide.
300+ /*!
301+ @param poly A pointer to the relevant tPoly.
302+ */
303+ void tPoly_tickPitchGlide (tPoly* const poly);
304+
305+
306+ //! Execute the tick-rate change of the poly handler's pitch bend.
307+ /*!
308+ @param poly A pointer to the relevant tPoly.
309+ */
310+ void tPoly_tickPitchBend (tPoly* const poly);
311+
312+
313+ //! Get the current number of voices available to play notes.
314+ /*!
315+ @param poly A pointer to the relevant tPoly.
316+ @return The current number of voices available to play notes.
317+ */
318+ int tPoly_getNumVoices (tPoly* const poly);
319+
320+ //! Get the number of voices currently playing notes.
321+ /*!
322+ @param poly A pointer to the relevant tPoly.
323+ @return The number of voices currently playing notes.
324+ */
325+ int tPoly_getNumActiveVoices (tPoly* const poly);
326+
327+ //! Get the current pitch of a given voice.
328+ /*!
329+ @param poly A pointer to the relevant tPoly.
330+ @param voice The voice to get the pitch of.
331+ @return The current pitch of the given voice as a fractional MIDI note number.
332+ */
333+ float tPoly_getPitch (tPoly* const poly, uint8_t voice);
334+
335+
336+ //! Get the current MIDI note number of a given voice.
337+ /*!
338+ @param poly A pointer to the relevant tPoly.
339+ @param voice The voice to get the MIDI note number of.
340+ @return The MIDI note number of the given voice.
341+ */
342+ int tPoly_getKey (tPoly* const poly, uint8_t voice);
343+
344+
345+ //! Get the current MIDI velocity of a given voice.
346+ /*!
347+ @param poly A pointer to the relevant tPoly.
348+ @param voice The voice to get the MIDI velocity of.
349+ @return The current MIDI velocity of the given voice.
350+ */
351+ int tPoly_getVelocity (tPoly* const poly, uint8_t voice);
352+
353+
354+ //! Get the current play state of a given voice.
355+ /*!
356+ @param poly A pointer to the relevant tPoly.
357+ @param voice The voice to get the state of.
358+ @return The current play state of the given voice.
359+ */
360+ int tPoly_isOn (tPoly* const poly, uint8_t voice);
361+
362+ /*! @} */
122363
123364 //==============================================================================
124365
LEAF/Inc/leaf-oscillators.h+469−67
@@ -15,28 +15,81 @@ extern "C" { · 14 unmodified lines
1515
1616 #include "leaf-math.h"
1717 #include "leaf-mempool.h"
18+#include "leaf-tables.h"
1819 #include "leaf-filters.h"
1920
21+ /*!
22+ * Header.
23+ * @include basic-oscillators.h
24+ * @example basic-oscillators.c
25+ * An example.
26+ */
27+
2028 //==============================================================================
2129
22− /* tCycle: Cycle/Sine waveform. Wavetable synthesis.*/
2330 typedef struct _tCycle
2431 {
2532 // Underlying phasor
2633 float phase;
2734 float inc,freq;
28−
2935 } _tCycle;
3036
3137 typedef _tCycle* tCycle;
3238
33− void tCycle_init (tCycle* const);
34− void tCycle_free (tCycle* const);
35− void tCycle_initToPool (tCycle* const, tMempool* const);
36− void tCycle_freeFromPool (tCycle* const, tMempool* const);
39+ /*!
40+ * @defgroup tcycle tCycle
41+ * @ingroup oscillators
42+ * @brief A cycle/sine waveform oscillator. Uses wavetable synthesis.
43+ * @{
44+ */
45+
46+ //! Initialize a tCycle to the default LEAF mempool.
47+ /*!
48+ @param osc A pointer to the tCycle to be initialized.
49+ */
50+ void tCycle_init (tCycle* const osc);
51+
52+
53+ //! Free a tCycle from the default LEAF mempool.
54+ /*!
55+ @param osc A pointer to the tCycle to be freed.
56+ */
57+ void tCycle_free (tCycle* const osc);
58+
59+
60+ //! Initialize a tCycle to a specified mempool.
61+ /*!
62+ @param osc A pointer to the tCycle to be initialized.
63+ @param pool A pointer to the tMempool to which the tCycle should be initialized.
64+ */
65+ void tCycle_initToPool (tCycle* const osc, tMempool* const pool);
66+
67+
68+ //! Free a tCycle from a specified mempool.
69+ /*!
70+ @param osc A pointer to the tCycle to be freed.
71+ @param pool A pointer to the tMempool from which the tCycle should be freed.
72+ */
73+ void tCycle_freeFromPool (tCycle* const osc, tMempool* const pool);
74+
75+
76+ //! Tick a tCycle oscillator.
77+ /*!
78+ @param osc A pointer to the relevant tCycle.
79+ @return The ticked sample as a float from -1 to 1.
80+ */
81+ float tCycle_tick (tCycle* const osc);
82+
83+
84+ //! Set the frequency of a tCycle oscillator.
85+ /*!
86+ @param osc A pointer to the relevant tCycle.
87+ @param freq The frequency to set the oscillator to.
88+ */
89+ void tCycle_setFreq (tCycle* const osc, float freq);
90+
91+ /*! @} */
3792
38− float tCycle_tick (tCycle* const);
39− int tCycle_setFreq (tCycle* const, float freq);
4093
4194 //==============================================================================
4295
@@ -46,18 +99,65 @@ extern "C" { · 3 unmodified lines
4699 // Underlying phasor
47100 float phase;
48101 float inc,freq;
49−
102+ TableName oct;
103+ float w;
50104 } _tTriangle;
51105
52106 typedef _tTriangle* tTriangle;
53107
54− void tTriangle_init (tTriangle* const);
55− void tTriangle_free (tTriangle* const);
56− void tTriangle_initToPool (tTriangle* const, tMempool* const);
57− void tTriangle_freeFromPool (tTriangle* const, tMempool* const);
108+ /*!
109+ * @defgroup ttriangle tTriangle
110+ * @ingroup oscillators
111+ * @brief An anti-aliased triangle waveform oscillator. Uses wavetable synthesis.
112+ * @{
113+ */
114+
115+ //! Initialize a tTriangle to the default LEAF mempool.
116+ /*!
117+ @param osc A pointer to the tTriangle to be initialized.
118+ */
119+ void tTriangle_init (tTriangle* const osc);
120+
121+
122+ //! Free a tTriangle from the default LEAF mempool.
123+ /*!
124+ @param osc A pointer to the tTriangle to be freed.
125+ */
126+ void tTriangle_free (tTriangle* const osc);
127+
128+
129+ //! Initialize a tTriangle to a specified mempool.
130+ /*!
131+ @param osc A pointer to the tTriangle to be initialized.
132+ @param pool A pointer to the tMempool to which the tTriangle should be initialized.
133+ */
134+ void tTriangle_initToPool (tTriangle* const osc, tMempool* const pool);
135+
136+
137+ //! Free a tTriangle from a specified mempool.
138+ /*!
139+ @param osc A pointer to the tTriangle to be freed.
140+ @param pool A pointer to the tMempool from which the tTriangle should be freed.
141+ */
142+ void tTriangle_freeFromPool (tTriangle* const osc, tMempool* const pool);
143+
144+
145+ //! Tick a tTriangle oscillator.
146+ /*!
147+ @param osc A pointer to the relevant tTriangle.
148+ @return The ticked sample as a float from -1 to 1.
149+ */
150+ float tTriangle_tick (tTriangle* const osc);
58151
59− float tTriangle_tick (tTriangle* const);
60− int tTriangle_setFreq (tTriangle* const, float freq);
152+
153+ //! Set the frequency of a tTriangle oscillator.
154+ /*!
155+ @param osc A pointer to the relevant tTriangle.
156+ @param freq The frequency to set the oscillator to.
157+ */
158+ void tTriangle_setFreq (tTriangle* const osc, float freq);
159+
160+ /*! @} */
61161
62162 //==============================================================================
63163
@@ -67,18 +167,65 @@ extern "C" { · 3 unmodified lines
67167 // Underlying phasor
68168 float phase;
69169 float inc,freq;
70−
170+ TableName oct;
171+ float w;
71172 } _tSquare;
72173
73174 typedef _tSquare* tSquare;
74175
75− void tSquare_init (tSquare* const);
76− void tSquare_free (tSquare* const);
77− void tSquare_initToPool (tSquare* const, tMempool* const);
78− void tSquare_freeFromPool(tSquare* const, tMempool* const);
176+ /*!
177+ * @defgroup tsquare tSquare
178+ * @ingroup oscillators
179+ * @brief An anti-aliased square waveform oscillator. Uses wavetable synthesis.
180+ * @{
181+ */
182+
183+ //! Initialize a tSquare to the default LEAF mempool.
184+ /*!
185+ @param osc A pointer to the tSquare to be initialized.
186+ */
187+ void tSquare_init (tSquare* const osc);
188+
189+
190+ //! Free a tSquare from the default LEAF mempool.
191+ /*!
192+ @param osc A pointer to the tSquare to be freed.
193+ */
194+ void tSquare_free (tSquare* const osc);
195+
196+
197+ //! Initialize a tSquare to a specified mempool.
198+ /*!
199+ @param osc A pointer to the tSquare to be initialized.
200+ @param pool A pointer to the tMempool to which the tSquare should be initialized.
201+ */
202+ void tSquare_initToPool (tSquare* const osc, tMempool* const);
203+
204+
205+ //! Free a tSquare from a specified mempool.
206+ /*!
207+ @param osc A pointer to the tSquare to be freed.
208+ @param pool A pointer to the tMempool from which the tSquare should be freed.
209+ */
210+ void tSquare_freeFromPool(tSquare* const osc, tMempool* const);
211+
212+
213+ //! Tick a tSquare oscillator.
214+ /*!
215+ @param osc A pointer to the relevant tSquare.
216+ @return The ticked sample as a float from -1 to 1.
217+ */
218+ float tSquare_tick (tSquare* const osc);
219+
220+
221+ //! Set the frequency of a tSquare oscillator.
222+ /*!
223+ @param osc A pointer to the relevant tSquare.
224+ @param freq The frequency to set the oscillator to.
225+ */
226+ void tSquare_setFreq (tSquare* const osc, float freq);
79227
80− float tSquare_tick (tSquare* const);
81− int tSquare_setFreq (tSquare* const, float freq);
228+ /*! @} */
82229
83230 //==============================================================================
84231
@@ -88,18 +235,65 @@ extern "C" { · 3 unmodified lines
88235 // Underlying phasor
89236 float phase;
90237 float inc,freq;
91−
238+ TableName oct;
239+ float w;
92240 } _tSawtooth;
93241
94242 typedef _tSawtooth* tSawtooth;
95243
96− void tSawtooth_init (tSawtooth* const);
97− void tSawtooth_free (tSawtooth* const);
98− void tSawtooth_initToPool (tSawtooth* const, tMempool* const);
99− void tSawtooth_freeFromPool (tSawtooth* const, tMempool* const);
244+ /*!
245+ * @defgroup tsawtooth tSawtooth
246+ * @ingroup oscillators
247+ * @brief An anti-aliased sawtooth waveform oscillator. Uses wavetable synthesis.
248+ * @{
249+ */
250+
251+ //! Initialize a tSawtooth to the default LEAF mempool.
252+ /*!
253+ @param osc A pointer to the tSawtooth to be initialized.
254+ */
255+ void tSawtooth_init (tSawtooth* const osc);
256+
257+
258+ //! Free a tSawtooth from the default LEAF mempool.
259+ /*!
260+ @param osc A pointer to the tSawtooth to be freed.
261+ */
262+ void tSawtooth_free (tSawtooth* const osc);
263+
264+
265+ //! Initialize a tSawtooth to a specified mempool.
266+ /*!
267+ @param osc A pointer to the tSawtooth to be initialized.
268+ @param pool A pointer to the tMempool to which the tSawtooth should be initialized.
269+ */
270+ void tSawtooth_initToPool (tSawtooth* const osc, tMempool* const pool);
271+
100272
101− float tSawtooth_tick (tSawtooth* const);
102− int tSawtooth_setFreq (tSawtooth* const, float freq);
273+ //! Free a tSawtooth from a specified mempool.
274+ /*!
275+ @param osc A pointer to the tSawtooth to be freed.
276+ @param pool A pointer to the tMempool from which the tSawtooth should be freed.
277+ */
278+ void tSawtooth_freeFromPool (tSawtooth* const osc, tMempool* const pool);
279+
280+
281+ //! Tick a tSawtooth oscillator.
282+ /*!
283+ @param osc A pointer to the relevant tSawtooth.
284+ @return The ticked sample as a float from -1 to 1.
285+ */
286+ float tSawtooth_tick (tSawtooth* const osc);
287+
288+
289+ //! Set the frequency of a tSawtooth oscillator.
290+ /*!
291+ @param osc A pointer to the relevant tSawtooth.
292+ @param freq The frequency to set the oscillator to.
293+ */
294+ void tSawtooth_setFreq (tSawtooth* const osc, float freq);
295+
296+ /*! @} */
103297
104298 //==============================================================================
105299
@@ -113,23 +307,81 @@ extern "C" { · 7 unmodified lines
113307
114308 typedef _tPhasor* tPhasor;
115309
116− void tPhasor_init (tPhasor* const);
117− void tPhasor_free (tPhasor* const);
118− void tPhasor_initToPool (tPhasor* const, tMempool* const);
119− void tPhasor_freeFromPool(tPhasor* const, tMempool* const);
310+ /*!
311+ * @defgroup tphasor Phasor
312+ * @ingroup oscillators
313+ * @brief An aliasing phasor.
314+ * @{
315+ */
316+
317+ //! Initialize a tPhasor to the default LEAF mempool.
318+ /*!
319+ @param osc A pointer to the tPhasor to be initialized.
320+ */
321+ void tPhasor_init (tPhasor* const osc);
322+
323+
324+ //! Free a tPhasor from the default LEAF mempool.
325+ /*!
326+ @param osc A pointer to the tPhasor to be freed.
327+ */
328+ void tPhasor_free (tPhasor* const osc);
329+
330+
331+ //! Initialize a tPhasor to a specified mempool.
332+ /*!
333+ @param osc A pointer to the tPhasor to be initialized.
334+ @param pool A pointer to the tMempool to which the tPhasor should be initialized.
335+ */
336+ void tPhasor_initToPool (tPhasor* const osc, tMempool* const);
337+
120338
121− float tPhasor_tick (tPhasor* const);
122− int tPhasor_setFreq (tPhasor* const, float freq);
339+ //! Free a tPhasor from a specified mempool.
340+ /*!
341+ @param osc A pointer to the tPhasor to be freed.
342+ @param pool A pointer to the tMempool from which the tPhasor should be freed.
343+ */
344+ void tPhasor_freeFromPool(tPhasor* const osc, tMempool* const);
345+
346+
347+ //! Tick a tPhasor oscillator.
348+ /*!
349+ @param osc A pointer to the relevant tPhasor.
350+ @return The ticked sample as a float from 0 to 1.
351+ */
352+ float tPhasor_tick (tPhasor* const osc);
353+
354+
355+ //! Set the frequency of a tPhasor oscillator.
356+ /*!
357+ @param osc A pointer to the relevant tPhasor.
358+ @param freq The frequency to set the oscillator to.
359+ */
360+ void tPhasor_setFreq (tPhasor* const osc, float freq);
361+
362+ /*! @} */
123363
124364 //==============================================================================
125365
366+ /*!
367+ * @defgroup tnoise tNoise
368+ * @ingroup oscillators
369+ * @brief A noise generator.
370+ * @{
371+ */
372+
126373 /* tNoise. WhiteNoise, PinkNoise. */
127− typedef enum NoiseType
374+ /*!
375+ * Noise types
376+ */
377+ enum NoiseType
128378 {
129− WhiteNoise=0,
130− PinkNoise,
379+ WhiteNoise, //!< White noise. Full spectrum.
380+ PinkNoise, //!< Pink noise. Inverse frequency-proportional spectrum.
131381 NoiseTypeNil,
132− } NoiseType;
382+ };
383+
384+ typedef enum NoiseType NoiseType;
133385
134386 typedef struct _tNoise
135387 {
@@ -141,23 +393,65 @@ extern "C" { · 5 unmodified lines
141393
142394 typedef _tNoise* tNoise;
143395
144− void tNoise_init (tNoise* const, NoiseType type);
145− void tNoise_free (tNoise* const);
146− void tNoise_initToPool (tNoise* const, NoiseType type, tMempool* const);
147− void tNoise_freeFromPool (tNoise* const, tMempool* const);
396+ //! Initialize a tNoise to the default LEAF mempool.
397+ /*!
398+ @param osc A pointer to the tNoise to be initialized.
399+ */
400+ void tNoise_init (tNoise* const noise, NoiseType type);
401+
402+
403+ //! Free a tNoise from the default LEAF mempool.
404+ /*!
405+ @param osc A pointer to the tNoise to be freed.
406+ */
407+ void tNoise_free (tNoise* const noise);
408+
409+
410+ //! Initialize a tNoise to a specified mempool.
411+ /*!
412+ @param osc A pointer to the tNoise to be initialized.
413+ @param pool A pointer to the tMempool to which the tNoise should be initialized.
414+ */
415+ void tNoise_initToPool (tNoise* const noise, NoiseType type, tMempool* const);
416+
148417
149− float tNoise_tick (tNoise* const);
418+ //! Free a tNoise from a specified mempool.
419+ /*!
420+ @param osc A pointer to the tNoise to be freed.
421+ @param pool A pointer to the tMempool from which the tNoise should be freed.
422+ */
423+ void tNoise_freeFromPool (tNoise* const noise, tMempool* const);
424+
425+
426+ //! Tick a tNoise oscillator.
427+ /*!
428+ @param osc A pointer to the relevant tNoise.
429+ @return The ticked sample as a float from -1 to 1.
430+ */
431+ float tNoise_tick (tNoise* const noise);
432+
433+ /*! @} */
150434
151435 //==============================================================================
152436
153− /* tNeuron */
154− typedef enum NeuronMode
437+ /*!
438+ * @defgroup tneuron tNeuron
439+ * @ingroup oscillators
440+ * @brief A model of a neuron, adapted to act as an oscillator.
441+ * @{
442+ */
443+
444+ /*!
445+ * Neuron modes
446+ */
447+ enum NeuronMode
155448 {
156− NeuronNormal = 0,
157− NeuronTanh,
158− NeuronAaltoShaper,
449+ NeuronNormal, //!< Normal operation
450+ NeuronTanh, //!< Tanh voltage shaping
451+ NeuronAaltoShaper, //!< Aalto voltage shaping
159452 NeuronModeNil
160− } NeuronMode;
453+ };
454+ typedef enum NeuronMode NeuronMode;
161455
162456 typedef struct _tNeuron
163457 {
@@ -178,23 +472,131 @@ extern "C" { · 14 unmodified lines
178472
179473 typedef _tNeuron* tNeuron;
180474
181− void tNeuron_init (tNeuron* const);
182− void tNeuron_free (tNeuron* const);
183− void tNeuron_initToPool (tNeuron* const, tMempool* const);
184− void tNeuron_freeFromPool(tNeuron* const, tMempool* const);
185−
186− void tNeuron_reset (tNeuron* const);
187− float tNeuron_tick (tNeuron* const);
188− void tNeuron_setMode (tNeuron* const, NeuronMode mode);
189− void tNeuron_setCurrent (tNeuron* const, float current);
190− void tNeuron_setK (tNeuron* const, float K);
191− void tNeuron_setL (tNeuron* const, float L);
192− void tNeuron_setN (tNeuron* const, float N);
193− void tNeuron_setC (tNeuron* const, float C);
194− void tNeuron_setV1 (tNeuron* const, float V1);
195− void tNeuron_setV2 (tNeuron* const, float V2);
196− void tNeuron_setV3 (tNeuron* const, float V3);
197− void tNeuron_setTimeStep (tNeuron* const, float timestep);
475+ //! Initialize a tNeuron to the default LEAF mempool.
476+ /*!
477+ @param neuron A pointer to the tNeuron to be initialized.
478+ */
479+ void tNeuron_init (tNeuron* const neuron);
480+
481+
482+ //! Free a tNeuron from the default LEAF mempool.
483+ /*!
484+ @param neuron A pointer to the tNeuron to be freed.
485+ */
486+ void tNeuron_free (tNeuron* const neuron);
487+
488+
489+ //! Initialize a tNeuron to a specified mempool.
490+ /*!
491+ @param neuron A pointer to the tNeuron to be initialized.
492+ @param pool A pointer to the tMempool to which the tNeuron should be initialized.
493+ */
494+ void tNeuron_initToPool (tNeuron* const neuron, tMempool* const pool);
495+
496+
497+ //! Free a tNeuron from a specified mempool.
498+ /*!
499+ @param neuron A pointer to the tNeuron to be freed.
500+ @param pool A pointer to the tMempool from which the tNeuron should be freed.
501+ */
502+ void tNeuron_freeFromPool(tNeuron* const neuron, tMempool* const pool);
503+
504+
505+ //! Reset the neuron model.
506+ /*!
507+ @param neuron A pointer to the relevant tNeuron.
508+ */
509+ void tNeuron_reset (tNeuron* const neuron);
510+
511+
512+ //! Tick a tNeuron oscillator.
513+ /*!
514+ @param neuron A pointer to the relevant tNeuron.
515+ @return The ticked sample as a float from -1 to 1.
516+ */
517+ float tNeuron_tick (tNeuron* const neuron);
518+
519+
520+ //! Set the tNeuron shaping mode.
521+ /*!
522+ @param neuron A pointer to the relevant tNeuron.
523+ @param mode The mode to set the tNeuron to.
524+ */
525+ void tNeuron_setMode (tNeuron* const neuron, NeuronMode mode);
526+
527+
528+ //! Set the current.
529+ /*!
530+ @param neuron A pointer to the relevant tNeuron.
531+ @param current The new current.
532+ */
533+ void tNeuron_setCurrent (tNeuron* const neuron, float current);
534+
535+
536+ //! Set the potassium value.
537+ /*!
538+ @param neuron A pointer to the relevant tNeuron.
539+ @param K The new potassium.
540+ */
541+ void tNeuron_setK (tNeuron* const neuron, float K);
542+
543+
544+ //! Set the chloride value.
545+ /*!
546+ @param neuron A pointer to the relevant tNeuron.
547+ @param L The new chloride value.
548+ */
549+ void tNeuron_setL (tNeuron* const neuron, float L);
550+
551+
552+ //! Set the sodium value.
553+ /*!
554+ @param neuron A pointer to the relevant tNeuron.
555+ @param N The new sodium value.
556+ */
557+ void tNeuron_setN (tNeuron* const neuron, float N);
558+
559+
560+ //! Set the calcium value.
561+ /*!
562+ @param neuron A pointer to the relevant tNeuron.
563+ @param C The new calcium.
564+ */
565+ void tNeuron_setC (tNeuron* const neuron, float C);
566+
567+
568+ //! Set the V1 value.
569+ /*!
570+ @param neuron A pointer to the relevant tNeuron.
571+ @param V1 The new V1.
572+ */
573+ void tNeuron_setV1 (tNeuron* const neuron, float V1);
574+
575+
576+ //! Set the V2 value.
577+ /*!
578+ @param neuron A pointer to the relevant tNeuron.
579+ @param V2 The new V2.
580+ */
581+ void tNeuron_setV2 (tNeuron* const neuron, float V2);
582+
583+
584+ //! Set the V3 value.
585+ /*!
586+ @param neuron A pointer to the relevant tNeuron.
587+ @param V3 The new V3.
588+ */
589+ void tNeuron_setV3 (tNeuron* const neuron, float V3);
590+
591+
592+ //! Set the time step.
593+ /*!
594+ @param neuron A pointer to the relevant tNeuron.
595+ @param timestep The new time step
596+ */
597+ void tNeuron_setTimeStep (tNeuron* const neuron, float timestep);
598+
599+ /*! @} */
198600
199601 //==============================================================================
200602
LEAF/Inc/leaf-physical.h+8−0
@@ -26,6 +26,14 @@ extern "C" { · 25 unmodified lines
2626 #include "leaf-envelopes.h"
2727 #include "leaf-dynamics.h"
2828
29+ /*!
30+ * @internal
31+ * Header.
32+ * @include basic-oscillators.h
33+ * @example basic-oscillators.c
34+ * An example.
35+ */
36+
2937 //==============================================================================
3038
3139 /* Karplus Strong model */
LEAF/Inc/leaf-reverb.h+8−0
@@ -22,6 +22,14 @@ extern "C" { · 21 unmodified lines
2222 #include "leaf-filters.h"
2323 #include "leaf-oscillators.h"
2424
25+ /*!
26+ * @internal
27+ * Header.
28+ * @include basic-oscillators.h
29+ * @example basic-oscillators.c
30+ * An example.
31+ */
32+
2533 //==============================================================================
2634
2735 /* PRCReverb: Reverb, reimplemented from STK (Cook and Scavone). */
LEAF/Inc/leaf-sampling.h+8−0
@@ -23,6 +23,14 @@ extern "C" { · 22 unmodified lines
2323 #include "leaf-mempool.h"
2424 #include "leaf-analysis.h"
2525
26+ /*!
27+ * @internal
28+ * Header.
29+ * @include basic-oscillators.h
30+ * @example basic-oscillators.c
31+ * An example.
32+ */
33+
2634 //==============================================================================
2735
2836 typedef enum RecordMode
LEAF/Inc/leaf-tables.h+25−25
@@ -32,23 +32,23 @@ extern "C" { · 31 unmodified lines
3232 #define FILTERTAN_TABLE_SIZE 4096
3333
3434 #define SHAPER1_TABLE_SIZE 65536
35−extern const float shaper1[SHAPER1_TABLE_SIZE];
35+extern const float __leaf_table_shaper1[SHAPER1_TABLE_SIZE];
3636
3737 #define COEFFS_SIZE 32
38−extern const float* firCoeffs[COEFFS_SIZE];
39−extern const float firNumTaps[COEFFS_SIZE];
40−extern const float fir2XLow[32];
41−extern const float fir4XLow[64];
42−extern const float fir8XLow[64];
43−extern const float fir16XLow[128];
44−extern const float fir32XLow[256];
45−extern const float fir64XLow[256];
46−extern const float fir2XHigh[128];
47−extern const float fir4XHigh[256];
48−extern const float fir8XHigh[256];
49−extern const float fir16XHigh[512];
50−extern const float fir32XHigh[512];
51−extern const float fir64XHigh[1024];
38+extern const float* __leaf_tableref_firCoeffs[COEFFS_SIZE];
39+extern const float __leaf_tablesize_firNumTaps[COEFFS_SIZE];
40+extern const float __leaf_table_fir2XLow[32];
41+extern const float __leaf_table_fir4XLow[64];
42+extern const float __leaf_table_fir8XLow[64];
43+extern const float __leaf_table_fir16XLow[128];
44+extern const float __leaf_table_fir32XLow[256];
45+extern const float __leaf_table_fir64XLow[256];
46+extern const float __leaf_table_fir2XHigh[128];
47+extern const float __leaf_table_fir4XHigh[256];
48+extern const float __leaf_table_fir8XHigh[256];
49+extern const float __leaf_table_fir16XHigh[512];
50+extern const float __leaf_table_fir32XHigh[512];
51+extern const float __leaf_table_fir64XHigh[1024];
5252
5353 typedef enum TableName
5454 {
@@ -68,26 +68,26 @@ typedef enum TableName · 13 unmodified lines
6868
6969 // mtof lookup table based on input range [0.0,1.0) in 4096 increments - midi frequency values scaled between m25 and m134 (from the Snyderphonics DrumBox code)
7070
71−extern const float exp_decay[EXP_DECAY_TABLE_SIZE];
72−extern const float attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE];
71+extern const float __leaf_table_exp_decay[EXP_DECAY_TABLE_SIZE];
72+extern const float __leaf_table_attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE];
7373
74−extern const float filtertan[FILTERTAN_TABLE_SIZE];
74+extern const float __leaf_table_filtertan[FILTERTAN_TABLE_SIZE];
7575
76−extern const float mtof1[MTOF1_TABLE_SIZE];
77−extern const float decayCoeffTable[DECAY_COEFF_TABLE_SIZE];
76+extern const float __leaf_table_mtof1[MTOF1_TABLE_SIZE];
77+extern const float __leaf_table_decayCoeffTable[DECAY_COEFF_TABLE_SIZE];
7878
79−extern const float tanh1[TANH1_TABLE_SIZE];
79+extern const float __leaf_table_tanh1[TANH1_TABLE_SIZE];
8080
8181 //==============================================================================
8282
8383 /* Sine wave table ripped from http://aquaticus.info/pwm-sine-wave. */
84−extern const float sinewave[SINE_TABLE_SIZE];
84+extern const float __leaf_table_sinewave[SINE_TABLE_SIZE];
8585
86−extern const float sawtooth[11][SAW_TABLE_SIZE];
86+extern const float __leaf_table_sawtooth[11][SAW_TABLE_SIZE];
8787
88−extern const float triangle[11][TRI_TABLE_SIZE];
88+extern const float __leaf_table_triangle[11][TRI_TABLE_SIZE];
8989
90−extern const float squarewave[11][SQR_TABLE_SIZE];
90+extern const float __leaf_table_squarewave[11][SQR_TABLE_SIZE];
9191
9292 //==============================================================================
9393
LEAF/Src/leaf-analysis.c+22−22
@@ -41,7 +41,7 @@ void tEnvelopeFollower_free(tEnvelopeFollower* const ef) · 40 unmodified lines
4141 void tEnvelopeFollower_initToPool (tEnvelopeFollower* const ef, float attackThreshold, float decayCoeff, tMempool* const mp)
4242 {
4343 _tMempool* m = *mp;
44− _tEnvelopeFollower* e = *ef = (_tEnvelopeFollower*) mpool_alloc(sizeof(_tEnvelopeFollower), &m->pool);
44+ _tEnvelopeFollower* e = *ef = (_tEnvelopeFollower*) mpool_alloc(sizeof(_tEnvelopeFollower), m);
4545
4646 e->y = 0.0f;
4747 e->a_thresh = attackThreshold;
@@ -53,7 +53,7 @@ void tEnvelopeFollower_freeFromPool (tEnvelopeFollower* const ef, tMempool* · 5 unmodified lines
5353 _tMempool* m = *mp;
5454 _tEnvelopeFollower* e = *ef;
5555
56− mpool_free(e, &m->pool);
56+ mpool_free(e, m);
5757 }
5858
5959 float tEnvelopeFollower_tick(tEnvelopeFollower* const ef, float x)
@@ -108,7 +108,7 @@ void tPowerFollower_free(tPowerFollower* const pf) · 48 unmodified lines
108108 void tPowerFollower_initToPool (tPowerFollower* const pf, float factor, tMempool* const mp)
109109 {
110110 _tMempool* m = *mp;
111− _tPowerFollower* p = *pf = (_tPowerFollower*) mpool_alloc(sizeof(_tPowerFollower), &m->pool);
111+ _tPowerFollower* p = *pf = (_tPowerFollower*) mpool_alloc(sizeof(_tPowerFollower), m);
112112
113113 p->curr=0.0f;
114114 p->factor=factor;
@@ -120,7 +120,7 @@ void tPowerFollower_freeFromPool (tPowerFollower* const pf, tMempool* const m · 5 unmodified lines
120120 _tMempool* m = *mp;
121121 _tPowerFollower* p = *pf;
122122
123− mpool_free(p, &m->pool);
123+ mpool_free(p, m);
124124 }
125125
126126 int tPowerFollower_setFactor(tPowerFollower* const pf, float factor)
@@ -206,7 +206,7 @@ void tEnvPD_free (tEnvPD* const xpd) · 79 unmodified lines
206206 void tEnvPD_initToPool (tEnvPD* const xpd, int ws, int hs, int bs, tMempool* const mp)
207207 {
208208 _tMempool* m = *mp;
209− _tEnvPD* x = *xpd = (_tEnvPD*) mpool_calloc(sizeof(_tEnvPD), &m->pool);
209+ _tEnvPD* x = *xpd = (_tEnvPD*) mpool_calloc(sizeof(_tEnvPD), m);
210210
211211 int period = hs, npoints = ws;
212212
@@ -251,7 +251,7 @@ void tEnvPD_freeFromPool (tEnvPD* const xpd, tMempool* const mp) · 38 unmodified lines
251251 _tMempool* m = *mp;
252252 _tEnvPD* x = *xpd;
253253
254− mpool_free(x, &m->pool);
254+ mpool_free(x, m);
255255 }
256256
257257 float tEnvPD_tick (tEnvPD* const xpd)
@@ -323,7 +323,7 @@ void tAttackDetection_free(tAttackDetection* const ad) · 65 unmodified lines
323323 void tAttackDetection_initToPool (tAttackDetection* const ad, int blocksize, int atk, int rel, tMempool* const mp)
324324 {
325325 _tMempool* m = *mp;
326− *ad = (_tAttackDetection*) mpool_alloc(sizeof(_tAttackDetection), &m->pool);
326+ *ad = (_tAttackDetection*) mpool_alloc(sizeof(_tAttackDetection), m);
327327
328328 atkdtk_init(ad, blocksize, atk, rel);
329329 }
@@ -333,7 +333,7 @@ void tAttackDetection_freeFromPool (tAttackDetection* const ad, tMempool* c · 3 unmodified lines
333333 _tMempool* m = *mp;
334334 _tAttackDetection* a = *ad;
335335
336− mpool_free(a, &m->pool);
336+ mpool_free(a, m);
337337 }
338338
339339 /*******Public Functions***********/
@@ -495,7 +495,7 @@ void tSNAC_free(tSNAC* const snac) · 155 unmodified lines
495495 void tSNAC_initToPool (tSNAC* const snac, int overlaparg, tMempool* const mp)
496496 {
497497 _tMempool* m = *mp;
498− _tSNAC* s = *snac = (_tSNAC*) mpool_alloc(sizeof(_tSNAC), &m->pool);
498+ _tSNAC* s = *snac = (_tSNAC*) mpool_alloc(sizeof(_tSNAC), m);
499499
500500 s->biasfactor = DEFBIAS;
501501 s->timeindex = 0;
@@ -505,10 +505,10 @@ void tSNAC_initToPool (tSNAC* const snac, int overlaparg, tMempool* const · 3 unmodified lines
505505 s->minrms = DEFMINRMS;
506506 s->framesize = SNAC_FRAME_SIZE;
507507
508− s->inputbuf = (float*) mpool_calloc(sizeof(float) * SNAC_FRAME_SIZE, &m->pool);
509− s->processbuf = (float*) mpool_calloc(sizeof(float) * (SNAC_FRAME_SIZE * 2), &m->pool);
510− s->spectrumbuf = (float*) mpool_calloc(sizeof(float) * (SNAC_FRAME_SIZE / 2), &m->pool);
511− s->biasbuf = (float*) mpool_calloc(sizeof(float) * SNAC_FRAME_SIZE, &m->pool);
508+ s->inputbuf = (float*) mpool_calloc(sizeof(float) * SNAC_FRAME_SIZE, m);
509+ s->processbuf = (float*) mpool_calloc(sizeof(float) * (SNAC_FRAME_SIZE * 2), m);
510+ s->spectrumbuf = (float*) mpool_calloc(sizeof(float) * (SNAC_FRAME_SIZE / 2), m);
511+ s->biasbuf = (float*) mpool_calloc(sizeof(float) * SNAC_FRAME_SIZE, m);
512512
513513 snac_biasbuf(snac);
514514 tSNAC_setOverlap(snac, overlaparg);
@@ -519,11 +519,11 @@ void tSNAC_freeFromPool (tSNAC* const snac, tMempool* const mp) · 4 unmodified lines
519519 _tMempool* m = *mp;
520520 _tSNAC* s = *snac;
521521
522− mpool_free(s->inputbuf, &m->pool);
523− mpool_free(s->processbuf, &m->pool);
524− mpool_free(s->spectrumbuf, &m->pool);
525− mpool_free(s->biasbuf, &m->pool);
526− mpool_free(s, &m->pool);
522+ mpool_free(s->inputbuf, m);
523+ mpool_free(s->processbuf, m);
524+ mpool_free(s->spectrumbuf, m);
525+ mpool_free(s->biasbuf, m);
526+ mpool_free(s, m);
527527 }
528528
529529 /******************************************************************************/
@@ -840,18 +840,18 @@ static void snac_biasbuf(tSNAC* const snac) · 310 unmodified lines
840840 //===========================================================================
841841 void tPeriodDetection_init (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize)
842842 {
843− tPeriodDetection_initToPool(pd, in, out, bufSize, frameSize, &leaf_mempool);
843+ tPeriodDetection_initToPool(pd, in, out, bufSize, frameSize, &leaf.mempool);
844844 }
845845
846846 void tPeriodDetection_free (tPeriodDetection* const pd)
847847 {
848− tPeriodDetection_freeFromPool(pd, &leaf_mempool);
848+ tPeriodDetection_freeFromPool(pd, &leaf.mempool);
849849 }
850850
851851 void tPeriodDetection_initToPool (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize, tMempool* const mp)
852852 {
853853 _tMempool* m = *mp;
854− _tPeriodDetection* p = *pd = (_tPeriodDetection*) mpool_calloc(sizeof(_tPeriodDetection), &m->pool);
854+ _tPeriodDetection* p = *pd = (_tPeriodDetection*) mpool_calloc(sizeof(_tPeriodDetection), m);
855855
856856 p->inBuffer = in;
857857 p->outBuffer = out;
@@ -882,7 +882,7 @@ void tPeriodDetection_freeFromPool (tPeriodDetection* const pd, tMempoo · 24 unmodified lines
882882
883883 tEnvPD_freeFromPool(&p->env, mp);
884884 tSNAC_freeFromPool(&p->snac, mp);
885− mpool_free(p, &m->pool);
885+ mpool_free(p, m);
886886 }
887887
888888 float tPeriodDetection_tick (tPeriodDetection* pd, float sample)
LEAF/Src/leaf-delay.c+30−30
@@ -21,24 +21,24 @@ · 20 unmodified lines
2121 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Delay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
2222 void tDelay_init (tDelay* const dl, uint32_t delay, uint32_t maxDelay)
2323 {
24− tDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);
24+ tDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
2525 }
2626
2727 void tDelay_free(tDelay* const dl)
2828 {
29− tDelay_freeFromPool(dl, &leaf_mempool);
29+ tDelay_freeFromPool(dl, &leaf.mempool);
3030 }
3131
3232 void tDelay_initToPool (tDelay* const dl, uint32_t delay, uint32_t maxDelay, tMempool* const mp)
3333 {
3434 _tMempool* m = *mp;
35− _tDelay* d = *dl = (_tDelay*) mpool_alloc(sizeof(_tDelay), &m->pool);
35+ _tDelay* d = *dl = (_tDelay*) mpool_alloc(sizeof(_tDelay), m);
3636
3737 d->maxDelay = maxDelay;
3838
3939 d->delay = delay;
4040
41− d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);
41+ d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
4242
4343 d->inPoint = 0;
4444 d->outPoint = 0;
@@ -56,8 +56,8 @@ void tDelay_freeFromPool (tDelay* const dl, tMempool* const mp) · 11 unmodified lines
5656 _tMempool* m = *mp;
5757 _tDelay* d = *dl;
5858
59− mpool_free(d->buff, &m->pool);
60− mpool_free(d, &m->pool);
59+ mpool_free(d->buff, m);
60+ mpool_free(d, m);
6161 }
6262
6363 void tDelay_clear(tDelay* const dl)
@@ -169,18 +169,18 @@ float tDelay_getGain (tDelay* const dl) · 105 unmodified lines
169169 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LinearDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
170170 void tLinearDelay_init (tLinearDelay* const dl, float delay, uint32_t maxDelay)
171171 {
172− tLinearDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);
172+ tLinearDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
173173 }
174174
175175 void tLinearDelay_free(tLinearDelay* const dl)
176176 {
177− tLinearDelay_freeFromPool(dl, &leaf_mempool);
177+ tLinearDelay_freeFromPool(dl, &leaf.mempool);
178178 }
179179
180180 void tLinearDelay_initToPool (tLinearDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
181181 {
182182 _tMempool* m = *mp;
183− _tLinearDelay* d = *dl = (_tLinearDelay*) mpool_alloc(sizeof(_tLinearDelay), &m->pool);
183+ _tLinearDelay* d = *dl = (_tLinearDelay*) mpool_alloc(sizeof(_tLinearDelay), m);
184184
185185 d->maxDelay = maxDelay;
186186
@@ -188,7 +188,7 @@ void tLinearDelay_initToPool (tLinearDelay* const dl, float delay, uint32_t · 1 unmodified line
188188 else if (delay < 0.0f) d->delay = 0.0f;
189189 else d->delay = delay;
190190
191− d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);
191+ d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
192192
193193 d->gain = 1.0f;
194194
@@ -206,8 +206,8 @@ void tLinearDelay_freeFromPool(tLinearDelay* const dl, tMempool* const mp) · 11 unmodified lines
206206 _tMempool* m = *mp;
207207 _tLinearDelay* d = *dl;
208208
209− mpool_free(d->buff, &m->pool);
210− mpool_free(d, &m->pool);
209+ mpool_free(d->buff, m);
210+ mpool_free(d, m);
211211 }
212212
213213 void tLinearDelay_clear(tLinearDelay* const dl)
@@ -367,18 +367,18 @@ float tLinearDelay_getGain (tLinearDelay* const dl) · 153 unmodified lines
367367 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LinearDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
368368 void tHermiteDelay_init (tHermiteDelay* const dl, float delay, uint32_t maxDelay)
369369 {
370− tHermiteDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);
370+ tHermiteDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
371371 }
372372
373373 void tHermiteDelay_free(tHermiteDelay* const dl)
374374 {
375− tHermiteDelay_freeFromPool(dl, &leaf_mempool);
375+ tHermiteDelay_freeFromPool(dl, &leaf.mempool);
376376 }
377377
378378 void tHermiteDelay_initToPool (tHermiteDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
379379 {
380380 _tMempool* m = *mp;
381− _tHermiteDelay* d = *dl = (_tHermiteDelay*) mpool_alloc(sizeof(_tHermiteDelay), &m->pool);
381+ _tHermiteDelay* d = *dl = (_tHermiteDelay*) mpool_alloc(sizeof(_tHermiteDelay), m);
382382
383383 d->maxDelay = maxDelay;
384384
@@ -386,7 +386,7 @@ void tHermiteDelay_initToPool (tHermiteDelay* const dl, float delay, uint32_ · 1 unmodified line
386386 else if (delay < 0.0f) d->delay = 0.0f;
387387 else d->delay = delay;
388388
389− d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);
389+ d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
390390
391391 d->gain = 1.0f;
392392
@@ -404,8 +404,8 @@ void tHermiteDelay_freeFromPool(tHermiteDelay* const dl, tMempool* const mp) · 11 unmodified lines
404404 _tMempool* m = *mp;
405405 _tHermiteDelay* d = *dl;
406406
407− mpool_free(d->buff, &m->pool);
408− mpool_free(d, &m->pool);
407+ mpool_free(d->buff, m);
408+ mpool_free(d, m);
409409 }
410410
411411
@@ -567,18 +567,18 @@ float tHermiteDelay_getGain (tHermiteDelay* const dl) · 155 unmodified lines
567567 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ AllpassDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
568568 void tAllpassDelay_init (tAllpassDelay* const dl, float delay, uint32_t maxDelay)
569569 {
570− tAllpassDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);
570+ tAllpassDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
571571 }
572572
573573 void tAllpassDelay_free(tAllpassDelay* const dl)
574574 {
575− tAllpassDelay_freeFromPool(dl, &leaf_mempool);
575+ tAllpassDelay_freeFromPool(dl, &leaf.mempool);
576576 }
577577
578578 void tAllpassDelay_initToPool (tAllpassDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
579579 {
580580 _tMempool* m = *mp;
581− _tAllpassDelay* d = *dl = (_tAllpassDelay*) mpool_alloc(sizeof(_tAllpassDelay), &m->pool);
581+ _tAllpassDelay* d = *dl = (_tAllpassDelay*) mpool_alloc(sizeof(_tAllpassDelay), m);
582582
583583 d->maxDelay = maxDelay;
584584
@@ -586,7 +586,7 @@ void tAllpassDelay_initToPool (tAllpassDelay* const dl, float delay, uint32_ · 1 unmodified line
586586 else if (delay < 0.0f) d->delay = 0.0f;
587587 else d->delay = delay;
588588
589− d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);
589+ d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
590590
591591 d->gain = 1.0f;
592592
@@ -606,8 +606,8 @@ void tAllpassDelay_freeFromPool(tAllpassDelay* const dl, tMempool* const mp) · 13 unmodified lines
606606 _tMempool* m = *mp;
607607 _tAllpassDelay* d = *dl;
608608
609− mpool_free(d->buff, &m->pool);
610− mpool_free(d, &m->pool);
609+ mpool_free(d->buff, m);
610+ mpool_free(d, m);
611611 }
612612
613613 void tAllpassDelay_clear(tAllpassDelay* const dl)
@@ -747,22 +747,22 @@ float tAllpassDelay_getGain (tAllpassDelay* const dl) · 133 unmodified lines
747747 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ TapeDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
748748 void tTapeDelay_init (tTapeDelay* const dl, float delay, uint32_t maxDelay)
749749 {
750− tTapeDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);
750+ tTapeDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
751751 }
752752
753753 void tTapeDelay_free(tTapeDelay* const dl)
754754 {
755− tTapeDelay_freeFromPool(dl, &leaf_mempool);
755+ tTapeDelay_freeFromPool(dl, &leaf.mempool);
756756 }
757757
758758 void tTapeDelay_initToPool (tTapeDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
759759 {
760760 _tMempool* m = *mp;
761− _tTapeDelay* d = *dl = (_tTapeDelay*) mpool_alloc(sizeof(_tTapeDelay), &m->pool);
761+ _tTapeDelay* d = *dl = (_tTapeDelay*) mpool_alloc(sizeof(_tTapeDelay), m);
762762
763763 d->maxDelay = maxDelay;
764764
765− d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);
765+ d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
766766
767767 d->gain = 1.0f;
768768
@@ -781,8 +781,8 @@ void tTapeDelay_freeFromPool(tTapeDelay* const dl, tMempool* const mp) · 12 unmodified lines
781781 _tMempool* m = *mp;
782782 _tTapeDelay* d = *dl;
783783
784− mpool_free(d->buff, &m->pool);
785− mpool_free(d, &m->pool);
784+ mpool_free(d->buff, m);
785+ mpool_free(d, m);
786786 }
787787
788788 void tTapeDelay_clear(tTapeDelay* const dl)
LEAF/Src/leaf-distortion.c+16−16
@@ -45,7 +45,7 @@ void tSampleReducer_free (tSampleReducer* const sr) · 44 unmodified lines
4545 void tSampleReducer_initToPool (tSampleReducer* const sr, tMempool* const mp)
4646 {
4747 _tMempool* m = *mp;
48− _tSampleReducer* s = *sr = (_tSampleReducer*) mpool_alloc(sizeof(_tSampleReducer), &m->pool);
48+ _tSampleReducer* s = *sr = (_tSampleReducer*) mpool_alloc(sizeof(_tSampleReducer), m);
4949
5050 s->invRatio = 1.0f;
5151 s->hold = 0.0f;
@@ -57,7 +57,7 @@ void tSampleReducer_freeFromPool (tSampleReducer* const sr, tMempool* const m · 5 unmodified lines
5757 _tMempool* m = *mp;
5858 _tSampleReducer* s = *sr;
5959
60− mpool_free(s, &m->pool);
60+ mpool_free(s, m);
6161 }
6262
6363 float tSampleReducer_tick(tSampleReducer* const sr, float input)
@@ -97,9 +97,9 @@ void tOversampler_init(tOversampler* const osr, int ratio, oBool extraQuality) · 33 unmodified lines
9797 ratio == 32 || ratio == 64) {
9898 os->ratio = ratio;
9999 int idx = (int)(log2f(os->ratio))-1+offset;
100− os->numTaps = firNumTaps[idx];
100+ os->numTaps = __leaf_tablesize_firNumTaps[idx];
101101 os->phaseLength = os->numTaps / os->ratio;
102− os->pCoeffs = (float*) firCoeffs[idx];
102+ os->pCoeffs = (float*) __leaf_tableref_firCoeffs[idx];
103103 os->upState = leaf_alloc(sizeof(float) * os->numTaps * 2);
104104 os->downState = leaf_alloc(sizeof(float) * os->numTaps * 2);
105105 }
@@ -117,7 +117,7 @@ void tOversampler_free(tOversampler* const osr) · 11 unmodified lines
117117 void tOversampler_initToPool (tOversampler* const osr, int ratio, oBool extraQuality, tMempool* const mp)
118118 {
119119 _tMempool* m = *mp;
120− _tOversampler* os = *osr = (_tOversampler*) mpool_alloc(sizeof(_tOversampler), &m->pool);
120+ _tOversampler* os = *osr = (_tOversampler*) mpool_alloc(sizeof(_tOversampler), m);
121121
122122 uint8_t offset = 0;
123123 if (extraQuality) offset = 6;
@@ -126,11 +126,11 @@ void tOversampler_initToPool (tOversampler* const osr, int ratio, oBool e · 2 unmodified lines
126126 ratio == 32 || ratio == 64) {
127127 os->ratio = ratio;
128128 int idx = (int)(log2f(os->ratio))-1+offset;
129− os->numTaps = firNumTaps[idx];
129+ os->numTaps = __leaf_tablesize_firNumTaps[idx];
130130 os->phaseLength = os->numTaps / os->ratio;
131− os->pCoeffs = (float*) firCoeffs[idx];
132− os->upState = mpool_alloc(sizeof(float) * os->numTaps * 2, &m->pool);
133− os->downState = mpool_alloc(sizeof(float) * os->numTaps * 2, &m->pool);
131+ os->pCoeffs = (float*) __leaf_tableref_firCoeffs[idx];
132+ os->upState = mpool_alloc(sizeof(float) * os->numTaps * 2, m);
133+ os->downState = mpool_alloc(sizeof(float) * os->numTaps * 2, m);
134134 }
135135 }
136136
@@ -139,9 +139,9 @@ void tOversampler_freeFromPool (tOversampler* const osr, tMempool* const mp · 2 unmodified lines
139139 _tMempool* m = *mp;
140140 _tOversampler* os = *osr;
141141
142− mpool_free(os->upState, &m->pool);
143− mpool_free(os->downState, &m->pool);
144− mpool_free(os, &m->pool);
142+ mpool_free(os->upState, m);
143+ mpool_free(os->downState, m);
144+ mpool_free(os, m);
145145 }
146146
147147 float tOversampler_tick(tOversampler* const osr, float input, float (*effectTick)(float))
@@ -385,7 +385,7 @@ void tLockhartWavefolder_free(tLockhartWavefolder* const wf) · 237 unmodified lines
385385 void tLockhartWavefolder_initToPool (tLockhartWavefolder* const wf, tMempool* const mp)
386386 {
387387 _tMempool* m = *mp;
388− _tLockhartWavefolder* w = *wf = (_tLockhartWavefolder*) mpool_alloc(sizeof(_tLockhartWavefolder), &m->pool);
388+ _tLockhartWavefolder* w = *wf = (_tLockhartWavefolder*) mpool_alloc(sizeof(_tLockhartWavefolder), m);
389389
390390 w->Ln1 = 0.0;
391391 w->Fn1 = 0.0;
@@ -412,7 +412,7 @@ void tLockhartWavefolder_freeFromPool (tLockhartWavefolder* const wf, tMempoo · 20 unmodified lines
412412 _tMempool* m = *mp;
413413 _tLockhartWavefolder* w = *wf;
414414
415− mpool_free(w, &m->pool);
415+ mpool_free(w, m);
416416 }
417417
418418 double tLockhartWavefolderLambert(double x, double ln)
@@ -511,7 +511,7 @@ void tCrusher_free (tCrusher* const cr) · 92 unmodified lines
511511 void tCrusher_initToPool (tCrusher* const cr, tMempool* const mp)
512512 {
513513 _tMempool* m = *mp;
514− _tCrusher* c = *cr = (_tCrusher*) mpool_alloc(sizeof(_tCrusher), &m->pool);
514+ _tCrusher* c = *cr = (_tCrusher*) mpool_alloc(sizeof(_tCrusher), m);
515515
516516 c->op = 4;
517517 c->div = SCALAR;
@@ -526,7 +526,7 @@ void tCrusher_freeFromPool (tCrusher* const cr, tMempool* const mp) · 8 unmodified lines
526526 _tMempool* m = *mp;
527527 _tCrusher* c = *cr;
528528 tSampleReducer_freeFromPool(&c->sReducer, mp);
529− mpool_free(c, &m->pool);
529+ mpool_free(c, m);
530530 }
531531
532532 float tCrusher_tick (tCrusher* const cr, float input)
LEAF/Src/leaf-dynamics.c+64−4
@@ -66,7 +66,7 @@ void tCompressor_free(tCompressor* const comp) · 65 unmodified lines
6666 void tCompressor_initToPool (tCompressor* const comp, tMempool* const mp)
6767 {
6868 _tMempool* m = *mp;
69− _tCompressor* c = *comp = (_tCompressor*) mpool_alloc(sizeof(_tCompressor), &m->pool);
69+ _tCompressor* c = *comp = (_tCompressor*) mpool_alloc(sizeof(_tCompressor), m);
7070
7171 c->tauAttack = 100;
7272 c->tauRelease = 100;
@@ -84,7 +84,7 @@ void tCompressor_freeFromPool(tCompressor* const comp, tMempool* const mp) · 11 unmodified lines
8484 _tMempool* m = *mp;
8585 _tCompressor* c = *comp;
8686
87− mpool_free(c, &m->pool);
87+ mpool_free(c, m);
8888 }
8989
9090 float tCompressor_tick(tCompressor* const comp, float in)
@@ -160,7 +160,7 @@ void tFeedbackLeveler_free(tFeedbackLeveler* const fb) · 69 unmodified lines
160160 void tFeedbackLeveler_initToPool (tFeedbackLeveler* const fb, float targetLevel, float factor, float strength, int mode, tMempool* const mp)
161161 {
162162 _tMempool* m = *mp;
163− _tFeedbackLeveler* p = *fb = (_tFeedbackLeveler*) mpool_alloc(sizeof(_tFeedbackLeveler), &m->pool);
163+ _tFeedbackLeveler* p = *fb = (_tFeedbackLeveler*) mpool_alloc(sizeof(_tFeedbackLeveler), m);
164164
165165 p->curr=0.0f;
166166 p->targetLevel=targetLevel;
@@ -175,7 +175,7 @@ void tFeedbackLeveler_freeFromPool (tFeedbackLeveler* const fb, tMempool* c · 8 unmodified lines
175175 _tFeedbackLeveler* p = *fb;
176176
177177 tPowerFollower_freeFromPool(&p->pwrFlw, mp);
178− mpool_free(p, &m->pool);
178+ mpool_free(p, m);
179179 }
180180
181181 void tFeedbackLeveler_setStrength(tFeedbackLeveler* const fb, float strength)
@@ -219,3 +219,63 @@ void tFeedbackLeveler_setTargetLevel (tFeedbackLeveler* const fb, float Ta · 37 unmodified lines
219219 p->targetLevel=TargetLevel;
220220 }
221221
222+
223+
224+void tThreshold_init(tThreshold* const th, float low, float high)
225+{
226+ tThreshold_initToPool(th, low, high, &leaf.mempool);
227+}
228+
229+void tThreshold_free(tThreshold* const th)
230+{
231+ tThreshold_freeFromPool(th, &leaf.mempool);
232+}
233+
234+void tThreshold_initToPool (tThreshold* const th, float low, float high, tMempool* const mp)
235+{
236+ _tMempool* m = *mp;
237+ _tThreshold* t = *th = (_tThreshold*) mpool_alloc(sizeof(_tThreshold), m);
238+
239+ t->highThresh = high;
240+ t->lowThresh = low;
241+
242+ t->currentValue = 0;
243+}
244+
245+void tThreshold_freeFromPool(tThreshold* const th, tMempool* const mp)
246+{
247+ _tMempool* m = *mp;
248+ _tThreshold* t = *th;
249+
250+ mpool_free(t, m);
251+}
252+
253+int tThreshold_tick(tThreshold* const th, float in)
254+{
255+ _tThreshold* t = *th;
256+
257+ if (in >= t->highThresh)
258+ {
259+ t->currentValue = 1;
260+ }
261+ else if (in <= t->lowThresh)
262+ {
263+ t->currentValue = 0;
264+ }
265+
266+ return t->currentValue;
267+}
268+
269+void tThreshold_setLow(tThreshold* const th, float low)
270+{
271+ _tThreshold* t = *th;
272+
273+ t->lowThresh = low;
274+}
275+
276+void tThreshold_setHigh(tThreshold* const th, float high)
277+{
278+ _tThreshold* t = *th;
279+
280+ t->highThresh = high;
281+}
LEAF/Src/leaf-effects.c+72−72
@@ -62,7 +62,7 @@ void tTalkbox_free(tTalkbox* const voc) · 61 unmodified lines
6262 void tTalkbox_initToPool (tTalkbox* const voc, int bufsize, tMempool* const mp)
6363 {
6464 _tMempool* m = *mp;
65− _tTalkbox* v = *voc = (_tTalkbox*) mpool_alloc(sizeof(_tTalkbox), &m->pool);
65+ _tTalkbox* v = *voc = (_tTalkbox*) mpool_alloc(sizeof(_tTalkbox), m);
6666
6767 v->param[0] = 0.5f; //wet
6868 v->param[1] = 0.0f; //dry
@@ -71,11 +71,11 @@ void tTalkbox_initToPool (tTalkbox* const voc, int bufsize, tMempool* con · 2 unmodified lines
7171
7272 v->bufsize = bufsize;
7373
74− v->car0 = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);
75− v->car1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);
76− v->window = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);
77− v->buf0 = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);
78− v->buf1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);
74+ v->car0 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
75+ v->car1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
76+ v->window = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
77+ v->buf0 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
78+ v->buf1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
7979
8080 tTalkbox_update(voc);
8181 tTalkbox_suspend(voc);
@@ -86,13 +86,13 @@ void tTalkbox_freeFromPool (tTalkbox* const voc, tMempool* const mp) · 4 unmodified lines
8686 _tMempool* m = *mp;
8787 _tTalkbox* v = *voc;
8888
89− mpool_free(v->buf1, &m->pool);
90− mpool_free(v->buf0, &m->pool);
91− mpool_free(v->window, &m->pool);
92− mpool_free(v->car1, &m->pool);
93− mpool_free(v->car0, &m->pool);
89+ mpool_free(v->buf1, m);
90+ mpool_free(v->buf0, m);
91+ mpool_free(v->window, m);
92+ mpool_free(v->car1, m);
93+ mpool_free(v->car0, m);
9494
95− mpool_free(v, &m->pool);
95+ mpool_free(v, m);
9696 }
9797
9898 void tTalkbox_update(tTalkbox* const voc) ///update internal parameters...
@@ -297,7 +297,7 @@ void tVocoder_free (tVocoder* const voc) · 198 unmodified lines
297297 void tVocoder_initToPool (tVocoder* const voc, tMempool* const mp)
298298 {
299299 _tMempool* m = *mp;
300− _tVocoder* v = *voc = (_tVocoder*) mpool_alloc(sizeof(_tVocoder), &m->pool);
300+ _tVocoder* v = *voc = (_tVocoder*) mpool_alloc(sizeof(_tVocoder), m);
301301
302302 v->param[0] = 0.33f; //input select
303303 v->param[1] = 0.50f; //output dB
@@ -316,7 +316,7 @@ void tVocoder_freeFromPool (tVocoder* const voc, tMempool* const mp) · 12 unmodified lines
316316 _tMempool* m = *mp;
317317 _tVocoder* v = *voc;
318318
319− mpool_free(v, &m->pool);
319+ mpool_free(v, m);
320320 }
321321
322322 void tVocoder_update (tVocoder* const voc)
@@ -518,10 +518,10 @@ void tSOLAD_initToPool (tSOLAD* const wp, tMempool* const mp) · 195 unmodified lines
518518 {
519519 _tMempool* m = *mp;
520520
521− _tSOLAD* w = *wp = (_tSOLAD*) mpool_calloc(sizeof(_tSOLAD), &m->pool);
521+ _tSOLAD* w = *wp = (_tSOLAD*) mpool_calloc(sizeof(_tSOLAD), m);
522522
523523 w->pitchfactor = 1.;
524− w->delaybuf = (float*) mpool_calloc(sizeof(float) * (LOOPSIZE+16), &m->pool);
524+ w->delaybuf = (float*) mpool_calloc(sizeof(float) * (LOOPSIZE+16), m);
525525
526526 solad_init(w);
527527 }
@@ -531,8 +531,8 @@ void tSOLAD_freeFromPool (tSOLAD* const wp, tMempool* const mp) · 3 unmodified lines
531531 _tMempool* m = *mp;
532532 _tSOLAD* w = *wp;
533533
534− mpool_free(w->delaybuf, &m->pool);
535− mpool_free(w, &m->pool);
534+ mpool_free(w->delaybuf, m);
535+ mpool_free(w, m);
536536 }
537537
538538 // send one block of input samples, receive one block of output samples
@@ -901,7 +901,7 @@ void tPitchShift_initToPool (tPitchShift* const psr, tPeriodDetection* c · 362 unmodified lines
901901 {
902902 _tMempool* m = *mp;
903903
904− _tPitchShift* ps = *psr = (_tPitchShift*) mpool_calloc(sizeof(_tPitchShift), &m->pool);
904+ _tPitchShift* ps = *psr = (_tPitchShift*) mpool_calloc(sizeof(_tPitchShift), m);
905905
906906 _tPeriodDetection* p = *pd;
907907
@@ -930,7 +930,7 @@ void tPitchShift_freeFromPool (tPitchShift* const psr, tMempool* const mp) · 22 unmodified lines
930930
931931 tSOLAD_freeFromPool(&ps->sola, mp);
932932 tHighpass_freeFromPool(&ps->hp, mp);
933− mpool_free(ps, &m->pool);
933+ mpool_free(ps, m);
934934 }
935935
936936 void tPitchShift_setPitchFactor(tPitchShift* psr, float pf)
@@ -1052,25 +1052,25 @@ float tPitchShift_shiftToFunc (tPitchShift* psr, float (*fun)(float)) · 115 unmodified lines
10521052
10531053 void tRetune_init(tRetune* const rt, int numVoices, int bufSize, int frameSize)
10541054 {
1055− tRetune_initToPool(rt, numVoices, bufSize, frameSize, &leaf_mempool);
1055+ tRetune_initToPool(rt, numVoices, bufSize, frameSize, &leaf.mempool);
10561056 }
10571057
10581058 void tRetune_free(tRetune* const rt)
10591059 {
1060− tRetune_freeFromPool(rt, &leaf_mempool);
1060+ tRetune_freeFromPool(rt, &leaf.mempool);
10611061 }
10621062
10631063 void tRetune_initToPool (tRetune* const rt, int numVoices, int bufSize, int frameSize, tMempool* const mp)
10641064 {
10651065 _tMempool* m = *mp;
1066− _tRetune* r = *rt = (_tRetune*) mpool_alloc(sizeof(_tRetune), &m->pool);
1066+ _tRetune* r = *rt = (_tRetune*) mpool_alloc(sizeof(_tRetune), m);
10671067
10681068 r->bufSize = bufSize;
10691069 r->frameSize = frameSize;
10701070 r->numVoices = numVoices;
10711071
1072− r->inBuffer = (float*) mpool_calloc(sizeof(float) * r->bufSize, &m->pool);
1073− r->outBuffers = (float**) mpool_calloc(sizeof(float*) * r->numVoices, &m->pool);
1072+ r->inBuffer = (float*) mpool_calloc(sizeof(float) * r->bufSize, m);
1073+ r->outBuffers = (float**) mpool_calloc(sizeof(float*) * r->numVoices, m);
10741074
10751075 r->hopSize = DEFHOPSIZE;
10761076 r->windowSize = DEFWINDOWSIZE;
@@ -1079,12 +1079,12 @@ void tRetune_initToPool (tRetune* const rt, int numVoices, int bufSize, · 2 unmodified lines
10791079
10801080 r->inputPeriod = 0.0f;
10811081
1082− r->ps = (tPitchShift*) mpool_calloc(sizeof(tPitchShift) * r->numVoices, &m->pool);
1083− r->pitchFactor = (float*) mpool_calloc(sizeof(float) * r->numVoices, &m->pool);
1084− r->tickOutput = (float*) mpool_calloc(sizeof(float) * r->numVoices, &m->pool);
1082+ r->ps = (tPitchShift*) mpool_calloc(sizeof(tPitchShift) * r->numVoices, m);
1083+ r->pitchFactor = (float*) mpool_calloc(sizeof(float) * r->numVoices, m);
1084+ r->tickOutput = (float*) mpool_calloc(sizeof(float) * r->numVoices, m);
10851085 for (int i = 0; i < r->numVoices; ++i)
10861086 {
1087− r->outBuffers[i] = (float*) mpool_calloc(sizeof(float) * r->bufSize, &m->pool);
1087+ r->outBuffers[i] = (float*) mpool_calloc(sizeof(float) * r->bufSize, m);
10881088 }
10891089
10901090 tPeriodDetection_initToPool(&r->pd, r->inBuffer, r->outBuffers[0], r->bufSize, r->frameSize, mp);
@@ -1104,14 +1104,14 @@ void tRetune_freeFromPool (tRetune* const rt, tMempool* const mp) · 13 unmodified lines
11041104 for (int i = 0; i < r->numVoices; ++i)
11051105 {
11061106 tPitchShift_freeFromPool(&r->ps[i], mp);
1107− mpool_free(r->outBuffers[i], &m->pool);
1107+ mpool_free(r->outBuffers[i], m);
11081108 }
1109− mpool_free(r->tickOutput, &m->pool);
1110− mpool_free(r->pitchFactor, &m->pool);
1111− mpool_free(r->ps, &m->pool);
1112− mpool_free(r->inBuffer, &m->pool);
1113− mpool_free(r->outBuffers, &m->pool);
1114− mpool_free(r, &m->pool);
1109+ mpool_free(r->tickOutput, m);
1110+ mpool_free(r->pitchFactor, m);
1111+ mpool_free(r->ps, m);
1112+ mpool_free(r->inBuffer, m);
1113+ mpool_free(r->outBuffers, m);
1114+ mpool_free(r, m);
11151115 }
11161116
11171117 float* tRetune_tick(tRetune* const rt, float sample)
@@ -1225,37 +1225,37 @@ float tRetune_getInputFreq(tRetune* const rt) · 107 unmodified lines
12251225
12261226 void tAutotune_init(tAutotune* const rt, int numVoices, int bufSize, int frameSize)
12271227 {
1228− tAutotune_initToPool(rt, numVoices, bufSize, frameSize, &leaf_mempool);
1228+ tAutotune_initToPool(rt, numVoices, bufSize, frameSize, &leaf.mempool);
12291229 }
12301230
12311231 void tAutotune_free(tAutotune* const rt)
12321232 {
1233− tAutotune_freeFromPool(rt, &leaf_mempool);
1233+ tAutotune_freeFromPool(rt, &leaf.mempool);
12341234 }
12351235
12361236 void tAutotune_initToPool (tAutotune* const rt, int numVoices, int bufSize, int frameSize, tMempool* const mp)
12371237 {
12381238 _tMempool* m = *mp;
1239− _tAutotune* r = *rt = (_tAutotune*) mpool_alloc(sizeof(_tAutotune), &m->pool);
1239+ _tAutotune* r = *rt = (_tAutotune*) mpool_alloc(sizeof(_tAutotune), m);
12401240
12411241 r->bufSize = bufSize;
12421242 r->frameSize = frameSize;
12431243 r->numVoices = numVoices;
12441244
1245− r->inBuffer = (float*) mpool_alloc(sizeof(float) * r->bufSize, &m->pool);
1246− r->outBuffers = (float**) mpool_alloc(sizeof(float*) * r->numVoices, &m->pool);
1245+ r->inBuffer = (float*) mpool_alloc(sizeof(float) * r->bufSize, m);
1246+ r->outBuffers = (float**) mpool_alloc(sizeof(float*) * r->numVoices, m);
12471247
12481248 r->hopSize = DEFHOPSIZE;
12491249 r->windowSize = DEFWINDOWSIZE;
12501250 r->fba = FBA;
12511251 tAutotune_setTimeConstant(rt, DEFTIMECONSTANT);
12521252
1253− r->ps = (tPitchShift*) mpool_alloc(sizeof(tPitchShift) * r->numVoices, &m->pool);
1254− r->freq = (float*) mpool_alloc(sizeof(float) * r->numVoices, &m->pool);
1255− r->tickOutput = (float*) mpool_alloc(sizeof(float) * r->numVoices, &m->pool);
1253+ r->ps = (tPitchShift*) mpool_alloc(sizeof(tPitchShift) * r->numVoices, m);
1254+ r->freq = (float*) mpool_alloc(sizeof(float) * r->numVoices, m);
1255+ r->tickOutput = (float*) mpool_alloc(sizeof(float) * r->numVoices, m);
12561256 for (int i = 0; i < r->numVoices; ++i)
12571257 {
1258− r->outBuffers[i] = (float*) mpool_alloc(sizeof(float) * r->bufSize, &m->pool);
1258+ r->outBuffers[i] = (float*) mpool_alloc(sizeof(float) * r->bufSize, m);
12591259 }
12601260
12611261 tPeriodDetection_initToPool(&r->pd, r->inBuffer, r->outBuffers[0], r->bufSize, r->frameSize, mp);
@@ -1277,14 +1277,14 @@ void tAutotune_freeFromPool (tAutotune* const rt, tMempool* const mp) · 15 unmodified lines
12771277 for (int i = 0; i < r->numVoices; ++i)
12781278 {
12791279 tPitchShift_freeFromPool(&r->ps[i], mp);
1280− mpool_free(r->outBuffers[i], &m->pool);
1280+ mpool_free(r->outBuffers[i], m);
12811281 }
1282− mpool_free(r->tickOutput, &m->pool);
1283− mpool_free(r->freq, &m->pool);
1284− mpool_free(r->ps, &m->pool);
1285− mpool_free(r->inBuffer, &m->pool);
1286− mpool_free(r->outBuffers, &m->pool);
1287− mpool_free(r, &m->pool);
1282+ mpool_free(r->tickOutput, m);
1283+ mpool_free(r->freq, m);
1284+ mpool_free(r->ps, m);
1285+ mpool_free(r->inBuffer, m);
1286+ mpool_free(r->outBuffers, m);
1287+ mpool_free(r, m);
12881288 }
12891289
12901290 float* tAutotune_tick(tAutotune* const rt, float sample)
@@ -1453,19 +1453,19 @@ void tFormantShifter_free(tFormantShifter* const fsr) · 162 unmodified lines
14531453 void tFormantShifter_initToPool (tFormantShifter* const fsr, int order, tMempool* const mp)
14541454 {
14551455 _tMempool* m = *mp;
1456− _tFormantShifter* fs = *fsr = (_tFormantShifter*) mpool_alloc(sizeof(_tFormantShifter), &m->pool);
1456+ _tFormantShifter* fs = *fsr = (_tFormantShifter*) mpool_alloc(sizeof(_tFormantShifter), m);
14571457
14581458 fs->ford = order;
1459− fs->fk = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1460− fs->fb = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1461− fs->fc = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1462− fs->frb = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1463− fs->frc = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1464− fs->fsig = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1465− fs->fsmooth = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1466− fs->ftvec = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);
1459+ fs->fk = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1460+ fs->fb = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1461+ fs->fc = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1462+ fs->frb = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1463+ fs->frc = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1464+ fs->fsig = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1465+ fs->fsmooth = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1466+ fs->ftvec = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
14671467
1468− fs->fbuff = (float*) mpool_calloc(sizeof(float*) * fs->ford, &m->pool);
1468+ fs->fbuff = (float*) mpool_calloc(sizeof(float*) * fs->ford, m);
14691469
14701470
14711471 fs->falph = powf(0.001f, 10.0f * leaf.invSampleRate);
@@ -1489,20 +1489,20 @@ void tFormantShifter_freeFromPool (tFormantShifter* const fsr, tMempool* c · 17 unmodified lines
14891489 _tMempool* m = *mp;
14901490 _tFormantShifter* fs = *fsr;
14911491
1492− mpool_free(fs->fk, &m->pool);
1493− mpool_free(fs->fb, &m->pool);
1494− mpool_free(fs->fc, &m->pool);
1495− mpool_free(fs->frb, &m->pool);
1496− mpool_free(fs->frc, &m->pool);
1497− mpool_free(fs->fsig, &m->pool);
1498− mpool_free(fs->fsmooth, &m->pool);
1499− mpool_free(fs->ftvec, &m->pool);
1500− mpool_free(fs->fbuff, &m->pool);
1492+ mpool_free(fs->fk, m);
1493+ mpool_free(fs->fb, m);
1494+ mpool_free(fs->fc, m);
1495+ mpool_free(fs->frb, m);
1496+ mpool_free(fs->frc, m);
1497+ mpool_free(fs->fsig, m);
1498+ mpool_free(fs->fsmooth, m);
1499+ mpool_free(fs->ftvec, m);
1500+ mpool_free(fs->fbuff, m);
15011501 tHighpass_freeFromPool(&fs->hp, mp);
15021502 tHighpass_freeFromPool(&fs->hp2, mp);
15031503 tFeedbackLeveler_freeFromPool(&fs->fbl1, mp);
15041504 tFeedbackLeveler_freeFromPool(&fs->fbl2, mp);
1505− mpool_free(fs, &m->pool);
1505+ mpool_free(fs, m);
15061506 }
15071507
15081508 float tFormantShifter_tick(tFormantShifter* const fsr, float in)
LEAF/Src/leaf-electrical.c+2−2
@@ -181,7 +181,7 @@ void tWDF_free(tWDF* const wdf) · 180 unmodified lines
181181 void tWDF_initToPool (tWDF* const wdf, WDFComponentType type, float value, tWDF* const rL, tWDF* const rR, tMempool* const mp)
182182 {
183183 _tMempool* m = *mp;
184− *wdf = (_tWDF*) mpool_alloc(sizeof(_tWDF), &m->pool);
184+ *wdf = (_tWDF*) mpool_alloc(sizeof(_tWDF), m);
185185
186186 wdf_init(wdf, type, value, rL, rR);
187187 }
@@ -191,7 +191,7 @@ void tWDF_freeFromPool (tWDF* const wdf, tMempool* const mp) · 3 unmodified lines
191191 _tMempool* m = *mp;
192192 _tWDF* r = *wdf;
193193
194− mpool_free(r, &m->pool);
194+ mpool_free(r, m);
195195 }
196196
197197 float tWDF_tick(tWDF* const wdf, float sample, tWDF* const outputPoint, uint8_t paramsChanged)
LEAF/Src/leaf-envelopes.c+78−20
@@ -28,9 +28,9 @@ void tEnvelope_init(tEnvelope* const envlp, float attack, float decay, oBool · 27 unmodified lines
2828 {
2929 _tEnvelope* env = *envlp = (_tEnvelope*) leaf_alloc(sizeof(_tEnvelope));
3030
31− env->exp_buff = exp_decay;
32− env->inc_buff = attack_decay_inc;
33− env->buff_size = sizeof(exp_decay);
31+ env->exp_buff = __leaf_table_exp_decay;
32+ env->inc_buff = __leaf_table_attack_decay_inc;
33+ env->buff_size = sizeof(__leaf_table_exp_decay);
3434
3535 env->loop = loop;
3636
@@ -73,11 +73,11 @@ void tEnvelope_free(tEnvelope* const envlp) · 36 unmodified lines
7373 void tEnvelope_initToPool (tEnvelope* const envlp, float attack, float decay, oBool loop, tMempool* const mp)
7474 {
7575 _tMempool* m = *mp;
76− _tEnvelope* env = *envlp = (_tEnvelope*) mpool_alloc(sizeof(_tEnvelope), &m->pool);
76+ _tEnvelope* env = *envlp = (_tEnvelope*) mpool_alloc(sizeof(_tEnvelope), m);
7777
78− env->exp_buff = exp_decay;
79− env->inc_buff = attack_decay_inc;
80− env->buff_size = sizeof(exp_decay);
78+ env->exp_buff = __leaf_table_exp_decay;
79+ env->inc_buff = __leaf_table_attack_decay_inc;
80+ env->buff_size = sizeof(__leaf_table_exp_decay);
8181
8282 env->loop = loop;
8383
@@ -115,7 +115,7 @@ void tEnvelope_freeFromPool (tEnvelope* const envlp, tMempool* const mp) · 31 unmodified lines
115115 {
116116 _tMempool* m = *mp;
117117 _tEnvelope* env = *envlp;
118− mpool_free(env, &m->pool);
118+ mpool_free(env, m);
119119 }
120120
121121 void tEnvelope_setAttack(tEnvelope* const envlp, float attack)
@@ -258,9 +258,9 @@ void tADSR_init(tADSR* const adsrenv, float attack, float decay, float sustai · 136 unmodified lines
258258 {
259259 _tADSR* adsr = *adsrenv = (_tADSR*) leaf_alloc(sizeof(_tADSR));
260260
261− adsr->exp_buff = exp_decay;
262− adsr->inc_buff = attack_decay_inc;
263− adsr->buff_size = sizeof(exp_decay);
261+ adsr->exp_buff = __leaf_table_exp_decay;
262+ adsr->inc_buff = __leaf_table_attack_decay_inc;
263+ adsr->buff_size = sizeof(__leaf_table_exp_decay);
264264
265265 if (attack > 8192.0f)
266266 attack = 8192.0f;
@@ -323,11 +323,11 @@ void tADSR_free(tADSR* const adsrenv) · 56 unmodified lines
323323 void tADSR_initToPool (tADSR* const adsrenv, float attack, float decay, float sustain, float release, tMempool* const mp)
324324 {
325325 _tMempool* m = *mp;
326− _tADSR* adsr = *adsrenv = (_tADSR*) mpool_alloc(sizeof(_tADSR), &m->pool);
326+ _tADSR* adsr = *adsrenv = (_tADSR*) mpool_alloc(sizeof(_tADSR), m);
327327
328− adsr->exp_buff = exp_decay;
329− adsr->inc_buff = attack_decay_inc;
330− adsr->buff_size = sizeof(exp_decay);
328+ adsr->exp_buff = __leaf_table_exp_decay;
329+ adsr->inc_buff = __leaf_table_attack_decay_inc;
330+ adsr->buff_size = sizeof(__leaf_table_exp_decay);
331331
332332 if (attack > 8192.0f)
333333 attack = 8192.0f;
@@ -383,7 +383,7 @@ void tADSR_freeFromPool (tADSR* const adsrenv, tMempool* const mp) · 49 unmodified lines
383383 {
384384 _tMempool* m = *mp;
385385 _tADSR* adsr = *adsrenv;
386− mpool_free(adsr, &m->pool);
386+ mpool_free(adsr, m);
387387 }
388388
389389 void tADSR_setAttack(tADSR* const adsrenv, float attack)
@@ -614,7 +614,7 @@ void tRamp_free(tRamp* const r) · 224 unmodified lines
614614 void tRamp_initToPool (tRamp* const r, float time, int samples_per_tick, tMempool* const mp)
615615 {
616616 _tMempool* m = *mp;
617− _tRamp* ramp = *r = (_tRamp*) mpool_alloc(sizeof(_tRamp), &m->pool);
617+ _tRamp* ramp = *r = (_tRamp*) mpool_alloc(sizeof(_tRamp), m);
618618
619619 ramp->inv_sr_ms = 1.0f/(leaf.sampleRate*0.001f);
620620 ramp->minimum_time = ramp->inv_sr_ms * samples_per_tick;
@@ -639,7 +639,7 @@ void tRamp_freeFromPool (tRamp* const r, tMempool* const mp) · 18 unmodified lines
639639 _tMempool* m = *mp;
640640 _tRamp* ramp = *r;
641641
642− mpool_free(ramp, &m->pool);
642+ mpool_free(ramp, m);
643643 }
644644
645645 void tRamp_setTime(tRamp* const ramp, float time)
@@ -723,7 +723,7 @@ void tExpSmooth_free(tExpSmooth* const expsmooth) · 77 unmodified lines
723723 void tExpSmooth_initToPool (tExpSmooth* const expsmooth, float val, float factor, tMempool* const mp)
724724 {
725725 _tMempool* m = *mp;
726− _tExpSmooth* smooth = *expsmooth = (_tExpSmooth*) mpool_alloc(sizeof(_tExpSmooth), &m->pool);
726+ _tExpSmooth* smooth = *expsmooth = (_tExpSmooth*) mpool_alloc(sizeof(_tExpSmooth), m);
727727
728728 smooth->curr=val;
729729 smooth->dest=val;
@@ -738,7 +738,7 @@ void tExpSmooth_freeFromPool (tExpSmooth* const expsmooth, tMempool* const mp · 8 unmodified lines
738738 _tMempool* m = *mp;
739739 _tExpSmooth* smooth = *expsmooth;
740740
741− mpool_free(smooth, &m->pool);
741+ mpool_free(smooth, m);
742742 }
743743
744744 void tExpSmooth_setFactor(tExpSmooth* const expsmooth, float factor)
@@ -778,3 +778,61 @@ float tExpSmooth_sample(tExpSmooth* const expsmooth) · 33 unmodified lines
778778 return smooth->curr;
779779 }
780780
781+//tSlide is based on the max/msp slide~ object
782+////
783+
784+void tSlide_init (tSlide* const sl, float upSlide, float downSlide)
785+{
786+ tSlide_initToPool (sl, upSlide, downSlide, &leaf.mempool);
787+}
788+void tSlide_free (tSlide* const sl)
789+{
790+ tSlide_freeFromPool (sl, &leaf.mempool);
791+}
792+void tSlide_initToPool (tSlide* const sl, float upSlide, float downSlide, tMempool* const mp)
793+{
794+ _tMempool* m = *mp;
795+ _tSlide* s = *sl = (_tSlide*) mpool_alloc(sizeof(_tSlide), m);
796+ s->prevIn = 0.0f;
797+ s->currentOut = 0.0f;
798+ s->prevOut = 0.0f;
799+ if (upSlide < 1.0f)
800+ {
801+ upSlide = 1.0f;
802+ }
803+
804+ if (downSlide < 1.0f)
805+ {
806+ downSlide = 1.0f;
807+ }
808+ s->invUpSlide = 1.0f / upSlide;
809+ s->invDownSlide = 1.0f / downSlide;
810+}
811+
812+void tSlide_freeFromPool (tSlide* const sl, tMempool* const mp)
813+{
814+ _tMempool* m = *mp;
815+ _tSlide* s = *sl;
816+
817+ mpool_free(s, m);
818+}
819+
820+float tSlide_tick(tSlide* const sl, float in)
821+{
822+ _tSlide* s = *sl;
823+
824+
825+ if (in >= s->prevOut)
826+ {
827+ s->currentOut = s->prevOut + ((in - s->prevOut) * s->invUpSlide);
828+ }
829+ else
830+ {
831+ s->currentOut = s->prevOut + ((in - s->prevOut) * s->invDownSlide);
832+ }
833+ if (s->currentOut < VSF) s->currentOut = 0.0f;
834+ s->prevIn = in;
835+ s->prevOut = s->currentOut;
836+ return s->currentOut;
837+}
838+
LEAF/Src/leaf-filters.c+112−29
@@ -43,7 +43,7 @@ void tAllpass_free(tAllpass* const ft) · 42 unmodified lines
4343 void tAllpass_initToPool (tAllpass* const ft, float initDelay, uint32_t maxDelay, tMempool* const mp)
4444 {
4545 _tMempool* m = *mp;
46− _tAllpass* f = *ft = (_tAllpass*) mpool_alloc(sizeof(_tAllpass), &m->pool);
46+ _tAllpass* f = *ft = (_tAllpass*) mpool_alloc(sizeof(_tAllpass), m);
4747
4848 f->gain = 0.7f;
4949
@@ -58,7 +58,7 @@ void tAllpass_freeFromPool (tAllpass* const ft, tMempool* const mp) · 8 unmodified lines
5858 _tAllpass* f = *ft;
5959
6060 tLinearDelay_freeFromPool(&f->delay, mp);
61− mpool_free(f, &m->pool);
61+ mpool_free(f, m);
6262 }
6363
6464 void tAllpass_setDelay(tAllpass* const ft, float delay)
@@ -112,7 +112,7 @@ void tOnePole_free(tOnePole* const ft) · 47 unmodified lines
112112 void tOnePole_initToPool (tOnePole* const ft, float freq, tMempool* const mp)
113113 {
114114 _tMempool* m = *mp;
115− _tOnePole* f = *ft = (_tOnePole*) mpool_alloc(sizeof(_tOnePole), &m->pool);
115+ _tOnePole* f = *ft = (_tOnePole*) mpool_alloc(sizeof(_tOnePole), m);
116116
117117 f->gain = 1.0f;
118118 f->a0 = 1.0;
@@ -128,7 +128,7 @@ void tOnePole_freeFromPool (tOnePole* const ft, tMempool* const mp) · 9 unmodified lines
128128 _tMempool* m = *mp;
129129 _tOnePole* f = *ft;
130130
131− mpool_free(f, &m->pool);
131+ mpool_free(f, m);
132132 }
133133
134134 void tOnePole_setB0(tOnePole* const ft, float b0)
@@ -215,7 +215,7 @@ void tTwoPole_free(tTwoPole* const ft) · 80 unmodified lines
215215 void tTwoPole_initToPool (tTwoPole* const ft, tMempool* const mp)
216216 {
217217 _tMempool* m = *mp;
218− _tTwoPole* f = *ft = (_tTwoPole*) mpool_alloc(sizeof(_tTwoPole), &m->pool);
218+ _tTwoPole* f = *ft = (_tTwoPole*) mpool_alloc(sizeof(_tTwoPole), m);
219219
220220 f->gain = 1.0f;
221221 f->a0 = 1.0;
@@ -230,7 +230,7 @@ void tTwoPole_freeFromPool (tTwoPole* const ft, tMempool* const mp) · 8 unmodified lines
230230 _tMempool* m = *mp;
231231 _tTwoPole* f = *ft;
232232
233− mpool_free(f, &m->pool);
233+ mpool_free(f, m);
234234 }
235235
236236 float tTwoPole_tick(tTwoPole* const ft, float input)
@@ -341,7 +341,7 @@ void tOneZero_free(tOneZero* const ft) · 104 unmodified lines
341341 void tOneZero_initToPool (tOneZero* const ft, float theZero, tMempool* const mp)
342342 {
343343 _tMempool* m = *mp;
344− _tOneZero* f = *ft = (_tOneZero*) mpool_alloc(sizeof(_tOneZero), &m->pool);
344+ _tOneZero* f = *ft = (_tOneZero*) mpool_alloc(sizeof(_tOneZero), m);
345345
346346 f->gain = 1.0f;
347347 f->lastIn = 0.0f;
@@ -354,7 +354,7 @@ void tOneZero_freeFromPool (tOneZero* const ft, tMempool* const mp) · 6 unmodified lines
354354 _tMempool* m = *mp;
355355 _tOneZero* f = *ft;
356356
357− mpool_free(f, &m->pool);
357+ mpool_free(f, m);
358358 }
359359
360360 float tOneZero_tick(tOneZero* const ft, float input)
@@ -456,7 +456,7 @@ void tTwoZero_free(tTwoZero* const ft) · 95 unmodified lines
456456 void tTwoZero_initToPool (tTwoZero* const ft, tMempool* const mp)
457457 {
458458 _tMempool* m = *mp;
459− _tTwoZero* f = *ft = (_tTwoZero*) mpool_alloc(sizeof(_tTwoZero), &m->pool);
459+ _tTwoZero* f = *ft = (_tTwoZero*) mpool_alloc(sizeof(_tTwoZero), m);
460460
461461 f->gain = 1.0f;
462462 f->lastIn[0] = 0.0f;
@@ -468,7 +468,7 @@ void tTwoZero_freeFromPool (tTwoZero* const ft, tMempool* const mp) · 5 unmodified lines
468468 _tMempool* m = *mp;
469469 _tTwoZero* f = *ft;
470470
471− mpool_free(f, &m->pool);
471+ mpool_free(f, m);
472472 }
473473
474474 float tTwoZero_tick(tTwoZero* const ft, float input)
@@ -564,7 +564,7 @@ void tPoleZero_free(tPoleZero* const pzf) · 89 unmodified lines
564564 void tPoleZero_initToPool (tPoleZero* const pzf, tMempool* const mp)
565565 {
566566 _tMempool* m = *mp;
567− _tPoleZero* f = *pzf = (_tPoleZero*) mpool_alloc(sizeof(_tPoleZero), &m->pool);
567+ _tPoleZero* f = *pzf = (_tPoleZero*) mpool_alloc(sizeof(_tPoleZero), m);
568568
569569 f->gain = 1.0f;
570570 f->b0 = 1.0;
@@ -579,7 +579,7 @@ void tPoleZero_freeFromPool (tPoleZero* const pzf, tMempool* const mp) · 8 unmodified lines
579579 _tMempool* m = *mp;
580580 _tPoleZero* f = *pzf;
581581
582− mpool_free(f, &m->pool);
582+ mpool_free(f, m);
583583 }
584584
585585 void tPoleZero_setB0(tPoleZero* const pzf, float b0)
@@ -695,7 +695,7 @@ void tBiQuad_free(tBiQuad* const ft) · 109 unmodified lines
695695 void tBiQuad_initToPool (tBiQuad* const ft, tMempool* const mp)
696696 {
697697 _tMempool* m = *mp;
698− _tBiQuad* f = *ft = (_tBiQuad*) mpool_alloc(sizeof(_tBiQuad), &m->pool);
698+ _tBiQuad* f = *ft = (_tBiQuad*) mpool_alloc(sizeof(_tBiQuad), m);
699699
700700 f->gain = 1.0f;
701701
@@ -713,7 +713,7 @@ void tBiQuad_freeFromPool (tBiQuad* const ft, tMempool* const mp) · 11 unmodified lines
713713 _tMempool* m = *mp;
714714 _tBiQuad* f = *ft;
715715
716− mpool_free(f, &m->pool);
716+ mpool_free(f, m);
717717 }
718718
719719 float tBiQuad_tick(tBiQuad* const ft, float input)
@@ -867,7 +867,7 @@ void tSVF_free(tSVF* const svff) · 147 unmodified lines
867867 void tSVF_initToPool (tSVF* const svff, SVFType type, float freq, float Q, tMempool* const mp)
868868 {
869869 _tMempool* m = *mp;
870− _tSVF* svf = *svff = (_tSVF*) mpool_alloc(sizeof(_tSVF), &m->pool);
870+ _tSVF* svf = *svff = (_tSVF*) mpool_alloc(sizeof(_tSVF), m);
871871
872872 svf->type = type;
873873
@@ -886,7 +886,7 @@ void tSVF_freeFromPool (tSVF* const svff, tMempool* const mp) · 12 unmodified lines
886886 _tMempool* m = *mp;
887887 _tSVF* svf = *svff;
888888
889− mpool_free(svf, &m->pool);
889+ mpool_free(svf, m);
890890 }
891891
892892 float tSVF_tick(tSVF* const svff, float v0)
@@ -939,7 +939,7 @@ void tEfficientSVF_init(tEfficientSVF* const svff, SVFType type, uint16_t inpu · 46 unmodified lines
939939 svf->ic1eq = 0;
940940 svf->ic2eq = 0;
941941
942− svf->g = filtertan[input];
942+ svf->g = __leaf_table_filtertan[input];
943943 svf->k = 1.0f/Q;
944944 svf->a1 = 1.0f/(1.0f+svf->g*(svf->g+svf->k));
945945 svf->a2 = svf->g*svf->a1;
@@ -956,14 +956,14 @@ void tEfficientSVF_free(tEfficientSVF* const svff) · 10 unmodified lines
956956 void tEfficientSVF_initToPool (tEfficientSVF* const svff, SVFType type, uint16_t input, float Q, tMempool* const mp)
957957 {
958958 _tMempool* m = *mp;
959− _tEfficientSVF* svf = *svff = (_tEfficientSVF*) mpool_alloc(sizeof(_tEfficientSVF), &m->pool);
959+ _tEfficientSVF* svf = *svff = (_tEfficientSVF*) mpool_alloc(sizeof(_tEfficientSVF), m);
960960
961961 svf->type = type;
962962
963963 svf->ic1eq = 0;
964964 svf->ic2eq = 0;
965965
966− svf->g = filtertan[input];
966+ svf->g = __leaf_table_filtertan[input];
967967 svf->k = 1.0f/Q;
968968 svf->a1 = 1.0f/(1.0f+svf->g*(svf->g+svf->k));
969969 svf->a2 = svf->g*svf->a1;
@@ -975,7 +975,7 @@ void tEfficientSVF_freeFromPool (tEfficientSVF* const svff, tMempool* const · 5 unmodified lines
975975 _tMempool* m = *mp;
976976 _tEfficientSVF* svf = *svff;
977977
978− mpool_free(svf, &m->pool);
978+ mpool_free(svf, m);
979979 }
980980
981981 float tEfficientSVF_tick(tEfficientSVF* const svff, float v0)
@@ -1002,7 +1002,7 @@ void tEfficientSVF_setFreq(tEfficientSVF* const svff, uint16_t input) · 20 unmodified lines
10021002 {
10031003 _tEfficientSVF* svf = *svff;
10041004
1005− svf->g = filtertan[input];
1005+ svf->g = __leaf_table_filtertan[input];
10061006 svf->a1 = 1.0f/(1.0f + svf->g * (svf->g + svf->k));
10071007 svf->a2 = svf->g * svf->a1;
10081008 svf->a3 = svf->g * svf->a2;
@@ -1040,7 +1040,7 @@ void tHighpass_free(tHighpass* const ft) · 31 unmodified lines
10401040 void tHighpass_initToPool (tHighpass* const ft, float freq, tMempool* const mp)
10411041 {
10421042 _tMempool* m = *mp;
1043− _tHighpass* f = *ft = (_tHighpass*) mpool_calloc(sizeof(_tHighpass), &m->pool);
1043+ _tHighpass* f = *ft = (_tHighpass*) mpool_calloc(sizeof(_tHighpass), m);
10441044
10451045 f->R = (1.0f - (freq * leaf.twoPiTimesInvSampleRate));
10461046 f->ys = 0.0f;
@@ -1054,7 +1054,7 @@ void tHighpass_freeFromPool (tHighpass* const ft, tMempool* const mp) · 7 unmodified lines
10541054 _tMempool* m = *mp;
10551055 _tHighpass* f = *ft;
10561056
1057− mpool_free(f, &m->pool);
1057+ mpool_free(f, m);
10581058 }
10591059
10601060 void tHighpass_setFreq(tHighpass* const ft, float freq)
@@ -1121,7 +1121,7 @@ void tButterworth_free(tButterworth* const ft) · 60 unmodified lines
11211121 void tButterworth_initToPool (tButterworth* const ft, int N, float f1, float f2, tMempool* const mp)
11221122 {
11231123 _tMempool* m = *mp;
1124− _tButterworth* f = *ft = (_tButterworth*) mpool_alloc(sizeof(_tButterworth), &m->pool);
1124+ _tButterworth* f = *ft = (_tButterworth*) mpool_alloc(sizeof(_tButterworth), m);
11251125
11261126 f->f1 = f1;
11271127 f->f2 = f2;
@@ -1149,7 +1149,7 @@ void tButterworth_freeFromPool (tButterworth* const ft, tMempool* const mp) · 21 unmodified lines
11491149 tSVF_freeFromPool(&f->high[i], mp);
11501150 }
11511151
1152− mpool_free(f, &m->pool);
1152+ mpool_free(f, m);
11531153 }
11541154
11551155 float tButterworth_tick(tButterworth* const ft, float samp)
@@ -1214,11 +1214,11 @@ void tFIR_free(tFIR* const firf) · 58 unmodified lines
12141214 void tFIR_initToPool (tFIR* const firf, float* coeffs, int numTaps, tMempool* const mp)
12151215 {
12161216 _tMempool* m = *mp;
1217− _tFIR* fir = *firf = (_tFIR*) mpool_alloc(sizeof(_tFIR), &m->pool);
1217+ _tFIR* fir = *firf = (_tFIR*) mpool_alloc(sizeof(_tFIR), m);
12181218
12191219 fir->numTaps = numTaps;
12201220 fir->coeff = coeffs;
1221− fir->past = (float*) mpool_alloc(sizeof(float) * fir->numTaps, &m->pool);
1221+ fir->past = (float*) mpool_alloc(sizeof(float) * fir->numTaps, m);
12221222 for (int i = 0; i < fir->numTaps; ++i) fir->past[i] = 0.0f;
12231223 }
12241224
@@ -1227,8 +1227,8 @@ void tFIR_freeFromPool (tFIR* const firf, tMempool* const mp) · 2 unmodified lines
12271227 _tMempool* m = *mp;
12281228 _tFIR* fir = *firf;
12291229
1230− mpool_free(fir->past, &m->pool);
1231− mpool_free(fir, &m->pool);
1230+ mpool_free(fir->past, m);
1231+ mpool_free(fir, m);
12321232 }
12331233
12341234 float tFIR_tick(tFIR* const firf, float input)
@@ -1241,3 +1241,86 @@ float tFIR_tick(tFIR* const firf, float input) · 6 unmodified lines
12411241 for (int i = fir->numTaps-1; i > 0; --i) fir->past[i] = fir->past[i-1];
12421242 return y;
12431243 }
1244+
1245+//---------------------------------------------
1246+////
1247+/// Median filter implemented based on James McCartney's median filter in Supercollider,
1248+/// translated from a Gen~ port of the Supercollider code that I believe was made by Rodrigo Costanzo and which I got from PA Tremblay - JS
1249+
1250+
1251+void tMedianFilter_init (tMedianFilter* const f, int size)
1252+{
1253+ tMedianFilter_initToPool(f, size, &leaf.mempool);
1254+}
1255+void tMedianFilter_free (tMedianFilter* const f)
1256+{
1257+ tMedianFilter_freeFromPool(f, &leaf.mempool);
1258+}
1259+void tMedianFilter_initToPool (tMedianFilter* const mf, int size, tMempool* const mp)
1260+{
1261+ _tMempool* m = *mp;
1262+ _tMedianFilter* f = *mf = (_tMedianFilter*) mpool_alloc(sizeof(_tMedianFilter), m);
1263+
1264+ f->size = size;
1265+ f->middlePosition = size / 2;
1266+ f->last = size - 1;
1267+ f->pos = -1;
1268+ f->val = (float*) mpool_alloc(sizeof(float) * size, m);
1269+ f->age = (int*) mpool_alloc(sizeof(int) * size, m);
1270+ for (int i = 0; i < f->size; ++i)
1271+ {
1272+ f->val[i] = 0.0f;
1273+ f->age[i] = i;
1274+ }
1275+
1276+}
1277+void tMedianFilter_freeFromPool (tMedianFilter* const mf, tMempool* const mp)
1278+{
1279+ _tMempool* m = *mp;
1280+ _tMedianFilter* f = *mf;
1281+
1282+ mpool_free(f->val, m);
1283+ mpool_free(f->age, m);
1284+ mpool_free(f, m);
1285+}
1286+
1287+float tMedianFilter_tick (tMedianFilter* const mf, float input)
1288+{
1289+ _tMedianFilter* f = *mf;
1290+
1291+ for(int i=0; i<f->size; i++) {
1292+ int thisAge = f->age[i];
1293+ if(thisAge == f->last) {
1294+ f->pos = i;
1295+ }
1296+ else {
1297+ thisAge++;
1298+ f->age[i] = thisAge;
1299+ }
1300+ }
1301+
1302+ while( f->pos!=0 ) {
1303+ float test = f->val[f->pos-1];
1304+ if(input < test) {
1305+ f->val[f->pos]=test;
1306+ f->age[f->pos]=f->age[f->pos-1];
1307+ f->pos -= 1;
1308+ } else {break;}
1309+ }
1310+
1311+ while(f->pos != f->last) {
1312+ float test = f->val[f->pos+1];
1313+ if( input > test) {
1314+ f->val[f->pos] = test;
1315+ f->age[f->pos] = f->age[f->pos+1];
1316+ f->pos += 1;
1317+ } else {break;}
1318+ }
1319+
1320+ f->val[f->pos] = input;
1321+ f->age[f->pos] = 0;
1322+
1323+ return f->val[f->middlePosition];
1324+}
1325+
1326+
LEAF/Src/leaf-instruments.c+8−8
@@ -66,7 +66,7 @@ void t808Cowebell_free(t808Cowbell* const cowbellInst) · 65 unmodified lines
6666 void t808Cowbell_initToPool (t808Cowbell* const cowbellInst, int useStick, tMempool* const mp)
6767 {
6868 _tMempool* m = *mp;
69− _t808Cowbell* cowbell = *cowbellInst = (_t808Cowbell*) mpool_alloc(sizeof(_t808Cowbell), &m->pool);
69+ _t808Cowbell* cowbell = *cowbellInst = (_t808Cowbell*) mpool_alloc(sizeof(_t808Cowbell), m);
7070
7171 tSquare_initToPool(&cowbell->p[0], mp);
7272 tSquare_setFreq(&cowbell->p[0], 540.0f);
@@ -107,7 +107,7 @@ void t808Cowbell_freeFromPool (t808Cowbell* const cowbellInst, tMempoo · 34 unmodified lines
107107 tHighpass_freeFromPool(&cowbell->highpass, mp);
108108 tNoise_freeFromPool(&cowbell->stick, mp);
109109 tEnvelope_freeFromPool(&cowbell->envStick, mp);
110− mpool_free(cowbell, &m->pool);
110+ mpool_free(cowbell, m);
111111 }
112112
113113 void t808Cowbell_on(t808Cowbell* const cowbellInst, float vel)
@@ -242,7 +242,7 @@ void t808Hihat_free(t808Hihat* const hihatInst) · 128 unmodified lines
242242 void t808Hihat_initToPool (t808Hihat* const hihatInst, tMempool* const mp)
243243 {
244244 _tMempool* m = *mp;
245− _t808Hihat* hihat = *hihatInst = (_t808Hihat*) mpool_alloc(sizeof(_t808Hihat), &m->pool);
245+ _t808Hihat* hihat = *hihatInst = (_t808Hihat*) mpool_alloc(sizeof(_t808Hihat), m);
246246
247247 for (int i = 0; i < 6; i++)
248248 {
@@ -294,7 +294,7 @@ void t808Hihat_freeFromPool (t808Hihat* const hihatInst, tMempool* const mp) · 45 unmodified lines
294294
295295 tHighpass_freeFromPool(&hihat->highpass, mp);
296296
297− mpool_free(hihat, &m->pool);
297+ mpool_free(hihat, m);
298298 }
299299
300300 void t808Hihat_on(t808Hihat* const hihatInst, float vel)
@@ -454,7 +454,7 @@ void t808Snare_free (t808Snare* const snareInst) · 153 unmodified lines
454454 void t808Snare_initToPool (t808Snare* const snareInst, tMempool* const mp)
455455 {
456456 _tMempool* m = *mp;
457− _t808Snare* snare = *snareInst = (_t808Snare*) mpool_alloc(sizeof(_t808Snare), &m->pool);
457+ _t808Snare* snare = *snareInst = (_t808Snare*) mpool_alloc(sizeof(_t808Snare), m);
458458
459459 float ratio[2] = {1.0, 1.5};
460460 for (int i = 0; i < 2; i++)
@@ -499,7 +499,7 @@ void t808Snare_freeFromPool (t808Snare* const snareInst, tMempool* const mp) · 38 unmodified lines
499499 tEnvelope_freeFromPool(&snare->noiseEnvGain, mp);
500500 tEnvelope_freeFromPool(&snare->noiseEnvFilter, mp);
501501
502− mpool_free(snare, &m->pool);
502+ mpool_free(snare, m);
503503 }
504504
505505 void t808Snare_on(t808Snare* const snareInst, float vel)
@@ -629,7 +629,7 @@ void t808Kick_free (t808Kick* const kickInst) · 123 unmodified lines
629629 void t808Kick_initToPool (t808Kick* const kickInst, tMempool* const mp)
630630 {
631631 _tMempool* m = *mp;
632− _t808Kick* kick = *kickInst = (_t808Kick*) mpool_alloc(sizeof(_t808Kick), &m->pool);
632+ _t808Kick* kick = *kickInst = (_t808Kick*) mpool_alloc(sizeof(_t808Kick), m);
633633
634634 tCycle_initToPool(&kick->tone, mp);
635635 kick->toneInitialFreq = 40.0f;
@@ -658,7 +658,7 @@ void t808Kick_freeFromPool (t808Kick* const kickInst, tMempool* const mp) · 22 unmodified lines
658658 tNoise_freeFromPool(&kick->noiseOsc, mp);
659659 tEnvelope_freeFromPool(&kick->noiseEnvGain, mp);
660660
661− mpool_free(kick, &m->pool);
661+ mpool_free(kick, m);
662662 }
663663
664664 float t808Kick_tick (t808Kick* const kickInst)
LEAF/Src/leaf-math.c+38−6
@@ -18,11 +18,28 @@ · 17 unmodified lines
1818
1919 #endif
2020
21−// The C-embedded Audio Library.
22−#define TWO_TO_16 65536.f
2321
2422 #define EXPONENTIAL_TABLE_SIZE 65536
2523
24+#define log10f_fast(x) (log2f_approx(x)*0.3010299956639812f)
25+
26+// This is a fast approximation to log2() found on http://openaudio.blogspot.com/2017/02/faster-log10-and-pow.html credited to this post https://community.arm.com/developer/tools-software/tools/f/armds-forum/4292/cmsis-dsp-new-functionality-proposal/22621#22621
27+// Y = C[0]*F*F*F + C[1]*F*F + C[2]*F + C[3] + E;
28+float log2f_approx(float X) {
29+ float Y, F;
30+ int E;
31+ F = frexpf(fabsf(X), &E);
32+ Y = 1.23149591368684f;
33+ Y *= F;
34+ Y += -4.11852516267426f;
35+ Y *= F;
36+ Y += 6.02197014179219f;
37+ Y *= F;
38+ Y += -3.13396450166353f;
39+ Y += E;
40+ return(Y);
41+}
42+
2643 float interpolate3max(float *buf, const int peakindex)
2744 {
2845 float a = buf[peakindex-1];
@@ -190,11 +207,12 @@ float LEAF_round (float input, float rnd) · 161 unmodified lines
190207 return roundf(input * scale) / scale;
191208 }
192209
193−union unholy_t unholy;
210+
194211
195212 float LEAF_bitwise_xor(float input, uint32_t op)
196213 {
197− unholy.f = input;
214+ union unholy_t unholy;
215+ unholy.f = input;
198216 unholy.i = (unholy.i ^ op);
199217
200218 return unholy.f;
@@ -444,8 +462,8 @@ float powtodb(float f) · 243 unmodified lines
444462 if (f <= 0) return (0);
445463 else
446464 {
447− float val = 100 + 10.f/LOGTEN * logf(f);
448− return (val < 0 ? 0 : val);
465+ float val = 100.0f + 10.0f/LOGTEN * logf(f);
466+ return (val < 0.0f ? 0.0f : val);
449467 }
450468 }
451469
@@ -483,3 +501,17 @@ float dbtorms(float f) · 31 unmodified lines
483501 return (expf((LOGTEN * 0.05f) * (f-100.0f)));
484502 }
485503
504+
505+float atodb(float a)
506+{
507+ return 20.0f*log10f(a);
508+}
509+
510+float dbtoa(float db)
511+{
512+ return powf(10.0f, db * 0.05f);
513+ //return expf(0.115129254649702f * db); //faster version from http://openaudio.blogspot.com/2017/02/faster-log10-and-pow.html
514+}
515+
516+
517+
LEAF/Src/leaf-mempool.c+37−42
@@ -48,11 +48,6 @@ · 47 unmodified lines
4848
4949 #endif
5050
51−_tMempool leaf_pool;
52−tMempool leaf_mempool;
53−size_t header_size;
54−
55−
5651 /**
5752 * private function
5853 */
@@ -63,33 +58,33 @@ static inline void delink_node(mpool_node_t* node); · 4 unmodified lines
6358 /**
6459 * create memory pool
6560 */
66−void mpool_create (char* memory, size_t size, mpool_t* pool)
61+void mpool_create (char* memory, size_t size, _tMempool* pool)
6762 {
68− header_size = mpool_align(sizeof(mpool_node_t));
63+ leaf.header_size = mpool_align(sizeof(mpool_node_t));
6964
7065 pool->mpool = (void*)memory;
7166 pool->usize = 0;
7267 pool->msize = size;
7368
74− pool->head = create_node(pool->mpool, NULL, NULL, pool->msize-header_size);
69+ pool->head = create_node(pool->mpool, NULL, NULL, pool->msize-leaf.header_size);
7570
7671 for (int i = 0; i < pool->head->size; i++)
7772 {
78− memory[i+header_size]=0;
73+ memory[i+leaf.header_size]=0;
7974 }
8075 }
8176
8277 void leaf_pool_init(char* memory, size_t size)
8378 {
84− mpool_create(memory, size, &leaf_pool.pool);
79+ mpool_create(memory, size, &leaf._mempool);
8580
86− leaf_mempool = &leaf_pool;
81+ leaf.mempool = &leaf._mempool;
8782 }
8883
8984 /**
9085 * allocate memory from memory pool
9186 */
92−void* mpool_alloc(size_t asize, mpool_t* pool)
87+void* mpool_alloc(size_t asize, _tMempool* pool)
9388 {
9489 // If the head is NULL, the mempool is full
9590 if (pool->head == NULL) return NULL;
@@ -112,14 +107,14 @@ void* mpool_alloc(size_t asize, mpool_t* pool) · 16 unmodified lines
112107 mpool_node_t* new_node;
113108 size_t leftover = node_to_alloc->size - size_to_alloc;
114109 node_to_alloc->size = size_to_alloc;
115− if (leftover > header_size)
110+ if (leftover > leaf.header_size)
116111 {
117112 long offset = (char*) node_to_alloc - (char*) pool->mpool;
118− offset += header_size + node_to_alloc->size;
113+ offset += leaf.header_size + node_to_alloc->size;
119114 new_node = create_node(&pool->mpool[offset],
120115 node_to_alloc->next,
121116 node_to_alloc->prev,
122− leftover - header_size);
117+ leftover - leaf.header_size);
123118 }
124119 else
125120 {
@@ -139,7 +134,7 @@ void* mpool_alloc(size_t asize, mpool_t* pool) · 13 unmodified lines
139134 // Remove the allocated node from the free list
140135 delink_node(node_to_alloc);
141136
142− pool->usize += header_size + node_to_alloc->size;
137+ pool->usize += leaf.header_size + node_to_alloc->size;
143138
144139 if (leaf.clearOnAllocation > 0)
145140 {
@@ -155,7 +150,7 @@ void* mpool_alloc(size_t asize, mpool_t* pool) · 9 unmodified lines
155150 /**
156151 * allocate memory from memory pool and also clear that memory to be blank
157152 */
158−void* mpool_calloc(size_t asize, mpool_t* pool)
153+void* mpool_calloc(size_t asize, _tMempool* pool)
159154 {
160155 // If the head is NULL, the mempool is full
161156 if (pool->head == NULL) return NULL;
@@ -178,14 +173,14 @@ void* mpool_calloc(size_t asize, mpool_t* pool) · 16 unmodified lines
178173 mpool_node_t* new_node;
179174 size_t leftover = node_to_alloc->size - size_to_alloc;
180175 node_to_alloc->size = size_to_alloc;
181− if (leftover > header_size)
176+ if (leftover > leaf.header_size)
182177 {
183178 long offset = (char*) node_to_alloc - (char*) pool->mpool;
184− offset += header_size + node_to_alloc->size;
179+ offset += leaf.header_size + node_to_alloc->size;
185180 new_node = create_node(&pool->mpool[offset],
186181 node_to_alloc->next,
187182 node_to_alloc->prev,
188− leftover - header_size);
183+ leftover - leaf.header_size);
189184 }
190185 else
191186 {
@@ -205,7 +200,7 @@ void* mpool_calloc(size_t asize, mpool_t* pool) · 13 unmodified lines
205200 // Remove the allocated node from the free list
206201 delink_node(node_to_alloc);
207202
208− pool->usize += header_size + node_to_alloc->size;
203+ pool->usize += leaf.header_size + node_to_alloc->size;
209204 // Format the new pool
210205 char* new_pool = (char*)node_to_alloc->pool;
211206 for (int i = 0; i < node_to_alloc->size; i++) new_pool[i] = 0;
@@ -216,7 +211,7 @@ void* mpool_calloc(size_t asize, mpool_t* pool) · 4 unmodified lines
216211 void* leaf_alloc(size_t size)
217212 {
218213 //printf("alloc %i\n", size);
219− void* block = mpool_alloc(size, &leaf_pool.pool);
214+ void* block = mpool_alloc(size, &leaf._mempool);
220215
221216 if (block == NULL) leaf_mempool_overrun();
222217
@@ -226,7 +221,7 @@ void* leaf_alloc(size_t size) · 3 unmodified lines
226221 void* leaf_calloc(size_t size)
227222 {
228223 //printf("alloc %i\n", size);
229− void* block = mpool_calloc(size, &leaf_pool.pool);
224+ void* block = mpool_calloc(size, &leaf._mempool);
230225
231226 if (block == NULL) leaf_mempool_overrun();
232227
@@ -234,13 +229,13 @@ void* leaf_calloc(size_t size) · 1 unmodified line
234229 return block;
235230 }
236231
237−void mpool_free(void* ptr, mpool_t* pool)
232+void mpool_free(void* ptr, _tMempool* pool)
238233 {
239234 //if (ptr < pool->mpool || ptr >= pool->mpool + pool->msize)
240235 // Get the node at the freed space
241− mpool_node_t* freed_node = (mpool_node_t*) (ptr - header_size);
236+ mpool_node_t* freed_node = (mpool_node_t*) (ptr - leaf.header_size);
242237
243− pool->usize -= header_size + freed_node->size;
238+ pool->usize -= leaf.header_size + freed_node->size;
244239
245240 // Check each node in the list against the newly freed one to see if it's adjacent in memory
246241 mpool_node_t* other_node = pool->head;
@@ -249,10 +244,10 @@ void mpool_free(void* ptr, mpool_t* pool) · 2 unmodified lines
249244 {
250245 next_node = other_node->next;
251246 // Check if a node is directly after the freed node
252− if ((long) freed_node + (header_size + freed_node->size) == (long) other_node)
247+ if ((long) freed_node + (leaf.header_size + freed_node->size) == (long) other_node)
253248 {
254249 // Increase freed node's size
255− freed_node->size += header_size + other_node->size;
250+ freed_node->size += leaf.header_size + other_node->size;
256251 // If we are merging with the head, move the head forward
257252 if (other_node == pool->head) pool->head = pool->head->next;
258253 // Delink the merged node
@@ -260,10 +255,10 @@ void mpool_free(void* ptr, mpool_t* pool) · 1 unmodified line
260255 }
261256
262257 // Check if a node is directly before the freed node
263− else if ((long) other_node + (header_size + other_node->size) == (long) freed_node)
258+ else if ((long) other_node + (leaf.header_size + other_node->size) == (long) freed_node)
264259 {
265260 // Increase the merging node's size
266− other_node->size += header_size + freed_node->size;
261+ other_node->size += leaf.header_size + freed_node->size;
267262
268263 if (other_node != pool->head)
269264 {
@@ -298,32 +293,32 @@ void mpool_free(void* ptr, mpool_t* pool) · 28 unmodified lines
298293
299294 void leaf_free(void* ptr)
300295 {
301− mpool_free(ptr, &leaf_pool.pool);
296+ mpool_free(ptr, &leaf._mempool);
302297 }
303298
304−size_t mpool_get_size(mpool_t* pool)
299+size_t mpool_get_size(_tMempool* pool)
305300 {
306301 return pool->msize;
307302 }
308303
309−size_t mpool_get_used(mpool_t* pool)
304+size_t mpool_get_used(_tMempool* pool)
310305 {
311306 return pool->usize;
312307 }
313308
314309 size_t leaf_pool_get_size(void)
315310 {
316− return mpool_get_size(&leaf_pool.pool);
311+ return mpool_get_size(&leaf._mempool);
317312 }
318313
319314 size_t leaf_pool_get_used(void)
320315 {
321− return mpool_get_used(&leaf_pool.pool);
316+ return mpool_get_used(&leaf._mempool);
322317 }
323318
324319 void* leaf_pool_get_pool(void)
325320 {
326− float* buff = (float*)leaf_pool.pool.mpool;
321+ float* buff = (float*)leaf._mempool.mpool;
327322
328323 return buff;
329324 }
@@ -338,7 +333,7 @@ static inline size_t mpool_align(size_t size) { · 8 unmodified lines
338333 static inline mpool_node_t* create_node(void* block_location, mpool_node_t* next, mpool_node_t* prev, size_t size)
339334 {
340335 mpool_node_t* node = (mpool_node_t*)block_location;
341− node->pool = block_location + header_size;
336+ node->pool = block_location + leaf.header_size;
342337 node->next = next;
343338 node->prev = prev;
344339 node->size = size;
@@ -372,20 +367,20 @@ void leaf_mempool_overrun(void) · 27 unmodified lines
372367
373368 void tMempool_init(tMempool* const mp, char* memory, size_t size)
374369 {
375− tMempool_initToPool(mp, memory, size, &leaf_mempool);
370+ tMempool_initToPool(mp, memory, size, &leaf.mempool);
376371 }
377372
378373 void tMempool_free(tMempool* const mp)
379374 {
380− tMempool_freeFromPool(mp, &leaf_mempool);
375+ tMempool_freeFromPool(mp, &leaf.mempool);
381376 }
382377
383378 void tMempool_initToPool (tMempool* const mp, char* memory, size_t size, tMempool* const mem)
384379 {
385380 _tMempool* mm = *mem;
386− _tMempool* m = *mp = (_tMempool*) mpool_alloc(sizeof(_tMempool), &mm->pool);
381+ _tMempool* m = *mp = (_tMempool*) mpool_alloc(sizeof(_tMempool), mm);
387382
388− mpool_create (memory, size, &m->pool);
383+ mpool_create (memory, size, m);
389384 }
390385
391386 void tMempool_freeFromPool (tMempool* const mp, tMempool* const mem)
@@ -393,5 +388,5 @@ void tMempool_freeFromPool (tMempool* const mp, tMempool* const mem) · 1 unmodified line
393388 _tMempool* mm = *mem;
394389 _tMempool* m = *mp;
395390
396− mpool_free(m, &mm->pool);
391+ mpool_free(m, mm);
397392 }
LEAF/Src/leaf-midi.c+14−14
@@ -42,7 +42,7 @@ void tStack_free(tStack* const stack) · 41 unmodified lines
4242 void tStack_initToPool (tStack* const stack, tMempool* const mp)
4343 {
4444 _tMempool* m = *mp;
45− _tStack* ns = *stack = (_tStack*) mpool_alloc(sizeof(_tStack), &m->pool);
45+ _tStack* ns = *stack = (_tStack*) mpool_alloc(sizeof(_tStack), m);
4646
4747 ns->ordered = OFALSE;
4848 ns->size = 0;
@@ -57,7 +57,7 @@ void tStack_freeFromPool (tStack* const stack, tMempool* const mp) · 8 unmodified lines
5757 _tMempool* m = *mp;
5858 _tStack* ns = *stack;
5959
60− mpool_free(ns, &m->pool);
60+ mpool_free(ns, m);
6161 }
6262
6363 // If stack contains note, returns index. Else returns -1;
@@ -339,7 +339,7 @@ void tPoly_free(tPoly* const polyh) · 275 unmodified lines
339339 void tPoly_initToPool (tPoly* const polyh, int maxNumVoices, tMempool* const mp)
340340 {
341341 _tMempool* m = *mp;
342− _tPoly* poly = *polyh = (_tPoly*) mpool_alloc(sizeof(_tPoly), &m->pool);
342+ _tPoly* poly = *polyh = (_tPoly*) mpool_alloc(sizeof(_tPoly), m);
343343
344344 poly->numVoices = maxNumVoices;
345345 poly->maxNumVoices = maxNumVoices;
@@ -359,14 +359,14 @@ void tPoly_initToPool (tPoly* const polyh, int maxNumVoices, tMemp · 13 unmodified lines
359359
360360 poly->glideTime = 5.0f;
361361
362− poly->ramps = (tRamp*) mpool_alloc(sizeof(tRamp) * poly->maxNumVoices, &m->pool);
363− poly->rampVals = (float*) mpool_alloc(sizeof(float) * poly->maxNumVoices, &m->pool);
364− poly->firstReceived = (oBool*) mpool_alloc(sizeof(oBool) * poly->maxNumVoices, &m->pool);
365− poly->voices = (int**) mpool_alloc(sizeof(int*) * poly->maxNumVoices, &m->pool);
362+ poly->ramps = (tRamp*) mpool_alloc(sizeof(tRamp) * poly->maxNumVoices, m);
363+ poly->rampVals = (float*) mpool_alloc(sizeof(float) * poly->maxNumVoices, m);
364+ poly->firstReceived = (oBool*) mpool_alloc(sizeof(oBool) * poly->maxNumVoices, m);
365+ poly->voices = (int**) mpool_alloc(sizeof(int*) * poly->maxNumVoices, m);
366366
367367 for (int i = 0; i < poly->maxNumVoices; ++i)
368368 {
369− poly->voices[i] = (int*) mpool_alloc(sizeof(int) * 2, &m->pool);
369+ poly->voices[i] = (int*) mpool_alloc(sizeof(int) * 2, m);
370370 poly->voices[i][0] = -1;
371371 poly->firstReceived[i] = OFALSE;
372372
@@ -390,18 +390,18 @@ void tPoly_freeFromPool (tPoly* const polyh, tMempool* const mp) · 17 unmodified lines
390390 for (int i = 0; i < poly->maxNumVoices; i++)
391391 {
392392 tRamp_freeFromPool(&poly->ramps[i], mp);
393− mpool_free(poly->voices[i], &m->pool);
393+ mpool_free(poly->voices[i], m);
394394 }
395395 tRamp_freeFromPool(&poly->pitchBendRamp, mp);
396396 tStack_freeFromPool(&poly->stack, mp);
397397 tStack_freeFromPool(&poly->orderStack, mp);
398398
399− mpool_free(poly->voices, &m->pool);
400− mpool_free(poly->ramps, &m->pool);
401− mpool_free(poly->rampVals, &m->pool);
402− mpool_free(poly->firstReceived, &m->pool);
399+ mpool_free(poly->voices, m);
400+ mpool_free(poly->ramps, m);
401+ mpool_free(poly->rampVals, m);
402+ mpool_free(poly->firstReceived, m);
403403
404− mpool_free(poly, &m->pool);
404+ mpool_free(poly, m);
405405 }
406406
407407 void tPoly_tickPitch(tPoly* polyh)
LEAF/Src/leaf-oscillators.c+88−299
@@ -6,13 +6,11 @@ · 5 unmodified lines
66
77 #if _WIN32 || _WIN64
88
9−#include "..\Inc\leaf-tables.h"
109 #include "..\Inc\leaf-oscillators.h"
1110 #include "..\leaf.h"
1211
1312 #else
1413
15−#include "../Inc/leaf-tables.h"
1614 #include "../Inc/leaf-oscillators.h"
1715 #include "../leaf.h"
1816
@@ -21,24 +19,18 @@ · 2 unmodified lines
2119 // Cycle
2220 void tCycle_init(tCycle* const cy)
2321 {
24− _tCycle* c = *cy = (_tCycle*) leaf_alloc(sizeof(_tCycle));
25−
26− c->inc = 0.0f;
27− c->phase = 0.0f;
28−
22+ tCycle_initToPool(cy, &leaf.mempool);
2923 }
3024
3125 void tCycle_free(tCycle* const cy)
3226 {
33− _tCycle* c = *cy;
34−
35− leaf_free(c);
27+ tCycle_freeFromPool(cy, &leaf.mempool);
3628 }
3729
3830 void tCycle_initToPool (tCycle* const cy, tMempool* const mp)
3931 {
4032 _tMempool* m = *mp;
41− _tCycle* c = *cy = (_tCycle*) mpool_alloc(sizeof(_tCycle), &m->pool);
33+ _tCycle* c = *cy = (_tCycle*) mpool_alloc(sizeof(_tCycle), m);
4234
4335 c->inc = 0.0f;
4436 c->phase = 0.0f;
@@ -50,17 +42,18 @@ void tCycle_freeFromPool (tCycle* const cy, tMempool* const mp) · 5 unmodified lines
5042 _tMempool* m = *mp;
5143 _tCycle* c = *cy;
5244
53− mpool_free(c, &m->pool);
45+ mpool_free(c, m);
5446 }
5547
56−int tCycle_setFreq(tCycle* const cy, float freq)
48+void tCycle_setFreq(tCycle* const cy, float freq)
5749 {
5850 _tCycle* c = *cy;
5951
60− c->freq = freq;
52+ if (freq < 0.0f) c->freq = 0.0f;
53+ else if (freq > 20480.0f) c->freq = 20480.0f;
54+ else c->freq = freq;
55+
6156 c->inc = freq * leaf.invSampleRate;
62−
63− return 0;
6457 }
6558
6659 //need to check bounds and wrap table properly to allow through-zero FM
@@ -76,16 +69,16 @@ float tCycle_tick(tCycle* const cy) · 9 unmodified lines
7669 // Phasor increment
7770 c->phase += c->inc;
7871 while (c->phase >= 1.0f) c->phase -= 1.0f;
79− while (c->phase <= 0.0f) c->phase += 1.0f;
72+ while (c->phase < 0.0f) c->phase += 1.0f;
8073
8174 // Wavetable synthesis
8275
8376 temp = SINE_TABLE_SIZE * c->phase;
8477 intPart = (int)temp;
8578 fracPart = temp - (float)intPart;
86− samp0 = sinewave[intPart];
79+ samp0 = __leaf_table_sinewave[intPart];
8780 if (++intPart >= SINE_TABLE_SIZE) intPart = 0;
88− samp1 = sinewave[intPart];
81+ samp1 = __leaf_table_sinewave[intPart];
8982
9083 return (samp0 + (samp1 - samp0) * fracPart);
9184
@@ -102,26 +95,22 @@ void tCycleSampleRateChanged (tCycle* const cy) · 10 unmodified lines
10295 /* Triangle */
10396 void tTriangle_init(tTriangle* const cy)
10497 {
105− _tTriangle* c = *cy = (_tTriangle*) leaf_alloc(sizeof(_tTriangle));
106−
107− c->inc = 0.0f;
108− c->phase = 0.0f;
98+ tTriangle_initToPool(cy, &leaf.mempool);
10999 }
110100
111101 void tTriangle_free(tTriangle* const cy)
112102 {
113− _tTriangle* c = *cy;
114−
115− leaf_free(c);
103+ tTriangle_freeFromPool(cy, &leaf.mempool);
116104 }
117105
118106 void tTriangle_initToPool (tTriangle* const cy, tMempool* const mp)
119107 {
120108 _tMempool* m = *mp;
121− _tTriangle* c = *cy = (_tTriangle*) mpool_alloc(sizeof(_tTriangle), &m->pool);
109+ _tTriangle* c = *cy = (_tTriangle*) mpool_alloc(sizeof(_tTriangle), m);
122110
123111 c->inc = 0.0f;
124112 c->phase = 0.0f;
113+ tTriangle_setFreq(cy, 220);
125114 }
126115
127116 void tTriangle_freeFromPool (tTriangle* const cy, tMempool* const mp)
@@ -129,19 +118,25 @@ void tTriangle_freeFromPool (tTriangle* const cy, tMempool* const mp) · 1 unmodified line
129118 _tMempool* m = *mp;
130119 _tTriangle* c = *cy;
131120
132− mpool_free(c, &m->pool);
121+ mpool_free(c, m);
133122 }
134123
135−int tTriangle_setFreq(tTriangle* const cy, float freq)
124+void tTriangle_setFreq(tTriangle* const cy, float freq)
136125 {
137126 _tTriangle* c = *cy;
138127
139− if (freq < 0.0f) freq = 0.0f;
128+ if (freq < 0.0f) c->freq = 0.0f;
129+ else if (freq > 20480.0f) c->freq = 20480.0f;
130+ else c->freq = freq;
140131
141− c->freq = freq;
142− c->inc = freq * leaf.invSampleRate;
132+ c->inc = c->freq * leaf.invSampleRate;
143133
144− return 0;
134+ c->w = c->freq * INV_20;
135+ for (c->oct = 0; c->w > 2.0f; c->oct++)
136+ {
137+ c->w = 0.5f * c->w;
138+ }
139+ c->w = 2.0f - c->w;
145140 }
146141
147142
@@ -152,72 +147,15 @@ float tTriangle_tick(tTriangle* const cy) · 4 unmodified lines
152147 // Phasor increment
153148 c->phase += c->inc;
154149 while (c->phase >= 1.0f) c->phase -= 1.0f;
150+ while (c->phase < 0.0f) c->phase += 1.0f;
155151
156152 float out = 0.0f;
157− float w;
158153
159154 int idx = (int)(c->phase * TRI_TABLE_SIZE);
160155
161156 // Wavetable synthesis
162−
163− if (c->freq <= 20.0f)
164− {
165− out = triangle[T20][idx];
166− }
167− else if (c->freq <= 40.0f)
168− {
169− w = ((40.0f - c->freq) * INV_20);
170− out = (triangle[T20][idx] * w) + (triangle[T40][idx] * (1.0f - w));
171− }
172− else if (c->freq <= 80.0f)
173− {
174− w = ((80.0f - c->freq) * INV_40);
175− out = (triangle[T40][idx] * w) + (triangle[T80][idx] * (1.0f - w));
176− }
177− else if (c->freq <= 160.0f)
178− {
179− w = ((160.0f - c->freq) * INV_80);
180− out = (triangle[T80][idx] * w) + (triangle[T160][idx] * (1.0f - w));
181− }
182− else if (c->freq <= 320.0f)
183− {
184− w = ((320.0f - c->freq) * INV_160);
185− out = (triangle[T160][idx] * w) + (triangle[T320][idx] * (1.0f - w));
186− }
187− else if (c->freq <= 640.0f)
188− {
189− w = ((640.0f - c->freq) * INV_320);
190− out = (triangle[T320][idx] * w) + (triangle[T640][idx] * (1.0f - w));
191− }
192− else if (c->freq <= 1280.0f)
193− {
194− w = ((1280.0f - c->freq) * INV_640);
195− out = (triangle[T640][idx] * w) + (triangle[T1280][idx] * (1.0f - w));
196− }
197− else if (c->freq <= 2560.0f)
198− {
199− w = ((2560.0f - c->freq) * INV_1280);
200− out = (triangle[T1280][idx] * w) + (triangle[T2560][idx] * (1.0f - w));
201− }
202− else if (c->freq <= 5120.0f)
203− {
204− w = ((5120.0f - c->freq) * INV_2560);
205− out = (triangle[T2560][idx] * w) + (triangle[T5120][idx] * (1.0f - w));
206− }
207− else if (c->freq <= 10240.0f)
208− {
209− w = ((10240.0f - c->freq) * INV_5120);
210− out = (triangle[T5120][idx] * w) + (triangle[T10240][idx] * (1.0f - w));
211− }
212− else if (c->freq <= 20480.0f)
213− {
214− w = ((20480.0f - c->freq) * INV_10240);
215− out = (triangle[T10240][idx] * w) + (triangle[T20480][idx] * (1.0f - w));
216− }
217− else
218− {
219− out = triangle[T20480][idx];
220− }
157+ out = __leaf_table_triangle[c->oct+1][idx] +
158+ (__leaf_table_triangle[c->oct][idx] - __leaf_table_triangle[c->oct+1][idx]) * c->w;
221159
222160 return out;
223161 }
@@ -233,26 +171,22 @@ void tTriangleSampleRateChanged (tTriangle* const cy) · 9 unmodified lines
233171 /* Square */
234172 void tSquare_init(tSquare* const cy)
235173 {
236− _tSquare* c = *cy = (_tSquare*) leaf_alloc(sizeof(_tSquare));
237−
238− c->inc = 0.0f;
239− c->phase = 0.0f;
174+ tSquare_initToPool(cy, &leaf.mempool);
240175 }
241176
242177 void tSquare_free(tSquare* const cy)
243178 {
244− _tSquare* c = *cy;
245−
246− leaf_free(c);
179+ tSquare_freeFromPool(cy, &leaf.mempool);
247180 }
248181
249182 void tSquare_initToPool (tSquare* const cy, tMempool* const mp)
250183 {
251184 _tMempool* m = *mp;
252− _tSquare* c = *cy = (_tSquare*) mpool_alloc(sizeof(_tSquare), &m->pool);
185+ _tSquare* c = *cy = (_tSquare*) mpool_alloc(sizeof(_tSquare), m);
253186
254187 c->inc = 0.0f;
255188 c->phase = 0.0f;
189+ tSquare_setFreq(cy, 220);
256190 }
257191
258192 void tSquare_freeFromPool(tSquare* const cy, tMempool* const mp)
@@ -260,19 +194,25 @@ void tSquare_freeFromPool(tSquare* const cy, tMempool* const mp) · 1 unmodified line
260194 _tMempool* m = *mp;
261195 _tSquare* c = *cy;
262196
263− mpool_free(c, &m->pool);
197+ mpool_free(c, m);
264198 }
265199
266−int tSquare_setFreq(tSquare* const cy, float freq)
200+void tSquare_setFreq(tSquare* const cy, float freq)
267201 {
268202 _tSquare* c = *cy;
269203
270− if (freq < 0.0f) freq = 0.0f;
204+ if (freq < 0.0f) c->freq = 0.0f;
205+ else if (freq > 20480.0f) c->freq = 20480.0f;
206+ else c->freq = freq;
271207
272− c->freq = freq;
273− c->inc = freq * leaf.invSampleRate;
208+ c->inc = c->freq * leaf.invSampleRate;
274209
275− return 0;
210+ c->w = c->freq * INV_20;
211+ for (c->oct = 0; c->w > 2.0f; c->oct++)
212+ {
213+ c->w = 0.5f * c->w;
214+ }
215+ c->w = 2.0f - c->w;
276216 }
277217
278218 float tSquare_tick(tSquare* const cy)
@@ -282,71 +222,15 @@ float tSquare_tick(tSquare* const cy) · 3 unmodified lines
282222 // Phasor increment
283223 c->phase += c->inc;
284224 while (c->phase >= 1.0f) c->phase -= 1.0f;
225+ while (c->phase < 0.0f) c->phase += 1.0f;
285226
286227 float out = 0.0f;
287− float w = 0.0f;
288− int idx = (int)(c->phase * TRI_TABLE_SIZE);
289228
290− // Wavetable synthesis
229+ int idx = (int)(c->phase * SQR_TABLE_SIZE);
291230
292− if (c->freq <= 20.0f)
293− {
294− out = squarewave[T20][idx];
295− }
296− else if (c->freq <= 40.0f)
297− {
298− w = ((40.0f - c->freq) * INV_20);
299− out = (squarewave[T20][idx] * w) + (squarewave[T40][idx] * (1.0f - w));
300− }
301− else if (c->freq <= 80.0f)
302− {
303− w = ((80.0f - c->freq) * INV_40);
304− out = (squarewave[T40][idx] * w) + (squarewave[T80][idx] * (1.0f - w));
305− }
306− else if (c->freq <= 160.0f)
307− {
308− w = ((160.0f - c->freq) * INV_80);
309− out = (squarewave[T80][idx] * w) + (squarewave[T160][idx] * (1.0f - w));
310− }
311− else if (c->freq <= 320.0f)
312− {
313− w = ((320.0f - c->freq) * INV_160);
314− out = (squarewave[T160][idx] * w) + (squarewave[T320][idx] * (1.0f - w));
315− }
316− else if (c->freq <= 640.0f)
317− {
318− w = ((640.0f - c->freq) * INV_320);
319− out = (squarewave[T320][idx] * w) + (squarewave[T640][idx] * (1.0f - w));
320− }
321− else if (c->freq <= 1280.0f)
322− {
323− w = ((1280.0f - c->freq) * INV_640);
324− out = (squarewave[T640][idx] * w) + (squarewave[T1280][idx] * (1.0f - w));
325− }
326− else if (c->freq <= 2560.0f)
327− {
328− w = ((2560.0f - c->freq) * INV_1280);
329− out = (squarewave[T1280][idx] * w) + (squarewave[T2560][idx] * (1.0f - w));
330− }
331− else if (c->freq <= 5120.0f)
332− {
333− w = ((5120.0f - c->freq) * INV_2560);
334− out = (squarewave[T2560][idx] * w) + (squarewave[T5120][idx] * (1.0f - w));
335− }
336− else if (c->freq <= 10240.0f)
337− {
338− w = ((10240.0f - c->freq) * INV_5120);
339− out = (squarewave[T5120][idx] * w) + (squarewave[T10240][idx] * (1.0f - w));
340− }
341− else if (c->freq <= 20480.0f)
342− {
343− w = ((20480.0f - c->freq) * INV_10240);
344− out = (squarewave[T10240][idx] * w) + (squarewave[T20480][idx] * (1.0f - w));
345− }
346− else
347− {
348− out = squarewave[T20480][idx];
349− }
231+ // Wavetable synthesis
232+ out = __leaf_table_squarewave[c->oct+1][idx] +
233+ (__leaf_table_squarewave[c->oct][idx] - __leaf_table_squarewave[c->oct+1][idx]) * c->w;
350234
351235 return out;
352236 }
@@ -362,26 +246,22 @@ void tSquareSampleRateChanged (tSquare* const cy) · 9 unmodified lines
362246 // Sawtooth
363247 void tSawtooth_init(tSawtooth* const cy)
364248 {
365− _tSawtooth* c = *cy = (_tSawtooth*) leaf_alloc(sizeof(_tSawtooth));
366−
367− c->inc = 0.0f;
368− c->phase = 0.0f;
249+ tSawtooth_initToPool(cy, &leaf.mempool);
369250 }
370251
371252 void tSawtooth_free(tSawtooth* const cy)
372253 {
373− _tSawtooth* c = *cy;
374−
375− leaf_free(c);
254+ tSawtooth_freeFromPool(cy, &leaf.mempool);
376255 }
377256
378257 void tSawtooth_initToPool (tSawtooth* const cy, tMempool* const mp)
379258 {
380259 _tMempool* m = *mp;
381− _tSawtooth* c = *cy = (_tSawtooth*) mpool_alloc(sizeof(_tSawtooth), &m->pool);
260+ _tSawtooth* c = *cy = (_tSawtooth*) mpool_alloc(sizeof(_tSawtooth), m);
382261
383262 c->inc = 0.0f;
384263 c->phase = 0.0f;
264+ tSawtooth_setFreq(cy, 220);
385265 }
386266
387267 void tSawtooth_freeFromPool (tSawtooth* const cy, tMempool* const mp)
@@ -389,19 +269,25 @@ void tSawtooth_freeFromPool (tSawtooth* const cy, tMempool* const mp) · 1 unmodified line
389269 _tMempool* m = *mp;
390270 _tSawtooth* c = *cy;
391271
392− mpool_free(c, &m->pool);
272+ mpool_free(c, m);
393273 }
394274
395−int tSawtooth_setFreq(tSawtooth* const cy, float freq)
275+void tSawtooth_setFreq(tSawtooth* const cy, float freq)
396276 {
397277 _tSawtooth* c = *cy;
398278
399− if (freq < 0.0f) freq = 0.0f;
279+ if (freq < 0.0f) c->freq = 0.0f;
280+ else if (freq > 20480.0f) c->freq = 20480.0f;
281+ else c->freq = freq;
400282
401− c->freq = freq;
402− c->inc = freq * leaf.invSampleRate;
283+ c->inc = c->freq * leaf.invSampleRate;
403284
404− return 0;
285+ c->w = c->freq * INV_20;
286+ for (c->oct = 0; c->w > 2.0f; c->oct++)
287+ {
288+ c->w = 0.5f * c->w;
289+ }
290+ c->w = 2.0f - c->w;
405291 }
406292
407293 float tSawtooth_tick(tSawtooth* const cy)
@@ -411,72 +297,15 @@ float tSawtooth_tick(tSawtooth* const cy) · 3 unmodified lines
411297 // Phasor increment
412298 c->phase += c->inc;
413299 while (c->phase >= 1.0f) c->phase -= 1.0f;
300+ while (c->phase < 0.0f) c->phase += 1.0f;
414301
415302 float out = 0.0f;
416− float w;
417303
418− int idx = (int)(c->phase * TRI_TABLE_SIZE);
304+ int idx = (int)(c->phase * SAW_TABLE_SIZE);
419305
420306 // Wavetable synthesis
421−
422− if (c->freq <= 20.0f)
423− {
424− out = sawtooth[T20][idx];
425− }
426− else if (c->freq <= 40.0f)
427− {
428− w = ((40.0f - c->freq) * INV_20);
429− out = (sawtooth[T20][idx] * w) + (sawtooth[T40][idx] * (1.0f - w));
430− }
431− else if (c->freq <= 80.0f)
432− {
433− w = ((80.0f - c->freq) * INV_40);
434− out = (sawtooth[T40][idx] * w) + (sawtooth[T80][idx] * (1.0f - w));
435− }
436− else if (c->freq <= 160.0f)
437− {
438− w = ((160.0f - c->freq) * INV_80);
439− out = (sawtooth[T80][idx] * w) + (sawtooth[T160][idx] * (1.0f - w));
440− }
441− else if (c->freq <= 320.0f)
442− {
443− w = ((320.0f - c->freq) * INV_160);
444− out = (sawtooth[T160][idx] * w) + (sawtooth[T320][idx] * (1.0f - w));
445− }
446− else if (c->freq <= 640.0f)
447− {
448− w = ((640.0f - c->freq) * INV_320);
449− out = (sawtooth[T320][idx] * w) + (sawtooth[T640][idx] * (1.0f - w));
450− }
451− else if (c->freq <= 1280.0f)
452− {
453− w = ((1280.0f - c->freq) * INV_640);
454− out = (sawtooth[T640][idx] * w) + (sawtooth[T1280][idx] * (1.0f - w));
455− }
456− else if (c->freq <= 2560.0f)
457− {
458− w = ((2560.0f - c->freq) * INV_1280);
459− out = (sawtooth[T1280][idx] * w) + (sawtooth[T2560][idx] * (1.0f - w));
460− }
461− else if (c->freq <= 5120.0f)
462− {
463− w = ((5120.0f - c->freq) * INV_2560);
464− out = (sawtooth[T2560][idx] * w) + (sawtooth[T5120][idx] * (1.0f - w));
465− }
466− else if (c->freq <= 10240.0f)
467− {
468− w = ((10240.0f - c->freq) * INV_5120);
469− out = (sawtooth[T5120][idx] * w) + (sawtooth[T10240][idx] * (1.0f - w));
470− }
471− else if (c->freq <= 20480.0f)
472− {
473− w = ((20480.0f - c->freq) * INV_10240);
474− out = (sawtooth[T10240][idx] * w) + (sawtooth[T20480][idx] * (1.0f - w));
475− }
476− else
477− {
478− out = sawtooth[T20480][idx];
479− }
307+ out = __leaf_table_sawtooth[c->oct+1][idx] +
308+ (__leaf_table_sawtooth[c->oct][idx] - __leaf_table_sawtooth[c->oct+1][idx]) * c->w;
480309
481310 return out;
482311 }
@@ -499,23 +328,18 @@ void tPhasorSampleRateChanged (tPhasor* const ph) · 16 unmodified lines
499328
500329 void tPhasor_init(tPhasor* const ph)
501330 {
502− _tPhasor* p = *ph = (_tPhasor*) leaf_alloc(sizeof(_tPhasor));
503−
504− p->phase = 0.0f;
505− p->inc = 0.0f;
331+ tPhasor_initToPool(ph, &leaf.mempool);
506332 }
507333
508334 void tPhasor_free(tPhasor* const ph)
509335 {
510− _tPhasor* p = *ph;
511−
512− leaf_free(p);
336+ tPhasor_freeFromPool(ph, &leaf.mempool);
513337 }
514338
515339 void tPhasor_initToPool (tPhasor* const ph, tMempool* const mp)
516340 {
517341 _tMempool* m = *mp;
518− _tPhasor* p = *ph = (_tPhasor*) mpool_alloc(sizeof(_tPhasor), &m->pool);
342+ _tPhasor* p = *ph = (_tPhasor*) mpool_alloc(sizeof(_tPhasor), m);
519343
520344 p->phase = 0.0f;
521345 p->inc = 0.0f;
@@ -526,19 +350,18 @@ void tPhasor_freeFromPool(tPhasor* const ph, tMempool* const mp) · 4 unmodified lines
526350 _tMempool* m = *mp;
527351 _tPhasor* p = *ph;
528352
529− mpool_free(p, &m->pool);
353+ mpool_free(p, m);
530354 }
531355
532−int tPhasor_setFreq(tPhasor* const ph, float freq)
356+void tPhasor_setFreq(tPhasor* const ph, float freq)
533357 {
534358 _tPhasor* p = *ph;
535359
536− if (freq < 0.0f) freq = 0.0f;
360+ if (freq < 0.0f) p->freq = 0.0f;
361+ else if (freq > 20480.0f) p->freq = 20480.0f;
362+ else p->freq = freq;
537363
538− p->freq = freq;
539364 p->inc = freq * leaf.invSampleRate;
540−
541− return 0;
542365 }
543366
544367 float tPhasor_tick(tPhasor* const ph)
@@ -555,23 +378,18 @@ float tPhasor_tick(tPhasor* const ph) · 10 unmodified lines
555378 /* Noise */
556379 void tNoise_init(tNoise* const ns, NoiseType type)
557380 {
558− _tNoise* n = *ns = (_tNoise*) leaf_alloc(sizeof(_tNoise));
559−
560− n->type = type;
561− n->rand = leaf.random;
381+ tNoise_initToPool(ns, type, &leaf.mempool);
562382 }
563383
564384 void tNoise_free(tNoise* const ns)
565385 {
566− _tNoise* n = *ns;
567−
568− leaf_free(n);
386+ tNoise_freeFromPool(ns, &leaf.mempool);
569387 }
570388
571389 void tNoise_initToPool (tNoise* const ns, NoiseType type, tMempool* const mp)
572390 {
573391 _tMempool* m = *mp;
574− _tNoise* n = *ns = (_tNoise*) mpool_alloc(sizeof(_tNoise), &m->pool);
392+ _tNoise* n = *ns = (_tNoise*) mpool_alloc(sizeof(_tNoise), m);
575393
576394 n->type = type;
577395 n->rand = leaf.random;
@@ -582,7 +400,7 @@ void tNoise_freeFromPool (tNoise* const ns, tMempool* const mp) · 4 unmodified lines
582400 _tMempool* m = *mp;
583401 _tNoise* n = *ns;
584402
585− mpool_free(n, &m->pool);
403+ mpool_free(n, m);
586404 }
587405
588406 float tNoise_tick(tNoise* const ns)
@@ -616,47 +434,18 @@ void tNeuronSampleRateChanged(tNeuron* nr) · 27 unmodified lines
616434
617435 void tNeuron_init(tNeuron* const nr)
618436 {
619− _tNeuron* n = *nr = (_tNeuron*) leaf_alloc(sizeof(_tNeuron));
620−
621− tPoleZero_init(&n->f);
622−
623− tPoleZero_setBlockZero(&n->f, 0.99f);
624−
625− n->timeStep = 1.0f / 50.0f;
626−
627− n->current = 0.0f; // 100.0f for sound
628− n->voltage = 0.0f;
629−
630− n->mode = NeuronNormal;
631−
632− n->P[0] = 0.0f;
633− n->P[1] = 0.0f;
634− n->P[2] = 1.0f;
635−
636− n->V[0] = -12.0f;
637− n->V[1] = 115.0f;
638− n->V[2] = 10.613f;
639−
640− n->gK = 36.0f;
641− n->gN = 120.0f;
642− n->gL = 0.3f;
643− n->C = 1.0f;
644−
645− n->rate[2] = n->gL/n->C;
437+ tNeuron_initToPool(nr, &leaf.mempool);
646438 }
647439
648440 void tNeuron_free(tNeuron* const nr)
649441 {
650− _tNeuron* n = *nr;
651−
652− tPoleZero_free(&n->f);
653− leaf_free(n);
442+ tNeuron_freeFromPool(nr, &leaf.mempool);
654443 }
655444
656445 void tNeuron_initToPool (tNeuron* const nr, tMempool* const mp)
657446 {
658447 _tMempool* m = *mp;
659− _tNeuron* n = *nr = (_tNeuron*) mpool_alloc(sizeof(_tNeuron), &m->pool);
448+ _tNeuron* n = *nr = (_tNeuron*) mpool_alloc(sizeof(_tNeuron), m);
660449
661450 tPoleZero_initToPool(&n->f, mp);
662451
@@ -691,7 +480,7 @@ void tNeuron_freeFromPool(tNeuron* const nr, tMempool* const mp) · 28 unmodified lines
691480 _tNeuron* n = *nr;
692481
693482 tPoleZero_free(&n->f);
694− mpool_free(n, &m->pool);
483+ mpool_free(n, m);
695484 }
696485
697486 void tNeuron_reset(tNeuron* const nr)
LEAF/Src/leaf-physical.c+18−18
@@ -19,18 +19,18 @@ · 18 unmodified lines
1919 /* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ tPluck ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */
2020 void tPluck_init (tPluck* const pl, float lowestFrequency)
2121 {
22− tPluck_initToPool(pl, lowestFrequency, &leaf_mempool);
22+ tPluck_initToPool(pl, lowestFrequency, &leaf.mempool);
2323 }
2424
2525 void tPluck_free (tPluck* const pl)
2626 {
27− tPluck_freeFromPool(pl, &leaf_mempool);
27+ tPluck_freeFromPool(pl, &leaf.mempool);
2828 }
2929
3030 void tPluck_initToPool (tPluck* const pl, float lowestFrequency, tMempool* const mp)
3131 {
3232 _tMempool* m = *mp;
33− _tPluck* p = *pl = (_tPluck*) mpool_alloc(sizeof(_tPluck), &m->pool);
33+ _tPluck* p = *pl = (_tPluck*) mpool_alloc(sizeof(_tPluck), m);
3434
3535 if ( lowestFrequency <= 0.0f ) lowestFrequency = 10.0f;
3636
@@ -56,7 +56,7 @@ void tPluck_freeFromPool (tPluck* const pl, tMempool* const mp) · 19 unmodified lines
5656 tOneZero_freeFromPool(&p->loopFilter, mp);
5757 tAllpassDelay_freeFromPool(&p->delayLine, mp);
5858
59− mpool_free(p, &m->pool);
59+ mpool_free(p, m);
6060 }
6161
6262 float tPluck_getLastOut (tPluck* const pl)
@@ -139,18 +139,18 @@ void tPluckSampleRateChanged(tPluck* const pl) · 76 unmodified lines
139139 /* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ tKarplusStrong ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */
140140 void tKarplusStrong_init (tKarplusStrong* const pl, float lowestFrequency)
141141 {
142− tKarplusStrong_initToPool(pl, lowestFrequency, &leaf_mempool);
142+ tKarplusStrong_initToPool(pl, lowestFrequency, &leaf.mempool);
143143 }
144144
145145 void tKarplusStrong_free (tKarplusStrong* const pl)
146146 {
147− tKarplusStrong_freeFromPool(pl, &leaf_mempool);
147+ tKarplusStrong_freeFromPool(pl, &leaf.mempool);
148148 }
149149
150150 void tKarplusStrong_initToPool (tKarplusStrong* const pl, float lowestFrequency, tMempool* const mp)
151151 {
152152 _tMempool* m = *mp;
153− _tKarplusStrong* p = *pl = (_tKarplusStrong*) mpool_alloc(sizeof(_tKarplusStrong), &m->pool);
153+ _tKarplusStrong* p = *pl = (_tKarplusStrong*) mpool_alloc(sizeof(_tKarplusStrong), m);
154154
155155 if ( lowestFrequency <= 0.0f ) lowestFrequency = 8.0f;
156156
@@ -194,7 +194,7 @@ void tKarplusStrong_freeFromPool (tKarplusStrong* const pl, tMempool* const m · 37 unmodified lines
194194 tBiQuad_freeFromPool(&p->biquad[i], mp);
195195 }
196196
197− mpool_free(p, &m->pool);
197+ mpool_free(p, m);
198198 }
199199
200200 float tKarplusStrong_getLastOut (tKarplusStrong* const pl)
@@ -358,12 +358,12 @@ void tSimpleLivingString_init(tSimpleLivingString* const pl, float freq, floa · 157 unmodified lines
358358 float decay, float targetLev, float levSmoothFactor,
359359 float levStrength, int levMode)
360360 {
361− tSimpleLivingString_initToPool(pl, freq, dampFreq, decay, targetLev, levSmoothFactor, levStrength, levMode, &leaf_mempool);
361+ tSimpleLivingString_initToPool(pl, freq, dampFreq, decay, targetLev, levSmoothFactor, levStrength, levMode, &leaf.mempool);
362362 }
363363
364364 void tSimpleLivingString_free(tSimpleLivingString* const pl)
365365 {
366− tSimpleLivingString_freeFromPool(pl, &leaf_mempool);
366+ tSimpleLivingString_freeFromPool(pl, &leaf.mempool);
367367 }
368368
369369 void tSimpleLivingString_initToPool (tSimpleLivingString* const pl, float freq, float dampFreq,
@@ -371,7 +371,7 @@ void tSimpleLivingString_initToPool (tSimpleLivingString* const pl, float fr · 1 unmodified line
371371 float levStrength, int levMode, tMempool* const mp)
372372 {
373373 _tMempool* m = *mp;
374− _tSimpleLivingString* p = *pl = (_tSimpleLivingString*) mpool_alloc(sizeof(_tSimpleLivingString), &m->pool);
374+ _tSimpleLivingString* p = *pl = (_tSimpleLivingString*) mpool_alloc(sizeof(_tSimpleLivingString), m);
375375
376376 p->curr=0.0f;
377377 tExpSmooth_initToPool(&p->wlSmooth, leaf.sampleRate/freq, 0.01, mp); // smoother for string wavelength (not freq, to avoid expensive divisions)
@@ -396,7 +396,7 @@ void tSimpleLivingString_freeFromPool (tSimpleLivingString* const pl, tMem · 18 unmodified lines
396396 tHighpass_freeFromPool(&p->DCblocker, mp);
397397 tFeedbackLeveler_freeFromPool(&p->fbLev, mp);
398398
399− mpool_free(p, &m->pool);
399+ mpool_free(p, m);
400400 }
401401
402402 void tSimpleLivingString_setFreq(tSimpleLivingString* const pl, float freq)
@@ -480,12 +480,12 @@ void tLivingString_init(tLivingString* const pl, float freq, float pickPos, f · 77 unmodified lines
480480 float dampFreq, float decay, float targetLev, float levSmoothFactor,
481481 float levStrength, int levMode)
482482 {
483− tLivingString_initToPool(pl, freq, pickPos, prepIndex, dampFreq, decay, targetLev, levSmoothFactor, levStrength, levMode, &leaf_mempool);
483+ tLivingString_initToPool(pl, freq, pickPos, prepIndex, dampFreq, decay, targetLev, levSmoothFactor, levStrength, levMode, &leaf.mempool);
484484 }
485485
486486 void tLivingString_free(tLivingString* const pl)
487487 {
488− tLivingString_freeFromPool(pl, &leaf_mempool);
488+ tLivingString_freeFromPool(pl, &leaf.mempool);
489489 }
490490
491491 void tLivingString_initToPool (tLivingString* const pl, float freq, float pickPos, float prepIndex,
@@ -493,7 +493,7 @@ void tLivingString_initToPool (tLivingString* const pl, float freq, float · 1 unmodified line
493493 float levStrength, int levMode, tMempool* const mp)
494494 {
495495 _tMempool* m = *mp;
496− _tLivingString* p = *pl = (_tLivingString*) mpool_alloc(sizeof(_tLivingString), &m->pool);
496+ _tLivingString* p = *pl = (_tLivingString*) mpool_alloc(sizeof(_tLivingString), m);
497497
498498 p->curr=0.0f;
499499 tExpSmooth_initToPool(&p->wlSmooth, leaf.sampleRate/freq, 0.01, mp); // smoother for string wavelength (not freq, to avoid expensive divisions)
@@ -544,7 +544,7 @@ void tLivingString_freeFromPool (tLivingString* const pl, tMempool* const mp · 44 unmodified lines
544544 tFeedbackLeveler_freeFromPool(&p->fbLevU, mp);
545545 tFeedbackLeveler_freeFromPool(&p->fbLevL, mp);
546546
547− mpool_free(p, &m->pool);
547+ mpool_free(p, m);
548548 }
549549
550550 void tLivingString_setFreq(tLivingString* const pl, float freq)
@@ -689,7 +689,7 @@ void tReedTable_free (tReedTable* const pm) · 138 unmodified lines
689689 void tReedTable_initToPool (tReedTable* const pm, float offset, float slope, tMempool* const mp)
690690 {
691691 _tMempool* m = *mp;
692− _tReedTable* p = *pm = (_tReedTable*) mpool_alloc(sizeof(_tReedTable), &m->pool);
692+ _tReedTable* p = *pm = (_tReedTable*) mpool_alloc(sizeof(_tReedTable), m);
693693
694694 p->offset = offset;
695695 p->slope = slope;
@@ -700,7 +700,7 @@ void tReedTable_freeFromPool (tReedTable* const pm, tMempool* const mp) · 4 unmodified lines
700700 _tMempool* m = *mp;
701701 _tReedTable* p = *pm;
702702
703− mpool_free(p, &m->pool);
703+ mpool_free(p, m);
704704 }
705705
706706 float tReedTable_tick (tReedTable* const pm, float input)
LEAF/Src/leaf-reverb.c+8−8
@@ -68,7 +68,7 @@ void tPRCReverb_free(tPRCReverb* const rev) · 67 unmodified lines
6868 void tPRCReverb_initToPool (tPRCReverb* const rev, float t60, tMempool* const mp)
6969 {
7070 _tMempool* m = *mp;
71− _tPRCReverb* r = *rev = (_tPRCReverb*) mpool_alloc(sizeof(_tPRCReverb), &m->pool);
71+ _tPRCReverb* r = *rev = (_tPRCReverb*) mpool_alloc(sizeof(_tPRCReverb), m);
7272
7373 if (t60 <= 0.0f) t60 = 0.001f;
7474
@@ -110,7 +110,7 @@ void tPRCReverb_freeFromPool (tPRCReverb* const rev, tMempool* const mp) · 35 unmodified lines
110110 tDelay_freeFromPool(&r->allpassDelays[0], mp);
111111 tDelay_freeFromPool(&r->allpassDelays[1], mp);
112112 tDelay_freeFromPool(&r->combDelay, mp);
113− mpool_free(r, &m->pool);
113+ mpool_free(r, m);
114114 }
115115
116116 void tPRCRevert_clear(tPRCReverb* const rev)
@@ -243,7 +243,7 @@ void tNReverb_free(tNReverb* const rev) · 126 unmodified lines
243243 void tNReverb_initToPool (tNReverb* const rev, float t60, tMempool* const mp)
244244 {
245245 _tMempool* m = *mp;
246− _tNReverb* r = *rev = (_tNReverb*) mpool_alloc(sizeof(_tNReverb), &m->pool);
246+ _tNReverb* r = *rev = (_tNReverb*) mpool_alloc(sizeof(_tNReverb), m);
247247
248248 if (t60 <= 0.0f) t60 = 0.001f;
249249
@@ -296,7 +296,7 @@ void tNReverb_freeFromPool (tNReverb* const rev, tMempool* const mp) · 46 unmodified lines
296296 tLinearDelay_freeFromPool(&r->allpassDelays[i], mp);
297297 }
298298
299− mpool_free(r, &m->pool);
299+ mpool_free(r, m);
300300 }
301301
302302 void tNReverb_setT60(tNReverb* const rev, float t60)
@@ -457,18 +457,18 @@ float in_allpass_gains[4] = { 0.75f, 0.75f, 0.625f, 0.625f }; · 154 unmodified lines
457457
458458 void tDattorroReverb_init (tDattorroReverb* const rev)
459459 {
460− tDattorroReverb_initToPool(rev, &leaf_mempool);
460+ tDattorroReverb_initToPool(rev, &leaf.mempool);
461461 }
462462
463463 void tDattorroReverb_free (tDattorroReverb* const rev)
464464 {
465− tDattorroReverb_freeFromPool(rev, &leaf_mempool);
465+ tDattorroReverb_freeFromPool(rev, &leaf.mempool);
466466 }
467467
468468 void tDattorroReverb_initToPool (tDattorroReverb* const rev, tMempool* const mp)
469469 {
470470 _tMempool* m = *mp;
471− _tDattorroReverb* r = *rev = (_tDattorroReverb*) mpool_alloc(sizeof(_tDattorroReverb), &m->pool);
471+ _tDattorroReverb* r = *rev = (_tDattorroReverb*) mpool_alloc(sizeof(_tDattorroReverb), m);
472472
473473 r->size_max = 2.0f;
474474 r->size = 1.f;
@@ -567,7 +567,7 @@ void tDattorroReverb_freeFromPool (tDattorroReverb* const rev, tMempool* · 92 unmodified lines
567567
568568 tCycle_freeFromPool(&r->f2_lfo, mp);
569569
570− mpool_free(r, &m->pool);
570+ mpool_free(r, m);
571571 }
572572
573573 void tDattorroReverb_clear (tDattorroReverb* const rev)
LEAF/Src/leaf-sampling.c+14−14
@@ -26,20 +26,20 @@ · 25 unmodified lines
2626
2727 void tBuffer_init (tBuffer* const sb, uint32_t length)
2828 {
29− tBuffer_initToPool(sb, length, &leaf_mempool);
29+ tBuffer_initToPool(sb, length, &leaf.mempool);
3030 }
3131
3232 void tBuffer_free (tBuffer* const sb)
3333 {
34− tBuffer_freeFromPool(sb, &leaf_mempool);
34+ tBuffer_freeFromPool(sb, &leaf.mempool);
3535 }
3636
3737 void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp)
3838 {
3939 _tMempool* m = *mp;
40− _tBuffer* s = *sb = (_tBuffer*) mpool_alloc(sizeof(_tBuffer), &m->pool);
40+ _tBuffer* s = *sb = (_tBuffer*) mpool_alloc(sizeof(_tBuffer), m);
4141
42− s->buff = (float*) mpool_alloc( sizeof(float) * length, &m->pool);
42+ s->buff = (float*) mpool_alloc( sizeof(float) * length, m);
4343
4444 s->bufferLength = length;
4545 s->recordedLength = 0;
@@ -53,8 +53,8 @@ void tBuffer_freeFromPool (tBuffer* const sb, tMempool* const mp) · 7 unmodified lines
5353 _tMempool* m = *mp;
5454 _tBuffer* s = *sb;
5555
56− mpool_free(s->buff, &m->pool);
57− mpool_free(s, &m->pool);
56+ mpool_free(s->buff, m);
57+ mpool_free(s, m);
5858 }
5959
6060 void tBuffer_tick (tBuffer* const sb, float sample)
@@ -154,18 +154,18 @@ static void attemptStartEndChange(tSampler* const sp); · 93 unmodified lines
154154
155155 void tSampler_init(tSampler* const sp, tBuffer* const b)
156156 {
157− tSampler_initToPool(sp, b, &leaf_mempool);
157+ tSampler_initToPool(sp, b, &leaf.mempool);
158158 }
159159
160160 void tSampler_free (tSampler* const sp)
161161 {
162− tSampler_freeFromPool(sp, &leaf_mempool);
162+ tSampler_freeFromPool(sp, &leaf.mempool);
163163 }
164164
165165 void tSampler_initToPool(tSampler* const sp, tBuffer* const b, tMempool* const mp)
166166 {
167167 _tMempool* m = *mp;
168− _tSampler* p = *sp = (_tSampler*) mpool_alloc(sizeof(_tSampler), &m->pool);
168+ _tSampler* p = *sp = (_tSampler*) mpool_alloc(sizeof(_tSampler), m);
169169 _tBuffer* s = *b;
170170
171171 p->samp = s;
@@ -202,7 +202,7 @@ void tSampler_freeFromPool (tSampler* const sp, tMempool* const mp) · 30 unmodified lines
202202 _tSampler* p = *sp;
203203 tRamp_freeFromPool(&p->gain, mp);
204204
205− mpool_free(p, &m->pool);
205+ mpool_free(p, m);
206206 }
207207
208208 void tSampler_setSample (tSampler* const sp, tBuffer* const b)
@@ -709,18 +709,18 @@ void tSampler_setRate (tSampler* const sp, float rate) · 500 unmodified lines
709709
710710 void tAutoSampler_init (tAutoSampler* const as, tBuffer* const b)
711711 {
712− tAutoSampler_initToPool(as, b, &leaf_mempool);
712+ tAutoSampler_initToPool(as, b, &leaf.mempool);
713713 }
714714
715715 void tAutoSampler_free (tAutoSampler* const as)
716716 {
717− tAutoSampler_freeFromPool(as, &leaf_mempool);
717+ tAutoSampler_freeFromPool(as, &leaf.mempool);
718718 }
719719
720720 void tAutoSampler_initToPool (tAutoSampler* const as, tBuffer* const b, tMempool* const mp)
721721 {
722722 _tMempool* m = *mp;
723− _tAutoSampler* a = *as = (_tAutoSampler*) mpool_alloc(sizeof(_tAutoSampler), &m->pool);
723+ _tAutoSampler* a = *as = (_tAutoSampler*) mpool_alloc(sizeof(_tAutoSampler), m);
724724
725725 tBuffer_setRecordMode(b, RecordOneShot);
726726 tSampler_initToPool(&a->sampler, b, mp);
@@ -736,7 +736,7 @@ void tAutoSampler_freeFromPool (tAutoSampler* const as, tMempool* const · 9 unmodified lines
736736 tEnvelopeFollower_freeFromPool(&a->ef, mp);
737737 tSampler_freeFromPool(&a->sampler, mp);
738738
739− mpool_free(a, &m->pool);
739+ mpool_free(a, m);
740740 }
741741
742742 float tAutoSampler_tick (tAutoSampler* const as, float input)
LEAF/Src/leaf-tables.c+22−22
@@ -14,41 +14,41 @@ · 13 unmodified lines
1414
1515 #include "stdlib.h"
1616
17−const float fir2XLow[32] = { 0.001067048115027622, -0.004557728776555209, -0.016711590887520535, -0.021065500881657994, -0.003828695019946828, 0.01865935152799254, 0.012036365576553658, -0.02064070362810112, -0.02682399333687091, 0.017862623081258543, 0.0492716766870816, -0.004310232755957251, -0.08571879958189704, -0.03828300159135686, 0.18420501161808442, 0.4054061613074031, 0.4054061613074031, 0.18420501161808442, -0.03828300159135686, -0.08571879958189704, -0.004310232755957251, 0.0492716766870816, 0.017862623081258543, -0.02682399333687091, -0.02064070362810112, 0.012036365576553658, 0.01865935152799254, -0.003828695019946828, -0.021065500881657994, -0.016711590887520535, -0.004557728776555209, 0.001067048115027622
17+const float __leaf_table_fir2XLow[32] = { 0.001067048115027622, -0.004557728776555209, -0.016711590887520535, -0.021065500881657994, -0.003828695019946828, 0.01865935152799254, 0.012036365576553658, -0.02064070362810112, -0.02682399333687091, 0.017862623081258543, 0.0492716766870816, -0.004310232755957251, -0.08571879958189704, -0.03828300159135686, 0.18420501161808442, 0.4054061613074031, 0.4054061613074031, 0.18420501161808442, -0.03828300159135686, -0.08571879958189704, -0.004310232755957251, 0.0492716766870816, 0.017862623081258543, -0.02682399333687091, -0.02064070362810112, 0.012036365576553658, 0.01865935152799254, -0.003828695019946828, -0.021065500881657994, -0.016711590887520535, -0.004557728776555209, 0.001067048115027622
1818
1919 };
20−const float fir4XLow[64] = { 0.0006952369848543607, -0.0021602595656775407, -0.005046940892783684, -0.009045400833780066, -0.01291169046367334, -0.015115999752735221, -0.014305643164290147, -0.009951858009311934, -0.0028258377448417927, 0.004999374847547033, 0.010750729432710248, 0.012011264580991868, 0.007846433846826574, -0.0005004296670167205, -0.009772888585453377, -0.015810363406761653, -0.01525350231205246, -0.007226084282741553, 0.005835838890105145, 0.018676910759237414, 0.025091142837250335, 0.02056199072613674, 0.004658087892329196, -0.017877850338462058, -0.03800800914197999, -0.04518029996599868, -0.031146769751981856, 0.006553281738260734, 0.06282284508297871, 0.1257919544316159, 0.18007204974638935, 0.21145499612282317, 0.21145499612282317, 0.18007204974638935, 0.1257919544316159, 0.06282284508297871, 0.006553281738260734, -0.031146769751981856, -0.04518029996599868, -0.03800800914197999, -0.017877850338462058, 0.004658087892329196, 0.02056199072613674, 0.025091142837250335, 0.018676910759237414, 0.005835838890105145, -0.007226084282741553, -0.01525350231205246, -0.015810363406761653, -0.009772888585453377, -0.0005004296670167205, 0.007846433846826574, 0.012011264580991868, 0.010750729432710248, 0.004999374847547033, -0.0028258377448417927, -0.009951858009311934, -0.014305643164290147, -0.015115999752735221, -0.01291169046367334, -0.009045400833780066, -0.005046940892783684, -0.0021602595656775407, 0.0006952369848543607
20+const float __leaf_table_fir4XLow[64] = { 0.0006952369848543607, -0.0021602595656775407, -0.005046940892783684, -0.009045400833780066, -0.01291169046367334, -0.015115999752735221, -0.014305643164290147, -0.009951858009311934, -0.0028258377448417927, 0.004999374847547033, 0.010750729432710248, 0.012011264580991868, 0.007846433846826574, -0.0005004296670167205, -0.009772888585453377, -0.015810363406761653, -0.01525350231205246, -0.007226084282741553, 0.005835838890105145, 0.018676910759237414, 0.025091142837250335, 0.02056199072613674, 0.004658087892329196, -0.017877850338462058, -0.03800800914197999, -0.04518029996599868, -0.031146769751981856, 0.006553281738260734, 0.06282284508297871, 0.1257919544316159, 0.18007204974638935, 0.21145499612282317, 0.21145499612282317, 0.18007204974638935, 0.1257919544316159, 0.06282284508297871, 0.006553281738260734, -0.031146769751981856, -0.04518029996599868, -0.03800800914197999, -0.017877850338462058, 0.004658087892329196, 0.02056199072613674, 0.025091142837250335, 0.018676910759237414, 0.005835838890105145, -0.007226084282741553, -0.01525350231205246, -0.015810363406761653, -0.009772888585453377, -0.0005004296670167205, 0.007846433846826574, 0.012011264580991868, 0.010750729432710248, 0.004999374847547033, -0.0028258377448417927, -0.009951858009311934, -0.014305643164290147, -0.015115999752735221, -0.01291169046367334, -0.009045400833780066, -0.005046940892783684, -0.0021602595656775407, 0.0006952369848543607
2121 };
22−const float fir8XLow[64] = { 0.0006754949160790157, 0.0002779478357299437, 0.00016529299248029802, -0.00013134896547707938, -0.0006717131404275674, -0.0015110701381990592, -0.002691718323402088, -0.004233151560515273, -0.006122759810873029, -0.008309678451155357, -0.010700324896169348, -0.013154262594364387, -0.015486775440587882, -0.01748014690133886, -0.018887653514132675, -0.019456772349369558, -0.01894272181784527, -0.017131243827335194, -0.013858969256894846, -0.009032963777720983, -0.0026459262830678125, 0.00521276165394513, 0.01435273458276724, 0.024486845310977834, 0.03524172116254876, 0.04617574968276393, 0.05680505888194891, 0.06663123541320262, 0.07517390607705798, 0.08200222626654773, 0.0867639105153248, 0.08920930675382921, 0.08920930675382921, 0.0867639105153248, 0.08200222626654773, 0.07517390607705798, 0.06663123541320262, 0.05680505888194891, 0.04617574968276393, 0.03524172116254876, 0.024486845310977834, 0.01435273458276724, 0.00521276165394513, -0.0026459262830678125, -0.009032963777720983, -0.013858969256894846, -0.017131243827335194, -0.01894272181784527, -0.019456772349369558, -0.018887653514132675, -0.01748014690133886, -0.015486775440587882, -0.013154262594364387, -0.010700324896169348, -0.008309678451155357, -0.006122759810873029, -0.004233151560515273, -0.002691718323402088, -0.0015110701381990592, -0.0006717131404275674, -0.00013134896547707938, 0.00016529299248029802, 0.0002779478357299437, 0.0006754949160790157
22+const float __leaf_table_fir8XLow[64] = { 0.0006754949160790157, 0.0002779478357299437, 0.00016529299248029802, -0.00013134896547707938, -0.0006717131404275674, -0.0015110701381990592, -0.002691718323402088, -0.004233151560515273, -0.006122759810873029, -0.008309678451155357, -0.010700324896169348, -0.013154262594364387, -0.015486775440587882, -0.01748014690133886, -0.018887653514132675, -0.019456772349369558, -0.01894272181784527, -0.017131243827335194, -0.013858969256894846, -0.009032963777720983, -0.0026459262830678125, 0.00521276165394513, 0.01435273458276724, 0.024486845310977834, 0.03524172116254876, 0.04617574968276393, 0.05680505888194891, 0.06663123541320262, 0.07517390607705798, 0.08200222626654773, 0.0867639105153248, 0.08920930675382921, 0.08920930675382921, 0.0867639105153248, 0.08200222626654773, 0.07517390607705798, 0.06663123541320262, 0.05680505888194891, 0.04617574968276393, 0.03524172116254876, 0.024486845310977834, 0.01435273458276724, 0.00521276165394513, -0.0026459262830678125, -0.009032963777720983, -0.013858969256894846, -0.017131243827335194, -0.01894272181784527, -0.019456772349369558, -0.018887653514132675, -0.01748014690133886, -0.015486775440587882, -0.013154262594364387, -0.010700324896169348, -0.008309678451155357, -0.006122759810873029, -0.004233151560515273, -0.002691718323402088, -0.0015110701381990592, -0.0006717131404275674, -0.00013134896547707938, 0.00016529299248029802, 0.0002779478357299437, 0.0006754949160790157
2323 };
24−const float fir16XLow[128] = { 0.0046126349429950276, 0.002418251320043122, 0.002998396982119693, 0.0036278090719021024, 0.0042975430005925104, 0.004996222179947315, 0.005711926725799716, 0.00643079625328543, 0.007135468516004265, 0.007808520869830334, 0.008432568881455365, 0.008987453845736109, 0.00945525638237626, 0.009815890031354925, 0.01005214318250272, 0.0101471696783731, 0.010086582032584102, 0.009858344528406827, 0.009453351108896472, 0.00886647074448095, 0.008096771309653635, 0.00714751717242796, 0.006026566967445846, 0.004745997071949807, 0.0033222377606249025, 0.0017766711441555428, 0.00013504407845816216, -0.0015717347700967995, -0.0033094088955885038, -0.005040712758495562, -0.0067262136355625045, -0.00832548062138737, -0.009796853749250854, -0.011097728611024173, -0.012187337326564303, -0.013023698103098556, -0.013573509920266506, -0.013801755448129987, -0.013685636499932173, -0.0132011750541409, -0.012328290422335804, -0.011059565013468301, -0.009397775060844537, -0.007349071952063118, -0.004920665178899413, -0.002134336426912994, 0.0009664872092121234, 0.00436478920287496, 0.008003553325930378, 0.011839210717492617, 0.015814297525442545, 0.01987142580304551, 0.023948983229671674, 0.0279823843957138, 0.03190689232743185, 0.03565816745288488, 0.03917373689862927, 0.042395392373465575, 0.04526788671987817, 0.0477424527036618, 0.04977580760639264, 0.051332653704811104, 0.05238580079738586, 0.05291690409987073, 0.05291690409987073, 0.05238580079738586, 0.051332653704811104, 0.04977580760639264, 0.0477424527036618, 0.04526788671987817, 0.042395392373465575, 0.03917373689862927, 0.03565816745288488, 0.03190689232743185, 0.0279823843957138, 0.023948983229671674, 0.01987142580304551, 0.015814297525442545, 0.011839210717492617, 0.008003553325930378, 0.00436478920287496, 0.0009664872092121234, -0.002134336426912994, -0.004920665178899413, -0.007349071952063118, -0.009397775060844537, -0.011059565013468301, -0.012328290422335804, -0.0132011750541409, -0.013685636499932173, -0.013801755448129987, -0.013573509920266506, -0.013023698103098556, -0.012187337326564303, -0.011097728611024173, -0.009796853749250854, -0.00832548062138737, -0.0067262136355625045, -0.005040712758495562, -0.0033094088955885038, -0.0015717347700967995, 0.00013504407845816216, 0.0017766711441555428, 0.0033222377606249025, 0.004745997071949807, 0.006026566967445846, 0.00714751717242796, 0.008096771309653635, 0.00886647074448095, 0.009453351108896472, 0.009858344528406827, 0.010086582032584102, 0.0101471696783731, 0.01005214318250272, 0.009815890031354925, 0.00945525638237626, 0.008987453845736109, 0.008432568881455365, 0.007808520869830334, 0.007135468516004265, 0.00643079625328543, 0.005711926725799716, 0.004996222179947315, 0.0042975430005925104, 0.0036278090719021024, 0.002998396982119693, 0.002418251320043122, 0.0046126349429950276
24+const float __leaf_table_fir16XLow[128] = { 0.0046126349429950276, 0.002418251320043122, 0.002998396982119693, 0.0036278090719021024, 0.0042975430005925104, 0.004996222179947315, 0.005711926725799716, 0.00643079625328543, 0.007135468516004265, 0.007808520869830334, 0.008432568881455365, 0.008987453845736109, 0.00945525638237626, 0.009815890031354925, 0.01005214318250272, 0.0101471696783731, 0.010086582032584102, 0.009858344528406827, 0.009453351108896472, 0.00886647074448095, 0.008096771309653635, 0.00714751717242796, 0.006026566967445846, 0.004745997071949807, 0.0033222377606249025, 0.0017766711441555428, 0.00013504407845816216, -0.0015717347700967995, -0.0033094088955885038, -0.005040712758495562, -0.0067262136355625045, -0.00832548062138737, -0.009796853749250854, -0.011097728611024173, -0.012187337326564303, -0.013023698103098556, -0.013573509920266506, -0.013801755448129987, -0.013685636499932173, -0.0132011750541409, -0.012328290422335804, -0.011059565013468301, -0.009397775060844537, -0.007349071952063118, -0.004920665178899413, -0.002134336426912994, 0.0009664872092121234, 0.00436478920287496, 0.008003553325930378, 0.011839210717492617, 0.015814297525442545, 0.01987142580304551, 0.023948983229671674, 0.0279823843957138, 0.03190689232743185, 0.03565816745288488, 0.03917373689862927, 0.042395392373465575, 0.04526788671987817, 0.0477424527036618, 0.04977580760639264, 0.051332653704811104, 0.05238580079738586, 0.05291690409987073, 0.05291690409987073, 0.05238580079738586, 0.051332653704811104, 0.04977580760639264, 0.0477424527036618, 0.04526788671987817, 0.042395392373465575, 0.03917373689862927, 0.03565816745288488, 0.03190689232743185, 0.0279823843957138, 0.023948983229671674, 0.01987142580304551, 0.015814297525442545, 0.011839210717492617, 0.008003553325930378, 0.00436478920287496, 0.0009664872092121234, -0.002134336426912994, -0.004920665178899413, -0.007349071952063118, -0.009397775060844537, -0.011059565013468301, -0.012328290422335804, -0.0132011750541409, -0.013685636499932173, -0.013801755448129987, -0.013573509920266506, -0.013023698103098556, -0.012187337326564303, -0.011097728611024173, -0.009796853749250854, -0.00832548062138737, -0.0067262136355625045, -0.005040712758495562, -0.0033094088955885038, -0.0015717347700967995, 0.00013504407845816216, 0.0017766711441555428, 0.0033222377606249025, 0.004745997071949807, 0.006026566967445846, 0.00714751717242796, 0.008096771309653635, 0.00886647074448095, 0.009453351108896472, 0.009858344528406827, 0.010086582032584102, 0.0101471696783731, 0.01005214318250272, 0.009815890031354925, 0.00945525638237626, 0.008987453845736109, 0.008432568881455365, 0.007808520869830334, 0.007135468516004265, 0.00643079625328543, 0.005711926725799716, 0.004996222179947315, 0.0042975430005925104, 0.0036278090719021024, 0.002998396982119693, 0.002418251320043122, 0.0046126349429950276
2525 };
2626
27−const float fir32XLow[256] = { 0.003135815035675548, 0.0008156232239328851, 0.000917068197598276, 0.0010233321389754753, 0.001134110218761504, 0.0012491667970169805, 0.0013680375075057851, 0.001490070275243389, 0.0016147643011084855, 0.0017417157238882276, 0.0018700914504121836, 0.0019991579415749683, 0.002128471863076254, 0.0022567566738769186, 0.002383672659264704, 0.002508166194956474, 0.002629506399721181, 0.0027467683378931368, 0.0028590361951993043, 0.0029653540222406116, 0.0030647286416823558, 0.00315623470697179, 0.003238837936508139, 0.0033114996375323753, 0.003373275427426179, 0.003423120728613286, 0.0034602078573979502, 0.00348370126489233, 0.0034928589363555137, 0.003487024926580723, 0.00346544617544127, 0.0034275901596743786, 0.003372744288160786, 0.003300374368830668, 0.0032100011629779615, 0.0031011259873207366, 0.0029734835473811155, 0.002826966057696581, 0.002661647372342504, 0.002477856491791658, 0.0022758592957851788, 0.002056324802981239, 0.0018188203182857804, 0.0015643564184398945, 0.0012926118931092972, 0.0010045690459120843, 0.0007018867678747181, 0.0003860391202902529, 0.00005849980158161824, -0.0002799696936324717, -0.0006296005356373679, -0.0009895247437558183, -0.0013546785675169304, -0.0017195561866995873, -0.0020963876502479964, -0.002468260301862593, -0.0028417218921490055, -0.0032120394918615683, -0.0035773608021516137, -0.003935505336691309, -0.004284369920502227, -0.004621670593236145, -0.004945031807804129, -0.005252279037886353, -0.005541035510098375, -0.0058089264241534076, -0.006054095814242929, -0.006274068947767563, -0.00646696244866887, -0.0066305675756926155, -0.006762900683506128, -0.0068620368760529005, -0.006926182735003765, -0.0069537046122919695, -0.006943019919480639, -0.006892771889917669, -0.006801741377343995, -0.006668838708546407, -0.006493264006045824, -0.006274267867821416, -0.006011320357808483, -0.0057040303527059145, -0.0053521596030233955, -0.004955865565614219, -0.0045153171035821945, -0.004031251472901679, -0.0035043462024212605, -0.002935495552851842, -0.0023258420785969196, -0.0016765768456949962, -0.0009892344368254917, -0.0002656979807816483, 0.0004919846584003508, 0.0012815018066687268, 0.0021009777555761797, 0.002947120990883713, 0.003818897132096946, 0.004711821532573362, 0.005623441877750917, 0.0065507318610126455, 0.00749007256295643, 0.008438601047417412, 0.009393231377415961, 0.010349728929990198, 0.011304034683748016, 0.012253787036798792, 0.0131957325172224, 0.014123534046112132, 0.015037407721547907, 0.015930638333497147, 0.016801083762848282, 0.017644931748342123, 0.018458926379618365, 0.019239740862760844, 0.0199842074278331, 0.02068926196032209, 0.021351902836904902, 0.021969538576994418, 0.022539688024890127, 0.02305979792910538, 0.023527892067270753, 0.023941757493848588, 0.02429975740762361, 0.024600378168866704, 0.02484241441905009, 0.025024893038415853, 0.025146995906550493, 0.025208214258904054, 0.025208214258904054, 0.025146995906550493, 0.025024893038415853, 0.02484241441905009, 0.024600378168866704, 0.02429975740762361, 0.023941757493848588, 0.023527892067270753, 0.02305979792910538, 0.022539688024890127, 0.021969538576994418, 0.021351902836904902, 0.02068926196032209, 0.0199842074278331, 0.019239740862760844, 0.018458926379618365, 0.017644931748342123, 0.016801083762848282, 0.015930638333497147, 0.015037407721547907, 0.014123534046112132, 0.0131957325172224, 0.012253787036798792, 0.011304034683748016, 0.010349728929990198, 0.009393231377415961, 0.008438601047417412, 0.00749007256295643, 0.0065507318610126455, 0.005623441877750917, 0.004711821532573362, 0.003818897132096946, 0.002947120990883713, 0.0021009777555761797, 0.0012815018066687268, 0.0004919846584003508, -0.0002656979807816483, -0.0009892344368254917, -0.0016765768456949962, -0.0023258420785969196, -0.002935495552851842, -0.0035043462024212605, -0.004031251472901679, -0.0045153171035821945, -0.004955865565614219, -0.0053521596030233955, -0.0057040303527059145, -0.006011320357808483, -0.006274267867821416, -0.006493264006045824, -0.006668838708546407, -0.006801741377343995, -0.006892771889917669, -0.006943019919480639, -0.0069537046122919695, -0.006926182735003765, -0.0068620368760529005, -0.006762900683506128, -0.0066305675756926155, -0.00646696244866887, -0.006274068947767563, -0.006054095814242929, -0.0058089264241534076, -0.005541035510098375, -0.005252279037886353, -0.004945031807804129, -0.004621670593236145, -0.004284369920502227, -0.003935505336691309, -0.0035773608021516137, -0.0032120394918615683, -0.0028417218921490055, -0.002468260301862593, -0.0020963876502479964, -0.0017195561866995873, -0.0013546785675169304, -0.0009895247437558183, -0.0006296005356373679, -0.0002799696936324717, 0.00005849980158161824, 0.0003860391202902529, 0.0007018867678747181, 0.0010045690459120843, 0.0012926118931092972, 0.0015643564184398945, 0.0018188203182857804, 0.002056324802981239, 0.0022758592957851788, 0.002477856491791658, 0.002661647372342504, 0.002826966057696581, 0.0029734835473811155, 0.0031011259873207366, 0.0032100011629779615, 0.003300374368830668, 0.003372744288160786, 0.0034275901596743786, 0.00346544617544127, 0.003487024926580723, 0.0034928589363555137, 0.00348370126489233, 0.0034602078573979502, 0.003423120728613286, 0.003373275427426179, 0.0033114996375323753, 0.003238837936508139, 0.00315623470697179, 0.0030647286416823558, 0.0029653540222406116, 0.0028590361951993043, 0.0027467683378931368, 0.002629506399721181, 0.002508166194956474, 0.002383672659264704, 0.0022567566738769186, 0.002128471863076254, 0.0019991579415749683, 0.0018700914504121836, 0.0017417157238882276, 0.0016147643011084855, 0.001490070275243389, 0.0013680375075057851, 0.0012491667970169805, 0.001134110218761504, 0.0010233321389754753, 0.000917068197598276, 0.0008156232239328851, 0.003135815035675548
27+const float __leaf_table_fir32XLow[256] = { 0.003135815035675548, 0.0008156232239328851, 0.000917068197598276, 0.0010233321389754753, 0.001134110218761504, 0.0012491667970169805, 0.0013680375075057851, 0.001490070275243389, 0.0016147643011084855, 0.0017417157238882276, 0.0018700914504121836, 0.0019991579415749683, 0.002128471863076254, 0.0022567566738769186, 0.002383672659264704, 0.002508166194956474, 0.002629506399721181, 0.0027467683378931368, 0.0028590361951993043, 0.0029653540222406116, 0.0030647286416823558, 0.00315623470697179, 0.003238837936508139, 0.0033114996375323753, 0.003373275427426179, 0.003423120728613286, 0.0034602078573979502, 0.00348370126489233, 0.0034928589363555137, 0.003487024926580723, 0.00346544617544127, 0.0034275901596743786, 0.003372744288160786, 0.003300374368830668, 0.0032100011629779615, 0.0031011259873207366, 0.0029734835473811155, 0.002826966057696581, 0.002661647372342504, 0.002477856491791658, 0.0022758592957851788, 0.002056324802981239, 0.0018188203182857804, 0.0015643564184398945, 0.0012926118931092972, 0.0010045690459120843, 0.0007018867678747181, 0.0003860391202902529, 0.00005849980158161824, -0.0002799696936324717, -0.0006296005356373679, -0.0009895247437558183, -0.0013546785675169304, -0.0017195561866995873, -0.0020963876502479964, -0.002468260301862593, -0.0028417218921490055, -0.0032120394918615683, -0.0035773608021516137, -0.003935505336691309, -0.004284369920502227, -0.004621670593236145, -0.004945031807804129, -0.005252279037886353, -0.005541035510098375, -0.0058089264241534076, -0.006054095814242929, -0.006274068947767563, -0.00646696244866887, -0.0066305675756926155, -0.006762900683506128, -0.0068620368760529005, -0.006926182735003765, -0.0069537046122919695, -0.006943019919480639, -0.006892771889917669, -0.006801741377343995, -0.006668838708546407, -0.006493264006045824, -0.006274267867821416, -0.006011320357808483, -0.0057040303527059145, -0.0053521596030233955, -0.004955865565614219, -0.0045153171035821945, -0.004031251472901679, -0.0035043462024212605, -0.002935495552851842, -0.0023258420785969196, -0.0016765768456949962, -0.0009892344368254917, -0.0002656979807816483, 0.0004919846584003508, 0.0012815018066687268, 0.0021009777555761797, 0.002947120990883713, 0.003818897132096946, 0.004711821532573362, 0.005623441877750917, 0.0065507318610126455, 0.00749007256295643, 0.008438601047417412, 0.009393231377415961, 0.010349728929990198, 0.011304034683748016, 0.012253787036798792, 0.0131957325172224, 0.014123534046112132, 0.015037407721547907, 0.015930638333497147, 0.016801083762848282, 0.017644931748342123, 0.018458926379618365, 0.019239740862760844, 0.0199842074278331, 0.02068926196032209, 0.021351902836904902, 0.021969538576994418, 0.022539688024890127, 0.02305979792910538, 0.023527892067270753, 0.023941757493848588, 0.02429975740762361, 0.024600378168866704, 0.02484241441905009, 0.025024893038415853, 0.025146995906550493, 0.025208214258904054, 0.025208214258904054, 0.025146995906550493, 0.025024893038415853, 0.02484241441905009, 0.024600378168866704, 0.02429975740762361, 0.023941757493848588, 0.023527892067270753, 0.02305979792910538, 0.022539688024890127, 0.021969538576994418, 0.021351902836904902, 0.02068926196032209, 0.0199842074278331, 0.019239740862760844, 0.018458926379618365, 0.017644931748342123, 0.016801083762848282, 0.015930638333497147, 0.015037407721547907, 0.014123534046112132, 0.0131957325172224, 0.012253787036798792, 0.011304034683748016, 0.010349728929990198, 0.009393231377415961, 0.008438601047417412, 0.00749007256295643, 0.0065507318610126455, 0.005623441877750917, 0.004711821532573362, 0.003818897132096946, 0.002947120990883713, 0.0021009777555761797, 0.0012815018066687268, 0.0004919846584003508, -0.0002656979807816483, -0.0009892344368254917, -0.0016765768456949962, -0.0023258420785969196, -0.002935495552851842, -0.0035043462024212605, -0.004031251472901679, -0.0045153171035821945, -0.004955865565614219, -0.0053521596030233955, -0.0057040303527059145, -0.006011320357808483, -0.006274267867821416, -0.006493264006045824, -0.006668838708546407, -0.006801741377343995, -0.006892771889917669, -0.006943019919480639, -0.0069537046122919695, -0.006926182735003765, -0.0068620368760529005, -0.006762900683506128, -0.0066305675756926155, -0.00646696244866887, -0.006274068947767563, -0.006054095814242929, -0.0058089264241534076, -0.005541035510098375, -0.005252279037886353, -0.004945031807804129, -0.004621670593236145, -0.004284369920502227, -0.003935505336691309, -0.0035773608021516137, -0.0032120394918615683, -0.0028417218921490055, -0.002468260301862593, -0.0020963876502479964, -0.0017195561866995873, -0.0013546785675169304, -0.0009895247437558183, -0.0006296005356373679, -0.0002799696936324717, 0.00005849980158161824, 0.0003860391202902529, 0.0007018867678747181, 0.0010045690459120843, 0.0012926118931092972, 0.0015643564184398945, 0.0018188203182857804, 0.002056324802981239, 0.0022758592957851788, 0.002477856491791658, 0.002661647372342504, 0.002826966057696581, 0.0029734835473811155, 0.0031011259873207366, 0.0032100011629779615, 0.003300374368830668, 0.003372744288160786, 0.0034275901596743786, 0.00346544617544127, 0.003487024926580723, 0.0034928589363555137, 0.00348370126489233, 0.0034602078573979502, 0.003423120728613286, 0.003373275427426179, 0.0033114996375323753, 0.003238837936508139, 0.00315623470697179, 0.0030647286416823558, 0.0029653540222406116, 0.0028590361951993043, 0.0027467683378931368, 0.002629506399721181, 0.002508166194956474, 0.002383672659264704, 0.0022567566738769186, 0.002128471863076254, 0.0019991579415749683, 0.0018700914504121836, 0.0017417157238882276, 0.0016147643011084855, 0.001490070275243389, 0.0013680375075057851, 0.0012491667970169805, 0.001134110218761504, 0.0010233321389754753, 0.000917068197598276, 0.0008156232239328851, 0.003135815035675548
2828 };
29−const float fir64XLow[256] = { -0.007573012406345277, 0.00024079274850113426, 0.00024263723882202515, 0.0002481761013286244, 0.0002570861260137623, 0.0002699368701027846, 0.0002857208679875607, 0.00030498547559247845, 0.0003276748319944884, 0.0003537347795633787, 0.0003828493219762104, 0.00041517688767673063, 0.00045068714217736007, 0.0004893648798719514, 0.0005311398297784606, 0.0005760959724897604, 0.0006241866818625697, 0.00067534060229161, 0.0007295120216703175, 0.0007867375202056556, 0.00084702149975344, 0.0009103261049980538, 0.000976697360607544, 0.001046184181770156, 0.0011188000414977899, 0.0011944092399743605, 0.0012730564419046215, 0.0013547197757430203, 0.0014394035452673572, 0.0015269066196715306, 0.0016175658016292192, 0.0017113538530254156, 0.0018082288964809644, 0.0019074086707092258, 0.0020102102191501834, 0.002115750178775707, 0.0022249923434846707, 0.002324224442263978, 0.0024546715656463027, 0.0025707750602413674, 0.0026886907797787993, 0.0028092893752555753, 0.0029332425986383416, 0.003059760096689252, 0.0031892620828723227, 0.0033216131163189126, 0.00345667963318062, 0.003594116005810746, 0.00373401564369845, 0.003876285696289593, 0.004020837780560375, 0.004167535061341574, 0.004316384032044447, 0.004467271202856345, 0.004620059305184111, 0.00477464934326076, 0.004931017978539705, 0.005089107569792517, 0.005248795189805357, 0.005410043882397958, 0.00557279812512997, 0.005736960631925176, 0.005902264421456515, 0.006068673112862706, 0.006236075536115428, 0.006404404103216645, 0.006573347381526989, 0.006743241263261084, 0.006913918086775748, 0.007085185727911214, 0.007255841416075524, 0.007427788300814843, 0.007599440425756014, 0.007771491831017079, 0.007940210385740073, 0.008115982431613405, 0.008286230477311076, 0.008455728261315427, 0.008624828065636171, 0.0087938382520137, 0.008961934603559608, 0.009129309914478244, 0.009295705048569773, 0.009460895719293651, 0.009624512383898252, 0.009786590519239425, 0.009946995212091796, 0.010105592312872629, 0.010262212502414601, 0.010416818688520148, 0.010569268906811192, 0.010719396502249774, 0.010867082742078902, 0.011012274230511132, 0.011154883295408143, 0.01129473907939671, 0.011431766458575066, 0.011565861880187342, 0.011696890630696698, 0.011824548066976817, 0.011948823922340134, 0.012069629781346847, 0.012186937947306629, 0.012300432892104241, 0.01241055721228422, 0.012517086983512674, 0.012619772868365714, 0.01271694508250919, 0.012811738843612799, 0.012901614577029171, 0.012987520090940792, 0.013067705672196494, 0.013146659639966262, 0.013218602399208508, 0.013285987093409357, 0.013349032229359648, 0.013407929990549725, 0.013461999810303231, 0.013511437444384976, 0.013556082697096088, 0.013595835757053917, 0.013630499982440026, 0.01366023670087255, 0.013685042776887582, 0.013704903172994373, 0.013719772986706352, 0.013729721512429531, 0.01373472352074017, 0.01373472352074017, 0.013729721512429531, 0.013719772986706352, 0.013704903172994373, 0.013685042776887582, 0.01366023670087255, 0.013630499982440026, 0.013595835757053917, 0.013556082697096088, 0.013511437444384976, 0.013461999810303231, 0.013407929990549725, 0.013349032229359648, 0.013285987093409357, 0.013218602399208508, 0.013146659639966262, 0.013067705672196494, 0.012987520090940792, 0.012901614577029171, 0.012811738843612799, 0.01271694508250919, 0.012619772868365714, 0.012517086983512674, 0.01241055721228422, 0.012300432892104241, 0.012186937947306629, 0.012069629781346847, 0.011948823922340134, 0.011824548066976817, 0.011696890630696698, 0.011565861880187342, 0.011431766458575066, 0.01129473907939671, 0.011154883295408143, 0.011012274230511132, 0.010867082742078902, 0.010719396502249774, 0.010569268906811192, 0.010416818688520148, 0.010262212502414601, 0.010105592312872629, 0.009946995212091796, 0.009786590519239425, 0.009624512383898252, 0.009460895719293651, 0.009295705048569773, 0.009129309914478244, 0.008961934603559608, 0.0087938382520137, 0.008624828065636171, 0.008455728261315427, 0.008286230477311076, 0.008115982431613405, 0.007940210385740073, 0.007771491831017079, 0.007599440425756014, 0.007427788300814843, 0.007255841416075524, 0.007085185727911214, 0.006913918086775748, 0.006743241263261084, 0.006573347381526989, 0.006404404103216645, 0.006236075536115428, 0.006068673112862706, 0.005902264421456515, 0.005736960631925176, 0.00557279812512997, 0.005410043882397958, 0.005248795189805357, 0.005089107569792517, 0.004931017978539705, 0.00477464934326076, 0.004620059305184111, 0.004467271202856345, 0.004316384032044447, 0.004167535061341574, 0.004020837780560375, 0.003876285696289593, 0.00373401564369845, 0.003594116005810746, 0.00345667963318062, 0.0033216131163189126, 0.0031892620828723227, 0.003059760096689252, 0.0029332425986383416, 0.0028092893752555753, 0.0026886907797787993, 0.0025707750602413674, 0.0024546715656463027, 0.002324224442263978, 0.0022249923434846707, 0.002115750178775707, 0.0020102102191501834, 0.0019074086707092258, 0.0018082288964809644, 0.0017113538530254156, 0.0016175658016292192, 0.0015269066196715306, 0.0014394035452673572, 0.0013547197757430203, 0.0012730564419046215, 0.0011944092399743605, 0.0011188000414977899, 0.001046184181770156, 0.000976697360607544, 0.0009103261049980538, 0.00084702149975344, 0.0007867375202056556, 0.0007295120216703175, 0.00067534060229161, 0.0006241866818625697, 0.0005760959724897604, 0.0005311398297784606, 0.0004893648798719514, 0.00045068714217736007, 0.00041517688767673063, 0.0003828493219762104, 0.0003537347795633787, 0.0003276748319944884, 0.00030498547559247845, 0.0002857208679875607, 0.0002699368701027846, 0.0002570861260137623, 0.0002481761013286244, 0.00024263723882202515, 0.00024079274850113426, -0.007573012406345277
29+const float __leaf_table_fir64XLow[256] = { -0.007573012406345277, 0.00024079274850113426, 0.00024263723882202515, 0.0002481761013286244, 0.0002570861260137623, 0.0002699368701027846, 0.0002857208679875607, 0.00030498547559247845, 0.0003276748319944884, 0.0003537347795633787, 0.0003828493219762104, 0.00041517688767673063, 0.00045068714217736007, 0.0004893648798719514, 0.0005311398297784606, 0.0005760959724897604, 0.0006241866818625697, 0.00067534060229161, 0.0007295120216703175, 0.0007867375202056556, 0.00084702149975344, 0.0009103261049980538, 0.000976697360607544, 0.001046184181770156, 0.0011188000414977899, 0.0011944092399743605, 0.0012730564419046215, 0.0013547197757430203, 0.0014394035452673572, 0.0015269066196715306, 0.0016175658016292192, 0.0017113538530254156, 0.0018082288964809644, 0.0019074086707092258, 0.0020102102191501834, 0.002115750178775707, 0.0022249923434846707, 0.002324224442263978, 0.0024546715656463027, 0.0025707750602413674, 0.0026886907797787993, 0.0028092893752555753, 0.0029332425986383416, 0.003059760096689252, 0.0031892620828723227, 0.0033216131163189126, 0.00345667963318062, 0.003594116005810746, 0.00373401564369845, 0.003876285696289593, 0.004020837780560375, 0.004167535061341574, 0.004316384032044447, 0.004467271202856345, 0.004620059305184111, 0.00477464934326076, 0.004931017978539705, 0.005089107569792517, 0.005248795189805357, 0.005410043882397958, 0.00557279812512997, 0.005736960631925176, 0.005902264421456515, 0.006068673112862706, 0.006236075536115428, 0.006404404103216645, 0.006573347381526989, 0.006743241263261084, 0.006913918086775748, 0.007085185727911214, 0.007255841416075524, 0.007427788300814843, 0.007599440425756014, 0.007771491831017079, 0.007940210385740073, 0.008115982431613405, 0.008286230477311076, 0.008455728261315427, 0.008624828065636171, 0.0087938382520137, 0.008961934603559608, 0.009129309914478244, 0.009295705048569773, 0.009460895719293651, 0.009624512383898252, 0.009786590519239425, 0.009946995212091796, 0.010105592312872629, 0.010262212502414601, 0.010416818688520148, 0.010569268906811192, 0.010719396502249774, 0.010867082742078902, 0.011012274230511132, 0.011154883295408143, 0.01129473907939671, 0.011431766458575066, 0.011565861880187342, 0.011696890630696698, 0.011824548066976817, 0.011948823922340134, 0.012069629781346847, 0.012186937947306629, 0.012300432892104241, 0.01241055721228422, 0.012517086983512674, 0.012619772868365714, 0.01271694508250919, 0.012811738843612799, 0.012901614577029171, 0.012987520090940792, 0.013067705672196494, 0.013146659639966262, 0.013218602399208508, 0.013285987093409357, 0.013349032229359648, 0.013407929990549725, 0.013461999810303231, 0.013511437444384976, 0.013556082697096088, 0.013595835757053917, 0.013630499982440026, 0.01366023670087255, 0.013685042776887582, 0.013704903172994373, 0.013719772986706352, 0.013729721512429531, 0.01373472352074017, 0.01373472352074017, 0.013729721512429531, 0.013719772986706352, 0.013704903172994373, 0.013685042776887582, 0.01366023670087255, 0.013630499982440026, 0.013595835757053917, 0.013556082697096088, 0.013511437444384976, 0.013461999810303231, 0.013407929990549725, 0.013349032229359648, 0.013285987093409357, 0.013218602399208508, 0.013146659639966262, 0.013067705672196494, 0.012987520090940792, 0.012901614577029171, 0.012811738843612799, 0.01271694508250919, 0.012619772868365714, 0.012517086983512674, 0.01241055721228422, 0.012300432892104241, 0.012186937947306629, 0.012069629781346847, 0.011948823922340134, 0.011824548066976817, 0.011696890630696698, 0.011565861880187342, 0.011431766458575066, 0.01129473907939671, 0.011154883295408143, 0.011012274230511132, 0.010867082742078902, 0.010719396502249774, 0.010569268906811192, 0.010416818688520148, 0.010262212502414601, 0.010105592312872629, 0.009946995212091796, 0.009786590519239425, 0.009624512383898252, 0.009460895719293651, 0.009295705048569773, 0.009129309914478244, 0.008961934603559608, 0.0087938382520137, 0.008624828065636171, 0.008455728261315427, 0.008286230477311076, 0.008115982431613405, 0.007940210385740073, 0.007771491831017079, 0.007599440425756014, 0.007427788300814843, 0.007255841416075524, 0.007085185727911214, 0.006913918086775748, 0.006743241263261084, 0.006573347381526989, 0.006404404103216645, 0.006236075536115428, 0.006068673112862706, 0.005902264421456515, 0.005736960631925176, 0.00557279812512997, 0.005410043882397958, 0.005248795189805357, 0.005089107569792517, 0.004931017978539705, 0.00477464934326076, 0.004620059305184111, 0.004467271202856345, 0.004316384032044447, 0.004167535061341574, 0.004020837780560375, 0.003876285696289593, 0.00373401564369845, 0.003594116005810746, 0.00345667963318062, 0.0033216131163189126, 0.0031892620828723227, 0.003059760096689252, 0.0029332425986383416, 0.0028092893752555753, 0.0026886907797787993, 0.0025707750602413674, 0.0024546715656463027, 0.002324224442263978, 0.0022249923434846707, 0.002115750178775707, 0.0020102102191501834, 0.0019074086707092258, 0.0018082288964809644, 0.0017113538530254156, 0.0016175658016292192, 0.0015269066196715306, 0.0014394035452673572, 0.0013547197757430203, 0.0012730564419046215, 0.0011944092399743605, 0.0011188000414977899, 0.001046184181770156, 0.000976697360607544, 0.0009103261049980538, 0.00084702149975344, 0.0007867375202056556, 0.0007295120216703175, 0.00067534060229161, 0.0006241866818625697, 0.0005760959724897604, 0.0005311398297784606, 0.0004893648798719514, 0.00045068714217736007, 0.00041517688767673063, 0.0003828493219762104, 0.0003537347795633787, 0.0003276748319944884, 0.00030498547559247845, 0.0002857208679875607, 0.0002699368701027846, 0.0002570861260137623, 0.0002481761013286244, 0.00024263723882202515, 0.00024079274850113426, -0.007573012406345277
3030 };
3131
32−const float fir2XHigh[128] = { -2.84059575423864e-7, -0.00000136947295895967, -0.00000213110629785921, 5.807441351521463e-7, 0.000005239591854415941, 0.0000017841093721093506, -0.000011653029986124283, -0.000012481751035611902, 0.000014692437654954816, 0.00003091988960026406, -0.000011636477685383897, -0.00006163665493961978, -0.00001118322316939516, 0.0000961395818492714, 0.00006083206665324362, -0.00012648324239817438, -0.0001504708418330321, 0.00012753607518766694, 0.00027753923597010266, -0.00007473591299809917, -0.0004344444061086839, -0.00006832501012358436, 0.0005862297350582802, 0.00032465365599127654, -0.0006850628390191059, -0.0007096577214822187, 0.0006552234666252462, 0.0012010034203710784, -0.00041922406056782083, -0.0017446179378994388, -0.00010392099105524336, 0.002230631291161319, 0.0009594567093737222, -0.0025128059157130817, -0.002149706133662562, 0.0024038381899768617, 0.0035931253272614688, -0.0017176062590590708, -0.005125004981810711, 0.0002868765073834209, 0.006475023818177746, 0.001977797493927114, -0.007294746305130189, -0.005063375113227534, 0.007166496494812792, 0.008801581540883702, -0.005659099397006974, -0.012862366201787455, 0.00235384598511852, 0.016726921191779598, 0.0031052434033518096, -0.01970178000552065, -0.011028401875416302, 0.020882193937533836, 0.021743369519245558, -0.019061942568474207, -0.03589474387520175, 0.012292311428695956, 0.05536768370150782, 0.0038607600693388554, -0.08741418160721261, -0.046877671142694095, 0.18124004024261609, 0.41210996873316647, 0.41210996873316647, 0.18124004024261609, -0.046877671142694095, -0.08741418160721261, 0.0038607600693388554, 0.05536768370150782, 0.012292311428695956, -0.03589474387520175, -0.019061942568474207, 0.021743369519245558, 0.020882193937533836, -0.011028401875416302, -0.01970178000552065, 0.0031052434033518096, 0.016726921191779598, 0.00235384598511852, -0.012862366201787455, -0.005659099397006974, 0.008801581540883702, 0.007166496494812792, -0.005063375113227534, -0.007294746305130189, 0.001977797493927114, 0.006475023818177746, 0.0002868765073834209, -0.005125004981810711, -0.0017176062590590708, 0.0035931253272614688, 0.0024038381899768617, -0.002149706133662562, -0.0025128059157130817, 0.0009594567093737222, 0.002230631291161319, -0.00010392099105524336, -0.0017446179378994388, -0.00041922406056782083, 0.0012010034203710784, 0.0006552234666252462, -0.0007096577214822187, -0.0006850628390191059, 0.00032465365599127654, 0.0005862297350582802, -0.00006832501012358436, -0.0004344444061086839, -0.00007473591299809917, 0.00027753923597010266, 0.00012753607518766694, -0.0001504708418330321, -0.00012648324239817438, 0.00006083206665324362, 0.0000961395818492714, -0.00001118322316939516, -0.00006163665493961978, -0.000011636477685383897, 0.00003091988960026406, 0.000014692437654954816, -0.000012481751035611902, -0.000011653029986124283, 0.0000017841093721093506, 0.000005239591854415941, 5.807441351521463e-7, -0.00000213110629785921, -0.00000136947295895967, -2.84059575423864e-7
32+const float __leaf_table_fir2XHigh[128] = { -2.84059575423864e-7, -0.00000136947295895967, -0.00000213110629785921, 5.807441351521463e-7, 0.000005239591854415941, 0.0000017841093721093506, -0.000011653029986124283, -0.000012481751035611902, 0.000014692437654954816, 0.00003091988960026406, -0.000011636477685383897, -0.00006163665493961978, -0.00001118322316939516, 0.0000961395818492714, 0.00006083206665324362, -0.00012648324239817438, -0.0001504708418330321, 0.00012753607518766694, 0.00027753923597010266, -0.00007473591299809917, -0.0004344444061086839, -0.00006832501012358436, 0.0005862297350582802, 0.00032465365599127654, -0.0006850628390191059, -0.0007096577214822187, 0.0006552234666252462, 0.0012010034203710784, -0.00041922406056782083, -0.0017446179378994388, -0.00010392099105524336, 0.002230631291161319, 0.0009594567093737222, -0.0025128059157130817, -0.002149706133662562, 0.0024038381899768617, 0.0035931253272614688, -0.0017176062590590708, -0.005125004981810711, 0.0002868765073834209, 0.006475023818177746, 0.001977797493927114, -0.007294746305130189, -0.005063375113227534, 0.007166496494812792, 0.008801581540883702, -0.005659099397006974, -0.012862366201787455, 0.00235384598511852, 0.016726921191779598, 0.0031052434033518096, -0.01970178000552065, -0.011028401875416302, 0.020882193937533836, 0.021743369519245558, -0.019061942568474207, -0.03589474387520175, 0.012292311428695956, 0.05536768370150782, 0.0038607600693388554, -0.08741418160721261, -0.046877671142694095, 0.18124004024261609, 0.41210996873316647, 0.41210996873316647, 0.18124004024261609, -0.046877671142694095, -0.08741418160721261, 0.0038607600693388554, 0.05536768370150782, 0.012292311428695956, -0.03589474387520175, -0.019061942568474207, 0.021743369519245558, 0.020882193937533836, -0.011028401875416302, -0.01970178000552065, 0.0031052434033518096, 0.016726921191779598, 0.00235384598511852, -0.012862366201787455, -0.005659099397006974, 0.008801581540883702, 0.007166496494812792, -0.005063375113227534, -0.007294746305130189, 0.001977797493927114, 0.006475023818177746, 0.0002868765073834209, -0.005125004981810711, -0.0017176062590590708, 0.0035931253272614688, 0.0024038381899768617, -0.002149706133662562, -0.0025128059157130817, 0.0009594567093737222, 0.002230631291161319, -0.00010392099105524336, -0.0017446179378994388, -0.00041922406056782083, 0.0012010034203710784, 0.0006552234666252462, -0.0007096577214822187, -0.0006850628390191059, 0.00032465365599127654, 0.0005862297350582802, -0.00006832501012358436, -0.0004344444061086839, -0.00007473591299809917, 0.00027753923597010266, 0.00012753607518766694, -0.0001504708418330321, -0.00012648324239817438, 0.00006083206665324362, 0.0000961395818492714, -0.00001118322316939516, -0.00006163665493961978, -0.000011636477685383897, 0.00003091988960026406, 0.000014692437654954816, -0.000012481751035611902, -0.000011653029986124283, 0.0000017841093721093506, 0.000005239591854415941, 5.807441351521463e-7, -0.00000213110629785921, -0.00000136947295895967, -2.84059575423864e-7
3333 };
34−const float fir4XHigh[256] = { -0.000005005316694254475, -0.000010486216859223391, -0.000020341389435584184, -0.000028297461945285203, -0.00003403970018224806, -0.00003356141383522181, -0.000028580071407296435, -0.000021726870316473222, -0.000018929805847104457, -0.000024937785475375726, -0.00004148092321827023, -0.00006494904958257674, -0.00008704299086494871, -0.00009817726370665003, -0.00009207287115371104, -0.000070350790919461, -0.000043204247279965386, -0.000026338754429996997, -0.00003337527183661095, -0.00006864404983689099, -0.00012208654155480072, -0.00017229784061896603, -0.00019443471041769651, -0.0001738448733058993, -0.00011458014625437172, -0.00004241909459592675, 0.000005858218684625342, -0.000001824861163195929, -0.00007376494795165521, -0.0001870435534541462, -0.00029242213522170924, -0.00033660459070401045, -0.00028781004597914193, -0.00015737268974254042, 2.4069038430437714e-7, 0.00010675981100488967, 0.00009819903503597289, -0.000041503003504151876, -0.00026298229853436046, -0.0004679330143401381, -0.000550680089032831, -0.00045235278384860993, -0.0001968527747134386, 0.00010787721721971545, 0.00031390651451180623, 0.0003015617300329922, 0.00004577001768172358, -0.0003593242009009715, -0.0007303801286775824, -0.0008768456304295432, -0.0006955854650565154, -0.00023554905807185743, 0.00030790928383371996, 0.0006717577010285365, 0.0006504775398685704, 0.00020580176646200433, -0.0004919858457618222, -0.0011250441730682327, -0.001368894036877941, -0.0010555177901930952, -0.00027554321698262794, 0.0006358082850902164, 0.0012391753523202087, 0.0011981314765901019, 0.0004602570434921762, -0.0006853292543951153, -0.0017133793271509106, -0.0020995520812018714, -0.0015812527530506791, -0.00031822317984990035, 0.0011425257824338887, 0.0020968295391595774, 0.0020180799074488486, 0.000837174097496827, -0.0009743823002432432, -0.0025836938014065975, -0.00317200799245191, -0.0023436048910665127, -0.0003642960983689493, 0.0019025392919524162, 0.0033649169125380706, 0.003219398725098763, 0.0013786588356217962, -0.001415068708295585, -0.003874469283244301, -0.004750945120551563, -0.0034548726172607498, -0.0004124431830693066, 0.003046185830666762, 0.005254266475282044, 0.004999101428335298, 0.002164099554982996, -0.0021053850268023615, -0.005843180111542266, -0.0071497618238720055, -0.0051353491910507984, -0.0004583930086451031, 0.004842595616255233, 0.008213402548972962, 0.00778770755309392, 0.003376641721920036, -0.003263596560752136, -0.00908888688929085, -0.011124936147882954, -0.007935453568187856, -0.0004986705357686102, 0.007998600315936934, 0.013466881500422878, 0.012810645017913123, 0.0055655403444453775, -0.00554207852540761, -0.015510462180576574, -0.019193722858760427, -0.013786276388279539, -0.0005292356782833587, 0.01526523041211863, 0.026109899142542758, 0.02555053211054643, 0.011414259133477645, -0.01233979307221452, -0.036160130412882435, -0.04790631293501779, -0.03735668670551693, -0.0005458966005379449, 0.0578178869957579, 0.12496957303698586, 0.18372600900451644, 0.21795911568314993, 0.21795911568314993, 0.18372600900451644, 0.12496957303698586, 0.0578178869957579, -0.0005458966005379449, -0.03735668670551693, -0.04790631293501779, -0.036160130412882435, -0.01233979307221452, 0.011414259133477645, 0.02555053211054643, 0.026109899142542758, 0.01526523041211863, -0.0005292356782833587, -0.013786276388279539, -0.019193722858760427, -0.015510462180576574, -0.00554207852540761, 0.0055655403444453775, 0.012810645017913123, 0.013466881500422878, 0.007998600315936934, -0.0004986705357686102, -0.007935453568187856, -0.011124936147882954, -0.00908888688929085, -0.003263596560752136, 0.003376641721920036, 0.00778770755309392, 0.008213402548972962, 0.004842595616255233, -0.0004583930086451031, -0.0051353491910507984, -0.0071497618238720055, -0.005843180111542266, -0.0021053850268023615, 0.002164099554982996, 0.004999101428335298, 0.005254266475282044, 0.003046185830666762, -0.0004124431830693066, -0.0034548726172607498, -0.004750945120551563, -0.003874469283244301, -0.001415068708295585, 0.0013786588356217962, 0.003219398725098763, 0.0033649169125380706, 0.0019025392919524162, -0.0003642960983689493, -0.0023436048910665127, -0.00317200799245191, -0.0025836938014065975, -0.0009743823002432432, 0.000837174097496827, 0.0020180799074488486, 0.0020968295391595774, 0.0011425257824338887, -0.00031822317984990035, -0.0015812527530506791, -0.0020995520812018714, -0.0017133793271509106, -0.0006853292543951153, 0.0004602570434921762, 0.0011981314765901019, 0.0012391753523202087, 0.0006358082850902164, -0.00027554321698262794, -0.0010555177901930952, -0.001368894036877941, -0.0011250441730682327, -0.0004919858457618222, 0.00020580176646200433, 0.0006504775398685704, 0.0006717577010285365, 0.00030790928383371996, -0.00023554905807185743, -0.0006955854650565154, -0.0008768456304295432, -0.0007303801286775824, -0.0003593242009009715, 0.00004577001768172358, 0.0003015617300329922, 0.00031390651451180623, 0.00010787721721971545, -0.0001968527747134386, -0.00045235278384860993, -0.000550680089032831, -0.0004679330143401381, -0.00026298229853436046, -0.000041503003504151876, 0.00009819903503597289, 0.00010675981100488967, 2.4069038430437714e-7, -0.00015737268974254042, -0.00028781004597914193, -0.00033660459070401045, -0.00029242213522170924, -0.0001870435534541462, -0.00007376494795165521, -0.000001824861163195929, 0.000005858218684625342, -0.00004241909459592675, -0.00011458014625437172, -0.0001738448733058993, -0.00019443471041769651, -0.00017229784061896603, -0.00012208654155480072, -0.00006864404983689099, -0.00003337527183661095, -0.000026338754429996997, -0.000043204247279965386, -0.000070350790919461, -0.00009207287115371104, -0.00009817726370665003, -0.00008704299086494871, -0.00006494904958257674, -0.00004148092321827023, -0.000024937785475375726, -0.000018929805847104457, -0.000021726870316473222, -0.000028580071407296435, -0.00003356141383522181, -0.00003403970018224806, -0.000028297461945285203, -0.000020341389435584184, -0.000010486216859223391, -0.000005005316694254475
34+const float __leaf_table_fir4XHigh[256] = { -0.000005005316694254475, -0.000010486216859223391, -0.000020341389435584184, -0.000028297461945285203, -0.00003403970018224806, -0.00003356141383522181, -0.000028580071407296435, -0.000021726870316473222, -0.000018929805847104457, -0.000024937785475375726, -0.00004148092321827023, -0.00006494904958257674, -0.00008704299086494871, -0.00009817726370665003, -0.00009207287115371104, -0.000070350790919461, -0.000043204247279965386, -0.000026338754429996997, -0.00003337527183661095, -0.00006864404983689099, -0.00012208654155480072, -0.00017229784061896603, -0.00019443471041769651, -0.0001738448733058993, -0.00011458014625437172, -0.00004241909459592675, 0.000005858218684625342, -0.000001824861163195929, -0.00007376494795165521, -0.0001870435534541462, -0.00029242213522170924, -0.00033660459070401045, -0.00028781004597914193, -0.00015737268974254042, 2.4069038430437714e-7, 0.00010675981100488967, 0.00009819903503597289, -0.000041503003504151876, -0.00026298229853436046, -0.0004679330143401381, -0.000550680089032831, -0.00045235278384860993, -0.0001968527747134386, 0.00010787721721971545, 0.00031390651451180623, 0.0003015617300329922, 0.00004577001768172358, -0.0003593242009009715, -0.0007303801286775824, -0.0008768456304295432, -0.0006955854650565154, -0.00023554905807185743, 0.00030790928383371996, 0.0006717577010285365, 0.0006504775398685704, 0.00020580176646200433, -0.0004919858457618222, -0.0011250441730682327, -0.001368894036877941, -0.0010555177901930952, -0.00027554321698262794, 0.0006358082850902164, 0.0012391753523202087, 0.0011981314765901019, 0.0004602570434921762, -0.0006853292543951153, -0.0017133793271509106, -0.0020995520812018714, -0.0015812527530506791, -0.00031822317984990035, 0.0011425257824338887, 0.0020968295391595774, 0.0020180799074488486, 0.000837174097496827, -0.0009743823002432432, -0.0025836938014065975, -0.00317200799245191, -0.0023436048910665127, -0.0003642960983689493, 0.0019025392919524162, 0.0033649169125380706, 0.003219398725098763, 0.0013786588356217962, -0.001415068708295585, -0.003874469283244301, -0.004750945120551563, -0.0034548726172607498, -0.0004124431830693066, 0.003046185830666762, 0.005254266475282044, 0.004999101428335298, 0.002164099554982996, -0.0021053850268023615, -0.005843180111542266, -0.0071497618238720055, -0.0051353491910507984, -0.0004583930086451031, 0.004842595616255233, 0.008213402548972962, 0.00778770755309392, 0.003376641721920036, -0.003263596560752136, -0.00908888688929085, -0.011124936147882954, -0.007935453568187856, -0.0004986705357686102, 0.007998600315936934, 0.013466881500422878, 0.012810645017913123, 0.0055655403444453775, -0.00554207852540761, -0.015510462180576574, -0.019193722858760427, -0.013786276388279539, -0.0005292356782833587, 0.01526523041211863, 0.026109899142542758, 0.02555053211054643, 0.011414259133477645, -0.01233979307221452, -0.036160130412882435, -0.04790631293501779, -0.03735668670551693, -0.0005458966005379449, 0.0578178869957579, 0.12496957303698586, 0.18372600900451644, 0.21795911568314993, 0.21795911568314993, 0.18372600900451644, 0.12496957303698586, 0.0578178869957579, -0.0005458966005379449, -0.03735668670551693, -0.04790631293501779, -0.036160130412882435, -0.01233979307221452, 0.011414259133477645, 0.02555053211054643, 0.026109899142542758, 0.01526523041211863, -0.0005292356782833587, -0.013786276388279539, -0.019193722858760427, -0.015510462180576574, -0.00554207852540761, 0.0055655403444453775, 0.012810645017913123, 0.013466881500422878, 0.007998600315936934, -0.0004986705357686102, -0.007935453568187856, -0.011124936147882954, -0.00908888688929085, -0.003263596560752136, 0.003376641721920036, 0.00778770755309392, 0.008213402548972962, 0.004842595616255233, -0.0004583930086451031, -0.0051353491910507984, -0.0071497618238720055, -0.005843180111542266, -0.0021053850268023615, 0.002164099554982996, 0.004999101428335298, 0.005254266475282044, 0.003046185830666762, -0.0004124431830693066, -0.0034548726172607498, -0.004750945120551563, -0.003874469283244301, -0.001415068708295585, 0.0013786588356217962, 0.003219398725098763, 0.0033649169125380706, 0.0019025392919524162, -0.0003642960983689493, -0.0023436048910665127, -0.00317200799245191, -0.0025836938014065975, -0.0009743823002432432, 0.000837174097496827, 0.0020180799074488486, 0.0020968295391595774, 0.0011425257824338887, -0.00031822317984990035, -0.0015812527530506791, -0.0020995520812018714, -0.0017133793271509106, -0.0006853292543951153, 0.0004602570434921762, 0.0011981314765901019, 0.0012391753523202087, 0.0006358082850902164, -0.00027554321698262794, -0.0010555177901930952, -0.001368894036877941, -0.0011250441730682327, -0.0004919858457618222, 0.00020580176646200433, 0.0006504775398685704, 0.0006717577010285365, 0.00030790928383371996, -0.00023554905807185743, -0.0006955854650565154, -0.0008768456304295432, -0.0007303801286775824, -0.0003593242009009715, 0.00004577001768172358, 0.0003015617300329922, 0.00031390651451180623, 0.00010787721721971545, -0.0001968527747134386, -0.00045235278384860993, -0.000550680089032831, -0.0004679330143401381, -0.00026298229853436046, -0.000041503003504151876, 0.00009819903503597289, 0.00010675981100488967, 2.4069038430437714e-7, -0.00015737268974254042, -0.00028781004597914193, -0.00033660459070401045, -0.00029242213522170924, -0.0001870435534541462, -0.00007376494795165521, -0.000001824861163195929, 0.000005858218684625342, -0.00004241909459592675, -0.00011458014625437172, -0.0001738448733058993, -0.00019443471041769651, -0.00017229784061896603, -0.00012208654155480072, -0.00006864404983689099, -0.00003337527183661095, -0.000026338754429996997, -0.000043204247279965386, -0.000070350790919461, -0.00009207287115371104, -0.00009817726370665003, -0.00008704299086494871, -0.00006494904958257674, -0.00004148092321827023, -0.000024937785475375726, -0.000018929805847104457, -0.000021726870316473222, -0.000028580071407296435, -0.00003356141383522181, -0.00003403970018224806, -0.000028297461945285203, -0.000020341389435584184, -0.000010486216859223391, -0.000005005316694254475
3535 };
36−const float fir8XHigh[256] = { 0.00003151783634577697, 0.00009875809063575779, 0.00011952623149469952, 0.00019849261073490482, 0.0002696485066015727, 0.0003584099608999308, 0.00044625388761023913, 0.0005319258847527823, 0.0006044238440905041, 0.0006561179367621888, 0.0006780841482803052, 0.0006636425833116022, 0.0006082918945412483, 0.0005111129662557197, 0.00037520607336543075, 0.00020804636935322743, 0.000021269501878054377, -0.00017002451555728345, -0.00034851615605358005, -0.0004962768841556523, -0.0005966792410792791, -0.0006363992327126103, -0.0006072812580573203, -0.0005078006712943802, -0.00034391453642163835, -0.0001291740152058233, 0.00011608199926386939, 0.0003663883172395964, 0.0005935643814352129, 0.0007697197860148682, 0.0008705060394986916, 0.0008782421413312541, 0.0007845404678866458, 0.0005921472961030223, 0.0003155390021514345, -0.00001975662025403667, -0.0003792242746719516, -0.0007226903878816747, -0.0010085916592065419, -0.0011987843551975912, -0.0012633390417589486, -0.0011847927602402282, -0.0009612078105002279, -0.000607656728473499, -0.00015580100244720835, 0.0003485912201162041, 0.0008499567444557006, 0.0012888238057625968, 0.0016085750487669262, 0.0017624573232133487, 0.0017198572703654494, 0.0014712649629561752, 0.0010309092850789008, 0.0004369297346610886, -0.0002514846038907312, -0.0009595058667715721, -0.0016045955886596882, -0.002105611566700304, -0.002392827139552557, -0.0024168530933362325, -0.00215621955374809, -0.0016217376891380843, -0.0008577023023227786, 0.00006118480472750677, 0.0010364584424907685, 0.001956049351551786, 0.002706696800527712, 0.00318733017834542, 0.003322096376141488, 0.0030709922507173265, 0.0024373280210738995, 0.0014701293295941087, 0.0002616176696267551, -0.0010608870493178752, -0.002347699681593795, -0.0034429894732297774, -0.004203029219555798, -0.00451398893736866, -0.004307677839041472, -0.0035726927213363046, -0.0023597776381211666, -0.0007800969761600126, 0.00100380173046076, 0.0027935634872831047, 0.0043761562977185555, 0.005547954061740437, 0.006139532362567163, 0.006038187372164252, 0.005205193104614497, 0.003685832364921369, 0.001610065959141185, -0.000816509624547802, -0.003331179568244694, -0.005640769473740277, -0.007453565321222198, -0.008513609412918493, -0.008633348531283494, -0.0077207439401804495, -0.005797651634024999, -0.003006470630061831, 0.00039645931697321107, 0.004060688288708085, 0.007573881722373314, 0.010503477916637444, 0.012443852783009171, 0.013064660267980682, 0.012154652149365373, 0.009656403107118496, 0.005687627159122434, 0.000545686660735971, -0.0053060804504155646, -0.011269885881064536, -0.016661104177372186, -0.02076782817847515, -0.022917127850131423, -0.022542073972735464, -0.01924294503235089, -0.012836088871532723, -0.0033855865368634104, 0.008786222880026725, 0.023111259021133423, 0.038810833745067747, 0.05495087979175688, 0.0705128544598909, 0.08447430461530625, 0.0958915908436123, 0.10397774191970133, 0.10816816138474043, 0.10816816138474043, 0.10397774191970133, 0.0958915908436123, 0.08447430461530625, 0.0705128544598909, 0.05495087979175688, 0.038810833745067747, 0.023111259021133423, 0.008786222880026725, -0.0033855865368634104, -0.012836088871532723, -0.01924294503235089, -0.022542073972735464, -0.022917127850131423, -0.02076782817847515, -0.016661104177372186, -0.011269885881064536, -0.0053060804504155646, 0.000545686660735971, 0.005687627159122434, 0.009656403107118496, 0.012154652149365373, 0.013064660267980682, 0.012443852783009171, 0.010503477916637444, 0.007573881722373314, 0.004060688288708085, 0.00039645931697321107, -0.003006470630061831, -0.005797651634024999, -0.0077207439401804495, -0.008633348531283494, -0.008513609412918493, -0.007453565321222198, -0.005640769473740277, -0.003331179568244694, -0.000816509624547802, 0.001610065959141185, 0.003685832364921369, 0.005205193104614497, 0.006038187372164252, 0.006139532362567163, 0.005547954061740437, 0.0043761562977185555, 0.0027935634872831047, 0.00100380173046076, -0.0007800969761600126, -0.0023597776381211666, -0.0035726927213363046, -0.004307677839041472, -0.00451398893736866, -0.004203029219555798, -0.0034429894732297774, -0.002347699681593795, -0.0010608870493178752, 0.0002616176696267551, 0.0014701293295941087, 0.0024373280210738995, 0.0030709922507173265, 0.003322096376141488, 0.00318733017834542, 0.002706696800527712, 0.001956049351551786, 0.0010364584424907685, 0.00006118480472750677, -0.0008577023023227786, -0.0016217376891380843, -0.00215621955374809, -0.0024168530933362325, -0.002392827139552557, -0.002105611566700304, -0.0016045955886596882, -0.0009595058667715721, -0.0002514846038907312, 0.0004369297346610886, 0.0010309092850789008, 0.0014712649629561752, 0.0017198572703654494, 0.0017624573232133487, 0.0016085750487669262, 0.0012888238057625968, 0.0008499567444557006, 0.0003485912201162041, -0.00015580100244720835, -0.000607656728473499, -0.0009612078105002279, -0.0011847927602402282, -0.0012633390417589486, -0.0011987843551975912, -0.0010085916592065419, -0.0007226903878816747, -0.0003792242746719516, -0.00001975662025403667, 0.0003155390021514345, 0.0005921472961030223, 0.0007845404678866458, 0.0008782421413312541, 0.0008705060394986916, 0.0007697197860148682, 0.0005935643814352129, 0.0003663883172395964, 0.00011608199926386939, -0.0001291740152058233, -0.00034391453642163835, -0.0005078006712943802, -0.0006072812580573203, -0.0006363992327126103, -0.0005966792410792791, -0.0004962768841556523, -0.00034851615605358005, -0.00017002451555728345, 0.000021269501878054377, 0.00020804636935322743, 0.00037520607336543075, 0.0005111129662557197, 0.0006082918945412483, 0.0006636425833116022, 0.0006780841482803052, 0.0006561179367621888, 0.0006044238440905041, 0.0005319258847527823, 0.00044625388761023913, 0.0003584099608999308, 0.0002696485066015727, 0.00019849261073490482, 0.00011952623149469952, 0.00009875809063575779, 0.00003151783634577697
36+const float __leaf_table_fir8XHigh[256] = { 0.00003151783634577697, 0.00009875809063575779, 0.00011952623149469952, 0.00019849261073490482, 0.0002696485066015727, 0.0003584099608999308, 0.00044625388761023913, 0.0005319258847527823, 0.0006044238440905041, 0.0006561179367621888, 0.0006780841482803052, 0.0006636425833116022, 0.0006082918945412483, 0.0005111129662557197, 0.00037520607336543075, 0.00020804636935322743, 0.000021269501878054377, -0.00017002451555728345, -0.00034851615605358005, -0.0004962768841556523, -0.0005966792410792791, -0.0006363992327126103, -0.0006072812580573203, -0.0005078006712943802, -0.00034391453642163835, -0.0001291740152058233, 0.00011608199926386939, 0.0003663883172395964, 0.0005935643814352129, 0.0007697197860148682, 0.0008705060394986916, 0.0008782421413312541, 0.0007845404678866458, 0.0005921472961030223, 0.0003155390021514345, -0.00001975662025403667, -0.0003792242746719516, -0.0007226903878816747, -0.0010085916592065419, -0.0011987843551975912, -0.0012633390417589486, -0.0011847927602402282, -0.0009612078105002279, -0.000607656728473499, -0.00015580100244720835, 0.0003485912201162041, 0.0008499567444557006, 0.0012888238057625968, 0.0016085750487669262, 0.0017624573232133487, 0.0017198572703654494, 0.0014712649629561752, 0.0010309092850789008, 0.0004369297346610886, -0.0002514846038907312, -0.0009595058667715721, -0.0016045955886596882, -0.002105611566700304, -0.002392827139552557, -0.0024168530933362325, -0.00215621955374809, -0.0016217376891380843, -0.0008577023023227786, 0.00006118480472750677, 0.0010364584424907685, 0.001956049351551786, 0.002706696800527712, 0.00318733017834542, 0.003322096376141488, 0.0030709922507173265, 0.0024373280210738995, 0.0014701293295941087, 0.0002616176696267551, -0.0010608870493178752, -0.002347699681593795, -0.0034429894732297774, -0.004203029219555798, -0.00451398893736866, -0.004307677839041472, -0.0035726927213363046, -0.0023597776381211666, -0.0007800969761600126, 0.00100380173046076, 0.0027935634872831047, 0.0043761562977185555, 0.005547954061740437, 0.006139532362567163, 0.006038187372164252, 0.005205193104614497, 0.003685832364921369, 0.001610065959141185, -0.000816509624547802, -0.003331179568244694, -0.005640769473740277, -0.007453565321222198, -0.008513609412918493, -0.008633348531283494, -0.0077207439401804495, -0.005797651634024999, -0.003006470630061831, 0.00039645931697321107, 0.004060688288708085, 0.007573881722373314, 0.010503477916637444, 0.012443852783009171, 0.013064660267980682, 0.012154652149365373, 0.009656403107118496, 0.005687627159122434, 0.000545686660735971, -0.0053060804504155646, -0.011269885881064536, -0.016661104177372186, -0.02076782817847515, -0.022917127850131423, -0.022542073972735464, -0.01924294503235089, -0.012836088871532723, -0.0033855865368634104, 0.008786222880026725, 0.023111259021133423, 0.038810833745067747, 0.05495087979175688, 0.0705128544598909, 0.08447430461530625, 0.0958915908436123, 0.10397774191970133, 0.10816816138474043, 0.10816816138474043, 0.10397774191970133, 0.0958915908436123, 0.08447430461530625, 0.0705128544598909, 0.05495087979175688, 0.038810833745067747, 0.023111259021133423, 0.008786222880026725, -0.0033855865368634104, -0.012836088871532723, -0.01924294503235089, -0.022542073972735464, -0.022917127850131423, -0.02076782817847515, -0.016661104177372186, -0.011269885881064536, -0.0053060804504155646, 0.000545686660735971, 0.005687627159122434, 0.009656403107118496, 0.012154652149365373, 0.013064660267980682, 0.012443852783009171, 0.010503477916637444, 0.007573881722373314, 0.004060688288708085, 0.00039645931697321107, -0.003006470630061831, -0.005797651634024999, -0.0077207439401804495, -0.008633348531283494, -0.008513609412918493, -0.007453565321222198, -0.005640769473740277, -0.003331179568244694, -0.000816509624547802, 0.001610065959141185, 0.003685832364921369, 0.005205193104614497, 0.006038187372164252, 0.006139532362567163, 0.005547954061740437, 0.0043761562977185555, 0.0027935634872831047, 0.00100380173046076, -0.0007800969761600126, -0.0023597776381211666, -0.0035726927213363046, -0.004307677839041472, -0.00451398893736866, -0.004203029219555798, -0.0034429894732297774, -0.002347699681593795, -0.0010608870493178752, 0.0002616176696267551, 0.0014701293295941087, 0.0024373280210738995, 0.0030709922507173265, 0.003322096376141488, 0.00318733017834542, 0.002706696800527712, 0.001956049351551786, 0.0010364584424907685, 0.00006118480472750677, -0.0008577023023227786, -0.0016217376891380843, -0.00215621955374809, -0.0024168530933362325, -0.002392827139552557, -0.002105611566700304, -0.0016045955886596882, -0.0009595058667715721, -0.0002514846038907312, 0.0004369297346610886, 0.0010309092850789008, 0.0014712649629561752, 0.0017198572703654494, 0.0017624573232133487, 0.0016085750487669262, 0.0012888238057625968, 0.0008499567444557006, 0.0003485912201162041, -0.00015580100244720835, -0.000607656728473499, -0.0009612078105002279, -0.0011847927602402282, -0.0012633390417589486, -0.0011987843551975912, -0.0010085916592065419, -0.0007226903878816747, -0.0003792242746719516, -0.00001975662025403667, 0.0003155390021514345, 0.0005921472961030223, 0.0007845404678866458, 0.0008782421413312541, 0.0008705060394986916, 0.0007697197860148682, 0.0005935643814352129, 0.0003663883172395964, 0.00011608199926386939, -0.0001291740152058233, -0.00034391453642163835, -0.0005078006712943802, -0.0006072812580573203, -0.0006363992327126103, -0.0005966792410792791, -0.0004962768841556523, -0.00034851615605358005, -0.00017002451555728345, 0.000021269501878054377, 0.00020804636935322743, 0.00037520607336543075, 0.0005111129662557197, 0.0006082918945412483, 0.0006636425833116022, 0.0006780841482803052, 0.0006561179367621888, 0.0006044238440905041, 0.0005319258847527823, 0.00044625388761023913, 0.0003584099608999308, 0.0002696485066015727, 0.00019849261073490482, 0.00011952623149469952, 0.00009875809063575779, 0.00003151783634577697
3737 };
38−const float fir16XHigh[512] = { -0.00004017374344384353, -0.00003227078919691645, -0.000044582740239682106, -0.000059425359817699515, -0.00007697752128893082, -0.00009737601811785888, -0.0001207053885646365, -0.0001469875004658367, -0.00017617089070723918, -0.00020812277783425573, -0.00024262055862920822, -0.0002793450290387454, -0.00031787504789909166, -0.0003576848687093178, -0.00039814402944626006, -0.0004385193477821247, -0.0004779801054675081, -0.0005156064224889276, -0.0005503998661674507, -0.0005812986840141297, -0.0006071960902571958, -0.0006269579055230081, -0.0006394482697590037, -0.0006435494696099878, -0.0006381976745823161, -0.0006223990810339609, -0.0005952724709135361, -0.0005560644539084499, -0.0005041884015231086, -0.00043924670962451254, -0.0003610522906867853, -0.00026965679983683306, -0.0001653614058088566, -0.00004873297752271577, 0.00007938716594862651, 0.0002178851248768366, 0.0003653745221459382, 0.0005202048736767491, 0.0006804822788501571, 0.000844091795557933, 0.0010087245432410705, 0.001171916285444633, 0.0013310914106543618, 0.0014836070887652329, 0.0016268044135357975, 0.0017580661564216042, 0.0018748692581644735, 0.0019748436871571654, 0.002055827323171664, 0.0021159244704237914, 0.002153555697975211, 0.002167506085967786, 0.0021569688626138744, 0.0021215783384772617, 0.002061435847387089, 0.0019771222276341416, 0.0018697088674027409, 0.0017407508215061904, 0.0015922694449783334, 0.0014267282165683897, 0.0012469961488860717, 0.001056296589672521, 0.0008581466323761644, 0.0006562897137528959, 0.0004546180492460159, 0.00025709020784146465, 0.00006764748603812152, -0.00010987539810307727, -0.00027183788464963423, -0.0004148795460643277, -0.0005360117384990369, -0.0006326924816840852, -0.0007028976477190042, -0.0007451789241688792, -0.0007587025992854616, -0.00074329154026803, -0.00069943732077003, -0.0006283153390612298, -0.0005317674541381928, -0.0004122736350806254, -0.0002728965175373041, -0.00011721898154916056, 0.000050727732077616854, 0.00022654511040849531, 0.0004055654685261572, 0.0005829725151929097, 0.0007539299891718014, 0.0009136968081628693, 0.001057727366040496, 0.0011817838315511687, 0.0012820768752281682, 0.0013553936088779655, 0.0013991567634035874, 0.0014114626691980761, 0.0013911994521601603, 0.001338158623469115, 0.0012529312652788224, 0.0011368782078168052, 0.0009924227419316402, 0.0008225367782712132, 0.0006311126153653432, 0.000422596130820185, 0.00020202566973633374, -0.000025140126274052846, -0.00025314012889659734, -0.00047605825978268214, -0.0006879757889763613, -0.0008831265836660278, -0.001056052961049124, -0.0012017570118505278, -0.0013158443800074546, -0.0013946550179738235, -0.00143537714856422, -0.0014361430413177665, -0.0013961025273104373, -0.0013154698934900741, -0.0011955448624625515, -0.001038705445344848, -0.000848370211905452, -0.0006289357238567322, -0.00038567726087640876, -0.00012464084542349136, 0.00014751424024790855, 0.00042365555592108265, 0.000696381707633601, 0.0009581911739190034, 0.0012016945125591883, 0.0014198129038021875, 0.0016059677163340854, 0.0017542822302381216, 0.0018597489437935104, 0.0019183843680031518, 0.001927370582069373, 0.0018851569558006424, 0.0017915316423764106, 0.0016476681649469273, 0.001456129721890939, 0.0012208322294896099, 0.0009469770920907817, 0.0006409478559993642, 0.0003101659717946291, -0.00003708137047780295, -0.0003918367361265021, -0.0007446984520565823, -0.0010860619549777095, -0.0014063764577860907, -0.001696397687712767, -0.0019474488265779002, -0.002151669227747982, -0.002302249012563522, -0.0023936395957784356, -0.0024217386080201218, -0.002384046464152241, -0.0022797724899456247, -0.0021099040224506474, -0.0018772300452061593, -0.001586318069799396, -0.0012434422926464283, -0.0008564627353582099, -0.0004346583284416864, 0.000011483258960353713, 0.0004705125435918996, 0.0009302983176219571, 0.0013783347882871506, 0.0018020649278141442, 0.002189218072448032, 0.002528151228372692, 0.0028081778185230755, 0.0030198855690580883, 0.0031554218226391927, 0.0032087539967944043, 0.003175891861997494, 0.003055052047477484, 0.0028467769761391067, 0.0025539826540715814, 0.0021819611806385975, 0.00173831289146853, 0.0012328190076443134, 0.0006772405314859651, 0.0000850660373523537, -0.0005287869617277397, -0.001148321137491392, -0.0017568578913237647, -0.002337465469832778, -0.0028733927792042916, -0.0033485134261990474, -0.0037477874636434095, -0.004057705229541436, -0.0042666789949867895, -0.004365411194693107, -0.004347246153946479, -0.0042084293493284755, -0.003948276264434998, -0.0035693427342337308, -0.003077468630328199, -0.002481682761858642, -0.0017941893541420268, -0.0010300505400156208, -0.00020699101191350578, 0.0006550244158311212, 0.0015341931983222652, 0.002407385154286287, 0.0032506853111441327, 0.004039981949981368, 0.004751579445675196, 0.0053628234864281235, 0.0058527242916193226, 0.006202559568610708, 0.006396443797782178, 0.006421849969755556, 0.006270068071543294, 0.005936587372391708, 0.0054213915962429745, 0.004729156264045173, 0.0038693427245538904, 0.0028561826064778697, 0.0017085458613360902, 0.0004497040612160084, -0.0008930343940838381, -0.002288760766598498, -0.0037035572532650445, -0.005101096327651239, -0.006443406350064504, -0.007691613708744422, -0.008806783345605503, -0.009750779708566895, -0.010487104621962649, -0.010981761556592558, -0.011204077521465777, -0.01112745993022714, -0.010730106123767362, -0.009995629398181848, -0.008913569832214968, -0.007479799008370572, -0.005696809921316997, -0.0035738648415050284, -0.0011270001382152866, 0.001621100228821588, 0.004641370935060121, 0.00789877655149075, 0.0113528526524623, 0.014958365872953214, 0.018666074072644187, 0.02242359380770534, 0.026176337546106928, 0.029868513059052665, 0.03344415058816331, 0.03684815553847075, 0.04002735371317269, 0.042931503142136666, 0.04551426282729147, 0.04773408588853776, 0.04955503013705371, 0.050947459773749655, 0.051888623369848716, 0.05236309938228361, 0.05236309938228361, 0.051888623369848716, 0.050947459773749655, 0.04955503013705371, 0.04773408588853776, 0.04551426282729147, 0.042931503142136666, 0.04002735371317269, 0.03684815553847075, 0.03344415058816331, 0.029868513059052665, 0.026176337546106928, 0.02242359380770534, 0.018666074072644187, 0.014958365872953214, 0.0113528526524623, 0.00789877655149075, 0.004641370935060121, 0.001621100228821588, -0.0011270001382152866, -0.0035738648415050284, -0.005696809921316997, -0.007479799008370572, -0.008913569832214968, -0.009995629398181848, -0.010730106123767362, -0.01112745993022714, -0.011204077521465777, -0.010981761556592558, -0.010487104621962649, -0.009750779708566895, -0.008806783345605503, -0.007691613708744422, -0.006443406350064504, -0.005101096327651239, -0.0037035572532650445, -0.002288760766598498, -0.0008930343940838381, 0.0004497040612160084, 0.0017085458613360902, 0.0028561826064778697, 0.0038693427245538904, 0.004729156264045173, 0.0054213915962429745, 0.005936587372391708, 0.006270068071543294, 0.006421849969755556, 0.006396443797782178, 0.006202559568610708, 0.0058527242916193226, 0.0053628234864281235, 0.004751579445675196, 0.004039981949981368, 0.0032506853111441327, 0.002407385154286287, 0.0015341931983222652, 0.0006550244158311212, -0.00020699101191350578, -0.0010300505400156208, -0.0017941893541420268, -0.002481682761858642, -0.003077468630328199, -0.0035693427342337308, -0.003948276264434998, -0.0042084293493284755, -0.004347246153946479, -0.004365411194693107, -0.0042666789949867895, -0.004057705229541436, -0.0037477874636434095, -0.0033485134261990474, -0.0028733927792042916, -0.002337465469832778, -0.0017568578913237647, -0.001148321137491392, -0.0005287869617277397, 0.0000850660373523537, 0.0006772405314859651, 0.0012328190076443134, 0.00173831289146853, 0.0021819611806385975, 0.0025539826540715814, 0.0028467769761391067, 0.003055052047477484, 0.003175891861997494, 0.0032087539967944043, 0.0031554218226391927, 0.0030198855690580883, 0.0028081778185230755, 0.002528151228372692, 0.002189218072448032, 0.0018020649278141442, 0.0013783347882871506, 0.0009302983176219571, 0.0004705125435918996, 0.000011483258960353713, -0.0004346583284416864, -0.0008564627353582099, -0.0012434422926464283, -0.001586318069799396, -0.0018772300452061593, -0.0021099040224506474, -0.0022797724899456247, -0.002384046464152241, -0.0024217386080201218, -0.0023936395957784356, -0.002302249012563522, -0.002151669227747982, -0.0019474488265779002, -0.001696397687712767, -0.0014063764577860907, -0.0010860619549777095, -0.0007446984520565823, -0.0003918367361265021, -0.00003708137047780295, 0.0003101659717946291, 0.0006409478559993642, 0.0009469770920907817, 0.0012208322294896099, 0.001456129721890939, 0.0016476681649469273, 0.0017915316423764106, 0.0018851569558006424, 0.001927370582069373, 0.0019183843680031518, 0.0018597489437935104, 0.0017542822302381216, 0.0016059677163340854, 0.0014198129038021875, 0.0012016945125591883, 0.0009581911739190034, 0.000696381707633601, 0.00042365555592108265, 0.00014751424024790855, -0.00012464084542349136, -0.00038567726087640876, -0.0006289357238567322, -0.000848370211905452, -0.001038705445344848, -0.0011955448624625515, -0.0013154698934900741, -0.0013961025273104373, -0.0014361430413177665, -0.00143537714856422, -0.0013946550179738235, -0.0013158443800074546, -0.0012017570118505278, -0.001056052961049124, -0.0008831265836660278, -0.0006879757889763613, -0.00047605825978268214, -0.00025314012889659734, -0.000025140126274052846, 0.00020202566973633374, 0.000422596130820185, 0.0006311126153653432, 0.0008225367782712132, 0.0009924227419316402, 0.0011368782078168052, 0.0012529312652788224, 0.001338158623469115, 0.0013911994521601603, 0.0014114626691980761, 0.0013991567634035874, 0.0013553936088779655, 0.0012820768752281682, 0.0011817838315511687, 0.001057727366040496, 0.0009136968081628693, 0.0007539299891718014, 0.0005829725151929097, 0.0004055654685261572, 0.00022654511040849531, 0.000050727732077616854, -0.00011721898154916056, -0.0002728965175373041, -0.0004122736350806254, -0.0005317674541381928, -0.0006283153390612298, -0.00069943732077003, -0.00074329154026803, -0.0007587025992854616, -0.0007451789241688792, -0.0007028976477190042, -0.0006326924816840852, -0.0005360117384990369, -0.0004148795460643277, -0.00027183788464963423, -0.00010987539810307727, 0.00006764748603812152, 0.00025709020784146465, 0.0004546180492460159, 0.0006562897137528959, 0.0008581466323761644, 0.001056296589672521, 0.0012469961488860717, 0.0014267282165683897, 0.0015922694449783334, 0.0017407508215061904, 0.0018697088674027409, 0.0019771222276341416, 0.002061435847387089, 0.0021215783384772617, 0.0021569688626138744, 0.002167506085967786, 0.002153555697975211, 0.0021159244704237914, 0.002055827323171664, 0.0019748436871571654, 0.0018748692581644735, 0.0017580661564216042, 0.0016268044135357975, 0.0014836070887652329, 0.0013310914106543618, 0.001171916285444633, 0.0010087245432410705, 0.000844091795557933, 0.0006804822788501571, 0.0005202048736767491, 0.0003653745221459382, 0.0002178851248768366, 0.00007938716594862651, -0.00004873297752271577, -0.0001653614058088566, -0.00026965679983683306, -0.0003610522906867853, -0.00043924670962451254, -0.0005041884015231086, -0.0005560644539084499, -0.0005952724709135361, -0.0006223990810339609, -0.0006381976745823161, -0.0006435494696099878, -0.0006394482697590037, -0.0006269579055230081, -0.0006071960902571958, -0.0005812986840141297, -0.0005503998661674507, -0.0005156064224889276, -0.0004779801054675081, -0.0004385193477821247, -0.00039814402944626006, -0.0003576848687093178, -0.00031787504789909166, -0.0002793450290387454, -0.00024262055862920822, -0.00020812277783425573, -0.00017617089070723918, -0.0001469875004658367, -0.0001207053885646365, -0.00009737601811785888, -0.00007697752128893082, -0.000059425359817699515, -0.000044582740239682106, -0.00003227078919691645, -0.00004017374344384353
38+const float __leaf_table_fir16XHigh[512] = { -0.00004017374344384353, -0.00003227078919691645, -0.000044582740239682106, -0.000059425359817699515, -0.00007697752128893082, -0.00009737601811785888, -0.0001207053885646365, -0.0001469875004658367, -0.00017617089070723918, -0.00020812277783425573, -0.00024262055862920822, -0.0002793450290387454, -0.00031787504789909166, -0.0003576848687093178, -0.00039814402944626006, -0.0004385193477821247, -0.0004779801054675081, -0.0005156064224889276, -0.0005503998661674507, -0.0005812986840141297, -0.0006071960902571958, -0.0006269579055230081, -0.0006394482697590037, -0.0006435494696099878, -0.0006381976745823161, -0.0006223990810339609, -0.0005952724709135361, -0.0005560644539084499, -0.0005041884015231086, -0.00043924670962451254, -0.0003610522906867853, -0.00026965679983683306, -0.0001653614058088566, -0.00004873297752271577, 0.00007938716594862651, 0.0002178851248768366, 0.0003653745221459382, 0.0005202048736767491, 0.0006804822788501571, 0.000844091795557933, 0.0010087245432410705, 0.001171916285444633, 0.0013310914106543618, 0.0014836070887652329, 0.0016268044135357975, 0.0017580661564216042, 0.0018748692581644735, 0.0019748436871571654, 0.002055827323171664, 0.0021159244704237914, 0.002153555697975211, 0.002167506085967786, 0.0021569688626138744, 0.0021215783384772617, 0.002061435847387089, 0.0019771222276341416, 0.0018697088674027409, 0.0017407508215061904, 0.0015922694449783334, 0.0014267282165683897, 0.0012469961488860717, 0.001056296589672521, 0.0008581466323761644, 0.0006562897137528959, 0.0004546180492460159, 0.00025709020784146465, 0.00006764748603812152, -0.00010987539810307727, -0.00027183788464963423, -0.0004148795460643277, -0.0005360117384990369, -0.0006326924816840852, -0.0007028976477190042, -0.0007451789241688792, -0.0007587025992854616, -0.00074329154026803, -0.00069943732077003, -0.0006283153390612298, -0.0005317674541381928, -0.0004122736350806254, -0.0002728965175373041, -0.00011721898154916056, 0.000050727732077616854, 0.00022654511040849531, 0.0004055654685261572, 0.0005829725151929097, 0.0007539299891718014, 0.0009136968081628693, 0.001057727366040496, 0.0011817838315511687, 0.0012820768752281682, 0.0013553936088779655, 0.0013991567634035874, 0.0014114626691980761, 0.0013911994521601603, 0.001338158623469115, 0.0012529312652788224, 0.0011368782078168052, 0.0009924227419316402, 0.0008225367782712132, 0.0006311126153653432, 0.000422596130820185, 0.00020202566973633374, -0.000025140126274052846, -0.00025314012889659734, -0.00047605825978268214, -0.0006879757889763613, -0.0008831265836660278, -0.001056052961049124, -0.0012017570118505278, -0.0013158443800074546, -0.0013946550179738235, -0.00143537714856422, -0.0014361430413177665, -0.0013961025273104373, -0.0013154698934900741, -0.0011955448624625515, -0.001038705445344848, -0.000848370211905452, -0.0006289357238567322, -0.00038567726087640876, -0.00012464084542349136, 0.00014751424024790855, 0.00042365555592108265, 0.000696381707633601, 0.0009581911739190034, 0.0012016945125591883, 0.0014198129038021875, 0.0016059677163340854, 0.0017542822302381216, 0.0018597489437935104, 0.0019183843680031518, 0.001927370582069373, 0.0018851569558006424, 0.0017915316423764106, 0.0016476681649469273, 0.001456129721890939, 0.0012208322294896099, 0.0009469770920907817, 0.0006409478559993642, 0.0003101659717946291, -0.00003708137047780295, -0.0003918367361265021, -0.0007446984520565823, -0.0010860619549777095, -0.0014063764577860907, -0.001696397687712767, -0.0019474488265779002, -0.002151669227747982, -0.002302249012563522, -0.0023936395957784356, -0.0024217386080201218, -0.002384046464152241, -0.0022797724899456247, -0.0021099040224506474, -0.0018772300452061593, -0.001586318069799396, -0.0012434422926464283, -0.0008564627353582099, -0.0004346583284416864, 0.000011483258960353713, 0.0004705125435918996, 0.0009302983176219571, 0.0013783347882871506, 0.0018020649278141442, 0.002189218072448032, 0.002528151228372692, 0.0028081778185230755, 0.0030198855690580883, 0.0031554218226391927, 0.0032087539967944043, 0.003175891861997494, 0.003055052047477484, 0.0028467769761391067, 0.0025539826540715814, 0.0021819611806385975, 0.00173831289146853, 0.0012328190076443134, 0.0006772405314859651, 0.0000850660373523537, -0.0005287869617277397, -0.001148321137491392, -0.0017568578913237647, -0.002337465469832778, -0.0028733927792042916, -0.0033485134261990474, -0.0037477874636434095, -0.004057705229541436, -0.0042666789949867895, -0.004365411194693107, -0.004347246153946479, -0.0042084293493284755, -0.003948276264434998, -0.0035693427342337308, -0.003077468630328199, -0.002481682761858642, -0.0017941893541420268, -0.0010300505400156208, -0.00020699101191350578, 0.0006550244158311212, 0.0015341931983222652, 0.002407385154286287, 0.0032506853111441327, 0.004039981949981368, 0.004751579445675196, 0.0053628234864281235, 0.0058527242916193226, 0.006202559568610708, 0.006396443797782178, 0.006421849969755556, 0.006270068071543294, 0.005936587372391708, 0.0054213915962429745, 0.004729156264045173, 0.0038693427245538904, 0.0028561826064778697, 0.0017085458613360902, 0.0004497040612160084, -0.0008930343940838381, -0.002288760766598498, -0.0037035572532650445, -0.005101096327651239, -0.006443406350064504, -0.007691613708744422, -0.008806783345605503, -0.009750779708566895, -0.010487104621962649, -0.010981761556592558, -0.011204077521465777, -0.01112745993022714, -0.010730106123767362, -0.009995629398181848, -0.008913569832214968, -0.007479799008370572, -0.005696809921316997, -0.0035738648415050284, -0.0011270001382152866, 0.001621100228821588, 0.004641370935060121, 0.00789877655149075, 0.0113528526524623, 0.014958365872953214, 0.018666074072644187, 0.02242359380770534, 0.026176337546106928, 0.029868513059052665, 0.03344415058816331, 0.03684815553847075, 0.04002735371317269, 0.042931503142136666, 0.04551426282729147, 0.04773408588853776, 0.04955503013705371, 0.050947459773749655, 0.051888623369848716, 0.05236309938228361, 0.05236309938228361, 0.051888623369848716, 0.050947459773749655, 0.04955503013705371, 0.04773408588853776, 0.04551426282729147, 0.042931503142136666, 0.04002735371317269, 0.03684815553847075, 0.03344415058816331, 0.029868513059052665, 0.026176337546106928, 0.02242359380770534, 0.018666074072644187, 0.014958365872953214, 0.0113528526524623, 0.00789877655149075, 0.004641370935060121, 0.001621100228821588, -0.0011270001382152866, -0.0035738648415050284, -0.005696809921316997, -0.007479799008370572, -0.008913569832214968, -0.009995629398181848, -0.010730106123767362, -0.01112745993022714, -0.011204077521465777, -0.010981761556592558, -0.010487104621962649, -0.009750779708566895, -0.008806783345605503, -0.007691613708744422, -0.006443406350064504, -0.005101096327651239, -0.0037035572532650445, -0.002288760766598498, -0.0008930343940838381, 0.0004497040612160084, 0.0017085458613360902, 0.0028561826064778697, 0.0038693427245538904, 0.004729156264045173, 0.0054213915962429745, 0.005936587372391708, 0.006270068071543294, 0.006421849969755556, 0.006396443797782178, 0.006202559568610708, 0.0058527242916193226, 0.0053628234864281235, 0.004751579445675196, 0.004039981949981368, 0.0032506853111441327, 0.002407385154286287, 0.0015341931983222652, 0.0006550244158311212, -0.00020699101191350578, -0.0010300505400156208, -0.0017941893541420268, -0.002481682761858642, -0.003077468630328199, -0.0035693427342337308, -0.003948276264434998, -0.0042084293493284755, -0.004347246153946479, -0.004365411194693107, -0.0042666789949867895, -0.004057705229541436, -0.0037477874636434095, -0.0033485134261990474, -0.0028733927792042916, -0.002337465469832778, -0.0017568578913237647, -0.001148321137491392, -0.0005287869617277397, 0.0000850660373523537, 0.0006772405314859651, 0.0012328190076443134, 0.00173831289146853, 0.0021819611806385975, 0.0025539826540715814, 0.0028467769761391067, 0.003055052047477484, 0.003175891861997494, 0.0032087539967944043, 0.0031554218226391927, 0.0030198855690580883, 0.0028081778185230755, 0.002528151228372692, 0.002189218072448032, 0.0018020649278141442, 0.0013783347882871506, 0.0009302983176219571, 0.0004705125435918996, 0.000011483258960353713, -0.0004346583284416864, -0.0008564627353582099, -0.0012434422926464283, -0.001586318069799396, -0.0018772300452061593, -0.0021099040224506474, -0.0022797724899456247, -0.002384046464152241, -0.0024217386080201218, -0.0023936395957784356, -0.002302249012563522, -0.002151669227747982, -0.0019474488265779002, -0.001696397687712767, -0.0014063764577860907, -0.0010860619549777095, -0.0007446984520565823, -0.0003918367361265021, -0.00003708137047780295, 0.0003101659717946291, 0.0006409478559993642, 0.0009469770920907817, 0.0012208322294896099, 0.001456129721890939, 0.0016476681649469273, 0.0017915316423764106, 0.0018851569558006424, 0.001927370582069373, 0.0019183843680031518, 0.0018597489437935104, 0.0017542822302381216, 0.0016059677163340854, 0.0014198129038021875, 0.0012016945125591883, 0.0009581911739190034, 0.000696381707633601, 0.00042365555592108265, 0.00014751424024790855, -0.00012464084542349136, -0.00038567726087640876, -0.0006289357238567322, -0.000848370211905452, -0.001038705445344848, -0.0011955448624625515, -0.0013154698934900741, -0.0013961025273104373, -0.0014361430413177665, -0.00143537714856422, -0.0013946550179738235, -0.0013158443800074546, -0.0012017570118505278, -0.001056052961049124, -0.0008831265836660278, -0.0006879757889763613, -0.00047605825978268214, -0.00025314012889659734, -0.000025140126274052846, 0.00020202566973633374, 0.000422596130820185, 0.0006311126153653432, 0.0008225367782712132, 0.0009924227419316402, 0.0011368782078168052, 0.0012529312652788224, 0.001338158623469115, 0.0013911994521601603, 0.0014114626691980761, 0.0013991567634035874, 0.0013553936088779655, 0.0012820768752281682, 0.0011817838315511687, 0.001057727366040496, 0.0009136968081628693, 0.0007539299891718014, 0.0005829725151929097, 0.0004055654685261572, 0.00022654511040849531, 0.000050727732077616854, -0.00011721898154916056, -0.0002728965175373041, -0.0004122736350806254, -0.0005317674541381928, -0.0006283153390612298, -0.00069943732077003, -0.00074329154026803, -0.0007587025992854616, -0.0007451789241688792, -0.0007028976477190042, -0.0006326924816840852, -0.0005360117384990369, -0.0004148795460643277, -0.00027183788464963423, -0.00010987539810307727, 0.00006764748603812152, 0.00025709020784146465, 0.0004546180492460159, 0.0006562897137528959, 0.0008581466323761644, 0.001056296589672521, 0.0012469961488860717, 0.0014267282165683897, 0.0015922694449783334, 0.0017407508215061904, 0.0018697088674027409, 0.0019771222276341416, 0.002061435847387089, 0.0021215783384772617, 0.0021569688626138744, 0.002167506085967786, 0.002153555697975211, 0.0021159244704237914, 0.002055827323171664, 0.0019748436871571654, 0.0018748692581644735, 0.0017580661564216042, 0.0016268044135357975, 0.0014836070887652329, 0.0013310914106543618, 0.001171916285444633, 0.0010087245432410705, 0.000844091795557933, 0.0006804822788501571, 0.0005202048736767491, 0.0003653745221459382, 0.0002178851248768366, 0.00007938716594862651, -0.00004873297752271577, -0.0001653614058088566, -0.00026965679983683306, -0.0003610522906867853, -0.00043924670962451254, -0.0005041884015231086, -0.0005560644539084499, -0.0005952724709135361, -0.0006223990810339609, -0.0006381976745823161, -0.0006435494696099878, -0.0006394482697590037, -0.0006269579055230081, -0.0006071960902571958, -0.0005812986840141297, -0.0005503998661674507, -0.0005156064224889276, -0.0004779801054675081, -0.0004385193477821247, -0.00039814402944626006, -0.0003576848687093178, -0.00031787504789909166, -0.0002793450290387454, -0.00024262055862920822, -0.00020812277783425573, -0.00017617089070723918, -0.0001469875004658367, -0.0001207053885646365, -0.00009737601811785888, -0.00007697752128893082, -0.000059425359817699515, -0.000044582740239682106, -0.00003227078919691645, -0.00004017374344384353
3939 };
4040
41−const float fir32XHigh[512] = { 0.00001695726883388158, 0.000007675466747345142, 0.000009369969074343828, 0.000011279085806814155, 0.000013415806582636418, 0.00001579269222570207, 0.000018421887123570193, 0.00002131472780344219, 0.000024481596821410856, 0.000027931521966672674, 0.00003167253546774698, 0.00003571156802204514, 0.00004005385180859527, 0.00004470260388316558, 0.00004965901316017587, 0.00005492204008152043, 0.00006048845305842843, 0.00006635289665744708, 0.00007250665288501187, 0.0000789384885513108, 0.00008563367774264342, 0.00009257537368625661, 0.00009974252621593992, 0.00010711124658254552, 0.00011465337570751053, 0.00012233800287448705, 0.0001301305708291957, 0.00013799197926318244, 0.00014587929227876596, 0.00015374657372226684, 0.000161543746522965, 0.0001692168951984779, 0.00017670780599526637, 0.0001839550739841348, 0.00019089427588832468, 0.00019745677767765902, 0.00020357062514912954, 0.00020916210971675997, 0.0002141545274069432, 0.00021846768000518762, 0.00022202071352577454, 0.00022473075934779818, 0.00022651220405928228, 0.00022728022159501112, 0.0002269491553453425, 0.00022543136577234978, 0.00022264296187547415, 0.0002184968451898252, 0.00021291103136150344, 0.00020580302601570826, 0.00019709428929377538, 0.00018670887176183611, 0.00017457550213741742, 0.00016062706678436397, 0.0001448013951907719, 0.0001270421247034733, 0.00010729940118257597, 0.00008553038364340326, 0.00006169965119086659, 0.00003577991793585758, 0.000007752990690551504, -0.000022389783957090243, -0.00005464753929697829, -0.00008900834335751579, -0.0001254499161703673, -0.00016393632811230729, -0.0002044234554405178, -0.00024684930385593585, -0.000291146274450184, -0.0003372278537321366, -0.00038499799259658716, -0.00043434821843157495, -0.0004851539797413716, -0.000537279458928773, -0.0005905762825387684, -0.0006448805823763886, -0.0007000164290861944, -0.0007557967574505448, -0.0008120214850938284, -0.0008684784362018723, -0.000924945795118327, -0.0009811922513964621, -0.0010369764412132298, -0.0010920476659586364, -0.0011461469777671403, -0.0011990092591572569, -0.0012503626824092186, -0.001299930348337511, -0.0013474327014007098, -0.0013925895075579725, -0.0014351200205514354, -0.0014747442974922531, -0.0015111829899403478, -0.0015441601544571469, -0.0015734040663474662, -0.0015986504297413274, -0.0016196438588602622, -0.0016361410571864347, -0.0016479110521030553, -0.0016547353303458935, -0.0016564077630374632, -0.0016527363435263026, -0.0016435483225404998, -0.0016286956518505767, -0.0016080553748913375, -0.0015815237521207347, -0.0015490117157615478, -0.0015104528831698094, -0.001465823165002548, -0.0014151394219170251, -0.001358416974565312, -0.0012956736049528927, -0.0012270686956067616, -0.001152656073186285, -0.0010726190880063075, -0.0009871267066080157, -0.0008963952696138223, -0.0008006703533508123, -0.0007002299686741377, -0.0005953836139186328, -0.0004864723381871633, -0.0003738679720682553, -0.00025797228061734796, -0.00013921599931306062, -0.000018057446410729332, 0.00010501885598494471, 0.00022950336047164354, 0.00035486342787289485, 0.00048054572124056215, 0.0006059774135387564, 0.0007305691337782367, 0.0008537161333655127, 0.0009748030963864794, 0.0010932046990955392, 0.0012082904750566619, 0.0013194249851955161, 0.0014259733376771368, 0.001527303743896754, 0.0016227897956312704, 0.001711814456379326, 0.0017937737205012431, 0.0018680795987737412, 0.0019341641568400244, 0.0019914815935822066, 0.002039512595508008, 0.0020777684004774366, 0.002105792845115274, 0.002123165845077641, 0.0021295078285898787, 0.002124481676328226, 0.0021077949476114846, 0.0020792047994666095, 0.0020385191296750853, 0.001985598641791954, 0.0019203611905568305, 0.0018427823960180593, 0.001752897191883342, 0.001650804005569779, 0.0015366612332945767, 0.0014106942008412344, 0.0012731911711610418, 0.0011245069442879076, 0.000965061048379021, 0.0007953395838134734, 0.0006158938813574659, 0.00042733992000728975, 0.0002303572186353618, 0.00002568770969134724, -0.00018586576944706597, -0.0004034418532725961, -0.0006261231182970748, -0.0008529382097618675, -0.001082864585381697, -0.0013148322187650945, -0.0015477265108969297, -0.0017803934493191651, -0.0020116403615744647, -0.0022402481137775445, -0.0024649611350976417, -0.0026845145168539705, -0.002897612541591732, -0.003102955618072987, -0.003299236507882844, -0.003485141406000574, -0.003659365022139062, -0.00382061384161854, -0.003967606725436846, -0.00409908481082949, -0.004213819332243789, -0.004310614319980478, -0.004388311125579514, -0.0044457964607502705, -0.004482009484640724, -0.004495946449098401, -0.004486664669509397, -0.0044532875717221785, -0.004395011784304027, -0.004311110841123746, -0.004200939705466409, -0.004063938803328366, -0.003899639165275879, -0.003707665674118787, -0.003487740462849392, -0.003239684107664783, -0.0029634193257533606, -0.0026589735645932266, -0.002326482192074541, -0.0019661881728099805, -0.0015784424502644535, -0.00116370312050432, -0.0007225376030136994, -0.0002556238139940663, 0.00023625228811795294, 0.0007522007972834952, 0.0012912295603417525, 0.001852242743410755, 0.0024340423454804715, 0.0030353369924133143, 0.0036547491180886605, 0.004290809184794082, 0.004941956691402223, 0.0056065635462084805, 0.006282933872809339, 0.006969280103770163, 0.007663786822563651, 0.008364555769243442, 0.009069657908191059, 0.009777115146719485, 0.010484918318222649, 0.01119103094528153, 0.011893397969184564, 0.012589952875861865, 0.013278625621822146, 0.013957350283575759, 0.014624072800732947, 0.015276759320520217, 0.01591340432108944, 0.016532037930932563, 0.017130733477250897, 0.017707615434328205, 0.018260866419414552, 0.018788735128822624, 0.01928954158394141, 0.019761686205304364, 0.020203653861202073, 0.02061402322906247, 0.020991468166448164, 0.02133476634829793, 0.021642803093792518, 0.02191457536156588, 0.022149196775251796, 0.022345900484487417, 0.022504042427789885, 0.022623105143350686, 0.022702698044173436, 0.022742559681203454, 0.022742559681203454, 0.022702698044173436, 0.022623105143350686, 0.022504042427789885, 0.022345900484487417, 0.022149196775251796, 0.02191457536156588, 0.021642803093792518, 0.02133476634829793, 0.020991468166448164, 0.02061402322906247, 0.020203653861202073, 0.019761686205304364, 0.01928954158394141, 0.018788735128822624, 0.018260866419414552, 0.017707615434328205, 0.017130733477250897, 0.016532037930932563, 0.01591340432108944, 0.015276759320520217, 0.014624072800732947, 0.013957350283575759, 0.013278625621822146, 0.012589952875861865, 0.011893397969184564, 0.01119103094528153, 0.010484918318222649, 0.009777115146719485, 0.009069657908191059, 0.008364555769243442, 0.007663786822563651, 0.006969280103770163, 0.006282933872809339, 0.0056065635462084805, 0.004941956691402223, 0.004290809184794082, 0.0036547491180886605, 0.0030353369924133143, 0.0024340423454804715, 0.001852242743410755, 0.0012912295603417525, 0.0007522007972834952, 0.00023625228811795294, -0.0002556238139940663, -0.0007225376030136994, -0.00116370312050432, -0.0015784424502644535, -0.0019661881728099805, -0.002326482192074541, -0.0026589735645932266, -0.0029634193257533606, -0.003239684107664783, -0.003487740462849392, -0.003707665674118787, -0.003899639165275879, -0.004063938803328366, -0.004200939705466409, -0.004311110841123746, -0.004395011784304027, -0.0044532875717221785, -0.004486664669509397, -0.004495946449098401, -0.004482009484640724, -0.0044457964607502705, -0.004388311125579514, -0.004310614319980478, -0.004213819332243789, -0.00409908481082949, -0.003967606725436846, -0.00382061384161854, -0.003659365022139062, -0.003485141406000574, -0.003299236507882844, -0.003102955618072987, -0.002897612541591732, -0.0026845145168539705, -0.0024649611350976417, -0.0022402481137775445, -0.0020116403615744647, -0.0017803934493191651, -0.0015477265108969297, -0.0013148322187650945, -0.001082864585381697, -0.0008529382097618675, -0.0006261231182970748, -0.0004034418532725961, -0.00018586576944706597, 0.00002568770969134724, 0.0002303572186353618, 0.00042733992000728975, 0.0006158938813574659, 0.0007953395838134734, 0.000965061048379021, 0.0011245069442879076, 0.0012731911711610418, 0.0014106942008412344, 0.0015366612332945767, 0.001650804005569779, 0.001752897191883342, 0.0018427823960180593, 0.0019203611905568305, 0.001985598641791954, 0.0020385191296750853, 0.0020792047994666095, 0.0021077949476114846, 0.002124481676328226, 0.0021295078285898787, 0.002123165845077641, 0.002105792845115274, 0.0020777684004774366, 0.002039512595508008, 0.0019914815935822066, 0.0019341641568400244, 0.0018680795987737412, 0.0017937737205012431, 0.001711814456379326, 0.0016227897956312704, 0.001527303743896754, 0.0014259733376771368, 0.0013194249851955161, 0.0012082904750566619, 0.0010932046990955392, 0.0009748030963864794, 0.0008537161333655127, 0.0007305691337782367, 0.0006059774135387564, 0.00048054572124056215, 0.00035486342787289485, 0.00022950336047164354, 0.00010501885598494471, -0.000018057446410729332, -0.00013921599931306062, -0.00025797228061734796, -0.0003738679720682553, -0.0004864723381871633, -0.0005953836139186328, -0.0007002299686741377, -0.0008006703533508123, -0.0008963952696138223, -0.0009871267066080157, -0.0010726190880063075, -0.001152656073186285, -0.0012270686956067616, -0.0012956736049528927, -0.001358416974565312, -0.0014151394219170251, -0.001465823165002548, -0.0015104528831698094, -0.0015490117157615478, -0.0015815237521207347, -0.0016080553748913375, -0.0016286956518505767, -0.0016435483225404998, -0.0016527363435263026, -0.0016564077630374632, -0.0016547353303458935, -0.0016479110521030553, -0.0016361410571864347, -0.0016196438588602622, -0.0015986504297413274, -0.0015734040663474662, -0.0015441601544571469, -0.0015111829899403478, -0.0014747442974922531, -0.0014351200205514354, -0.0013925895075579725, -0.0013474327014007098, -0.001299930348337511, -0.0012503626824092186, -0.0011990092591572569, -0.0011461469777671403, -0.0010920476659586364, -0.0010369764412132298, -0.0009811922513964621, -0.000924945795118327, -0.0008684784362018723, -0.0008120214850938284, -0.0007557967574505448, -0.0007000164290861944, -0.0006448805823763886, -0.0005905762825387684, -0.000537279458928773, -0.0004851539797413716, -0.00043434821843157495, -0.00038499799259658716, -0.0003372278537321366, -0.000291146274450184, -0.00024684930385593585, -0.0002044234554405178, -0.00016393632811230729, -0.0001254499161703673, -0.00008900834335751579, -0.00005464753929697829, -0.000022389783957090243, 0.000007752990690551504, 0.00003577991793585758, 0.00006169965119086659, 0.00008553038364340326, 0.00010729940118257597, 0.0001270421247034733, 0.0001448013951907719, 0.00016062706678436397, 0.00017457550213741742, 0.00018670887176183611, 0.00019709428929377538, 0.00020580302601570826, 0.00021291103136150344, 0.0002184968451898252, 0.00022264296187547415, 0.00022543136577234978, 0.0002269491553453425, 0.00022728022159501112, 0.00022651220405928228, 0.00022473075934779818, 0.00022202071352577454, 0.00021846768000518762, 0.0002141545274069432, 0.00020916210971675997, 0.00020357062514912954, 0.00019745677767765902, 0.00019089427588832468, 0.0001839550739841348, 0.00017670780599526637, 0.0001692168951984779, 0.000161543746522965, 0.00015374657372226684, 0.00014587929227876596, 0.00013799197926318244, 0.0001301305708291957, 0.00012233800287448705, 0.00011465337570751053, 0.00010711124658254552, 0.00009974252621593992, 0.00009257537368625661, 0.00008563367774264342, 0.0000789384885513108, 0.00007250665288501187, 0.00006635289665744708, 0.00006048845305842843, 0.00005492204008152043, 0.00004965901316017587, 0.00004470260388316558, 0.00004005385180859527, 0.00003571156802204514, 0.00003167253546774698, 0.000027931521966672674, 0.000024481596821410856, 0.00002131472780344219, 0.000018421887123570193, 0.00001579269222570207, 0.000013415806582636418, 0.000011279085806814155, 0.000009369969074343828, 0.000007675466747345142, 0.00001695726883388158
41+const float __leaf_table_fir32XHigh[512] = { 0.00001695726883388158, 0.000007675466747345142, 0.000009369969074343828, 0.000011279085806814155, 0.000013415806582636418, 0.00001579269222570207, 0.000018421887123570193, 0.00002131472780344219, 0.000024481596821410856, 0.000027931521966672674, 0.00003167253546774698, 0.00003571156802204514, 0.00004005385180859527, 0.00004470260388316558, 0.00004965901316017587, 0.00005492204008152043, 0.00006048845305842843, 0.00006635289665744708, 0.00007250665288501187, 0.0000789384885513108, 0.00008563367774264342, 0.00009257537368625661, 0.00009974252621593992, 0.00010711124658254552, 0.00011465337570751053, 0.00012233800287448705, 0.0001301305708291957, 0.00013799197926318244, 0.00014587929227876596, 0.00015374657372226684, 0.000161543746522965, 0.0001692168951984779, 0.00017670780599526637, 0.0001839550739841348, 0.00019089427588832468, 0.00019745677767765902, 0.00020357062514912954, 0.00020916210971675997, 0.0002141545274069432, 0.00021846768000518762, 0.00022202071352577454, 0.00022473075934779818, 0.00022651220405928228, 0.00022728022159501112, 0.0002269491553453425, 0.00022543136577234978, 0.00022264296187547415, 0.0002184968451898252, 0.00021291103136150344, 0.00020580302601570826, 0.00019709428929377538, 0.00018670887176183611, 0.00017457550213741742, 0.00016062706678436397, 0.0001448013951907719, 0.0001270421247034733, 0.00010729940118257597, 0.00008553038364340326, 0.00006169965119086659, 0.00003577991793585758, 0.000007752990690551504, -0.000022389783957090243, -0.00005464753929697829, -0.00008900834335751579, -0.0001254499161703673, -0.00016393632811230729, -0.0002044234554405178, -0.00024684930385593585, -0.000291146274450184, -0.0003372278537321366, -0.00038499799259658716, -0.00043434821843157495, -0.0004851539797413716, -0.000537279458928773, -0.0005905762825387684, -0.0006448805823763886, -0.0007000164290861944, -0.0007557967574505448, -0.0008120214850938284, -0.0008684784362018723, -0.000924945795118327, -0.0009811922513964621, -0.0010369764412132298, -0.0010920476659586364, -0.0011461469777671403, -0.0011990092591572569, -0.0012503626824092186, -0.001299930348337511, -0.0013474327014007098, -0.0013925895075579725, -0.0014351200205514354, -0.0014747442974922531, -0.0015111829899403478, -0.0015441601544571469, -0.0015734040663474662, -0.0015986504297413274, -0.0016196438588602622, -0.0016361410571864347, -0.0016479110521030553, -0.0016547353303458935, -0.0016564077630374632, -0.0016527363435263026, -0.0016435483225404998, -0.0016286956518505767, -0.0016080553748913375, -0.0015815237521207347, -0.0015490117157615478, -0.0015104528831698094, -0.001465823165002548, -0.0014151394219170251, -0.001358416974565312, -0.0012956736049528927, -0.0012270686956067616, -0.001152656073186285, -0.0010726190880063075, -0.0009871267066080157, -0.0008963952696138223, -0.0008006703533508123, -0.0007002299686741377, -0.0005953836139186328, -0.0004864723381871633, -0.0003738679720682553, -0.00025797228061734796, -0.00013921599931306062, -0.000018057446410729332, 0.00010501885598494471, 0.00022950336047164354, 0.00035486342787289485, 0.00048054572124056215, 0.0006059774135387564, 0.0007305691337782367, 0.0008537161333655127, 0.0009748030963864794, 0.0010932046990955392, 0.0012082904750566619, 0.0013194249851955161, 0.0014259733376771368, 0.001527303743896754, 0.0016227897956312704, 0.001711814456379326, 0.0017937737205012431, 0.0018680795987737412, 0.0019341641568400244, 0.0019914815935822066, 0.002039512595508008, 0.0020777684004774366, 0.002105792845115274, 0.002123165845077641, 0.0021295078285898787, 0.002124481676328226, 0.0021077949476114846, 0.0020792047994666095, 0.0020385191296750853, 0.001985598641791954, 0.0019203611905568305, 0.0018427823960180593, 0.001752897191883342, 0.001650804005569779, 0.0015366612332945767, 0.0014106942008412344, 0.0012731911711610418, 0.0011245069442879076, 0.000965061048379021, 0.0007953395838134734, 0.0006158938813574659, 0.00042733992000728975, 0.0002303572186353618, 0.00002568770969134724, -0.00018586576944706597, -0.0004034418532725961, -0.0006261231182970748, -0.0008529382097618675, -0.001082864585381697, -0.0013148322187650945, -0.0015477265108969297, -0.0017803934493191651, -0.0020116403615744647, -0.0022402481137775445, -0.0024649611350976417, -0.0026845145168539705, -0.002897612541591732, -0.003102955618072987, -0.003299236507882844, -0.003485141406000574, -0.003659365022139062, -0.00382061384161854, -0.003967606725436846, -0.00409908481082949, -0.004213819332243789, -0.004310614319980478, -0.004388311125579514, -0.0044457964607502705, -0.004482009484640724, -0.004495946449098401, -0.004486664669509397, -0.0044532875717221785, -0.004395011784304027, -0.004311110841123746, -0.004200939705466409, -0.004063938803328366, -0.003899639165275879, -0.003707665674118787, -0.003487740462849392, -0.003239684107664783, -0.0029634193257533606, -0.0026589735645932266, -0.002326482192074541, -0.0019661881728099805, -0.0015784424502644535, -0.00116370312050432, -0.0007225376030136994, -0.0002556238139940663, 0.00023625228811795294, 0.0007522007972834952, 0.0012912295603417525, 0.001852242743410755, 0.0024340423454804715, 0.0030353369924133143, 0.0036547491180886605, 0.004290809184794082, 0.004941956691402223, 0.0056065635462084805, 0.006282933872809339, 0.006969280103770163, 0.007663786822563651, 0.008364555769243442, 0.009069657908191059, 0.009777115146719485, 0.010484918318222649, 0.01119103094528153, 0.011893397969184564, 0.012589952875861865, 0.013278625621822146, 0.013957350283575759, 0.014624072800732947, 0.015276759320520217, 0.01591340432108944, 0.016532037930932563, 0.017130733477250897, 0.017707615434328205, 0.018260866419414552, 0.018788735128822624, 0.01928954158394141, 0.019761686205304364, 0.020203653861202073, 0.02061402322906247, 0.020991468166448164, 0.02133476634829793, 0.021642803093792518, 0.02191457536156588, 0.022149196775251796, 0.022345900484487417, 0.022504042427789885, 0.022623105143350686, 0.022702698044173436, 0.022742559681203454, 0.022742559681203454, 0.022702698044173436, 0.022623105143350686, 0.022504042427789885, 0.022345900484487417, 0.022149196775251796, 0.02191457536156588, 0.021642803093792518, 0.02133476634829793, 0.020991468166448164, 0.02061402322906247, 0.020203653861202073, 0.019761686205304364, 0.01928954158394141, 0.018788735128822624, 0.018260866419414552, 0.017707615434328205, 0.017130733477250897, 0.016532037930932563, 0.01591340432108944, 0.015276759320520217, 0.014624072800732947, 0.013957350283575759, 0.013278625621822146, 0.012589952875861865, 0.011893397969184564, 0.01119103094528153, 0.010484918318222649, 0.009777115146719485, 0.009069657908191059, 0.008364555769243442, 0.007663786822563651, 0.006969280103770163, 0.006282933872809339, 0.0056065635462084805, 0.004941956691402223, 0.004290809184794082, 0.0036547491180886605, 0.0030353369924133143, 0.0024340423454804715, 0.001852242743410755, 0.0012912295603417525, 0.0007522007972834952, 0.00023625228811795294, -0.0002556238139940663, -0.0007225376030136994, -0.00116370312050432, -0.0015784424502644535, -0.0019661881728099805, -0.002326482192074541, -0.0026589735645932266, -0.0029634193257533606, -0.003239684107664783, -0.003487740462849392, -0.003707665674118787, -0.003899639165275879, -0.004063938803328366, -0.004200939705466409, -0.004311110841123746, -0.004395011784304027, -0.0044532875717221785, -0.004486664669509397, -0.004495946449098401, -0.004482009484640724, -0.0044457964607502705, -0.004388311125579514, -0.004310614319980478, -0.004213819332243789, -0.00409908481082949, -0.003967606725436846, -0.00382061384161854, -0.003659365022139062, -0.003485141406000574, -0.003299236507882844, -0.003102955618072987, -0.002897612541591732, -0.0026845145168539705, -0.0024649611350976417, -0.0022402481137775445, -0.0020116403615744647, -0.0017803934493191651, -0.0015477265108969297, -0.0013148322187650945, -0.001082864585381697, -0.0008529382097618675, -0.0006261231182970748, -0.0004034418532725961, -0.00018586576944706597, 0.00002568770969134724, 0.0002303572186353618, 0.00042733992000728975, 0.0006158938813574659, 0.0007953395838134734, 0.000965061048379021, 0.0011245069442879076, 0.0012731911711610418, 0.0014106942008412344, 0.0015366612332945767, 0.001650804005569779, 0.001752897191883342, 0.0018427823960180593, 0.0019203611905568305, 0.001985598641791954, 0.0020385191296750853, 0.0020792047994666095, 0.0021077949476114846, 0.002124481676328226, 0.0021295078285898787, 0.002123165845077641, 0.002105792845115274, 0.0020777684004774366, 0.002039512595508008, 0.0019914815935822066, 0.0019341641568400244, 0.0018680795987737412, 0.0017937737205012431, 0.001711814456379326, 0.0016227897956312704, 0.001527303743896754, 0.0014259733376771368, 0.0013194249851955161, 0.0012082904750566619, 0.0010932046990955392, 0.0009748030963864794, 0.0008537161333655127, 0.0007305691337782367, 0.0006059774135387564, 0.00048054572124056215, 0.00035486342787289485, 0.00022950336047164354, 0.00010501885598494471, -0.000018057446410729332, -0.00013921599931306062, -0.00025797228061734796, -0.0003738679720682553, -0.0004864723381871633, -0.0005953836139186328, -0.0007002299686741377, -0.0008006703533508123, -0.0008963952696138223, -0.0009871267066080157, -0.0010726190880063075, -0.001152656073186285, -0.0012270686956067616, -0.0012956736049528927, -0.001358416974565312, -0.0014151394219170251, -0.001465823165002548, -0.0015104528831698094, -0.0015490117157615478, -0.0015815237521207347, -0.0016080553748913375, -0.0016286956518505767, -0.0016435483225404998, -0.0016527363435263026, -0.0016564077630374632, -0.0016547353303458935, -0.0016479110521030553, -0.0016361410571864347, -0.0016196438588602622, -0.0015986504297413274, -0.0015734040663474662, -0.0015441601544571469, -0.0015111829899403478, -0.0014747442974922531, -0.0014351200205514354, -0.0013925895075579725, -0.0013474327014007098, -0.001299930348337511, -0.0012503626824092186, -0.0011990092591572569, -0.0011461469777671403, -0.0010920476659586364, -0.0010369764412132298, -0.0009811922513964621, -0.000924945795118327, -0.0008684784362018723, -0.0008120214850938284, -0.0007557967574505448, -0.0007000164290861944, -0.0006448805823763886, -0.0005905762825387684, -0.000537279458928773, -0.0004851539797413716, -0.00043434821843157495, -0.00038499799259658716, -0.0003372278537321366, -0.000291146274450184, -0.00024684930385593585, -0.0002044234554405178, -0.00016393632811230729, -0.0001254499161703673, -0.00008900834335751579, -0.00005464753929697829, -0.000022389783957090243, 0.000007752990690551504, 0.00003577991793585758, 0.00006169965119086659, 0.00008553038364340326, 0.00010729940118257597, 0.0001270421247034733, 0.0001448013951907719, 0.00016062706678436397, 0.00017457550213741742, 0.00018670887176183611, 0.00019709428929377538, 0.00020580302601570826, 0.00021291103136150344, 0.0002184968451898252, 0.00022264296187547415, 0.00022543136577234978, 0.0002269491553453425, 0.00022728022159501112, 0.00022651220405928228, 0.00022473075934779818, 0.00022202071352577454, 0.00021846768000518762, 0.0002141545274069432, 0.00020916210971675997, 0.00020357062514912954, 0.00019745677767765902, 0.00019089427588832468, 0.0001839550739841348, 0.00017670780599526637, 0.0001692168951984779, 0.000161543746522965, 0.00015374657372226684, 0.00014587929227876596, 0.00013799197926318244, 0.0001301305708291957, 0.00012233800287448705, 0.00011465337570751053, 0.00010711124658254552, 0.00009974252621593992, 0.00009257537368625661, 0.00008563367774264342, 0.0000789384885513108, 0.00007250665288501187, 0.00006635289665744708, 0.00006048845305842843, 0.00005492204008152043, 0.00004965901316017587, 0.00004470260388316558, 0.00004005385180859527, 0.00003571156802204514, 0.00003167253546774698, 0.000027931521966672674, 0.000024481596821410856, 0.00002131472780344219, 0.000018421887123570193, 0.00001579269222570207, 0.000013415806582636418, 0.000011279085806814155, 0.000009369969074343828, 0.000007675466747345142, 0.00001695726883388158
4242 };
43−const float fir64XHigh[1024] = { 0.000022913289467138396, 0.0000053659189590266235, 0.0000059874129268137184, 0.000006651966903409214, 0.000007360859185648702, 0.000008116254962232182, 0.000008919034969234169, 0.000009771649771624484, 0.00001067513223630924, 0.000011631201209261511, 0.000012641797347255405, 0.00001370786337628007, 0.000014831347439124435, 0.00001601386713533323, 0.00001725659281802051, 0.000018561209740219567, 0.00001992924403854817, 0.00002136207377464052, 0.000022860960742170415, 0.00002442737159197627, 0.000026062787460182665, 0.00002776823090942686, 0.00002954497152514943, 0.000031394387750225555, 0.0000333174817796639, 0.00003531515315607694, 0.000037388352711032095, 0.00003953809180607858, 0.000041765124869157065, 0.00004406996003435772, 0.00004645314118637872, 0.00004891512239763599, 0.000051456283434024254, 0.000054076836400090634, 0.00005677675565218903, 0.00005955600371707976, 0.00006241451652786996, 0.0000653520878490535, 0.00006836828400903681, 0.00007146257248874113, 0.00007463447593939765, 0.00007788334878376474, 0.00008120828768996651, 0.00008460822180317937, 0.00008808197111592392, 0.00009162826246394013, 0.00009524561718379787, 0.0000989323217880672, 0.00010268641529207459, 0.00010650572670297642, 0.00011038797758602729, 0.00011433071893118852, 0.00011833127277888537, 0.0001223867211507117, 0.0001264939791526471, 0.0001306498943438022, 0.00013485120459499745, 0.0001390945080465441, 0.0001433761787732808, 0.0001476923508970611, 0.0001520390228045441, 0.00015641203030453322, 0.0001608069510673283, 0.00016521898552431528, 0.0001696430686231646, 0.0001740740165774301, 0.00017850636200629103, 0.0001829343448175031, 0.00018735205242694257, 0.000191753562437378, 0.00019613295450734188, 0.00020048414321002534, 0.00020480094575553342, 0.00020907706346541747, 0.00021330607883745088, 0.00021748145118260308, 0.00022159611743123445, 0.0002256425365807074, 0.0002296129456080256, 0.00023349938436811445, 0.00023729369397980805, 0.00024098757818162363, 0.0002445732198467269, 0.00024804316088030066, 0.00025138980120093706, 0.00025460575109546185, 0.00025768336513093236, 0.000260614166491108, 0.00026338871874574443, 0.000265996883919168, 0.00026842872851524756, 0.0002706745796903796, 0.00027272653793114146, 0.0002745790007011535, 0.0002762259706331217, 0.0002776600678298683, 0.0002788693645809233, 0.0002798371088712506, 0.0002805501390130166, 0.0002810071637276198, 0.0002812218387032567, 0.0002811853995116189, 0.0002808065268305555, 0.000280197444464886, 0.00027926833477321045, 0.0002780409500002217, 0.0002765020258372484, 0.00027464338678576605, 0.00027245845620400524, 0.0002699387312629035, 0.0002670776879725044, 0.0002638682356241208, 0.00026030295633048156, 0.0002563760351381784, 0.00025208079324849864, 0.00024741089077219824, 0.00024236092911432053, 0.00023692535214431433, 0.00023109887243694582, 0.0002248766203312044, 0.00021825436568685826, 0.0002112279751888258, 0.00020379342129965214, 0.00019594765441000844, 0.00018768793613519225, 0.00017901156693343162, 0.0001699163889323255, 0.00016040086314937234, 0.00015046397564821766, 0.00014010492118016657, 0.00012932331202118152, 0.00011811939311034222, 0.00010649390448787931, 0.00009444816369190979, 0.00008198390428241564, 0.00006910334679829026, 0.00005580947004681174, 0.000042105866991998394, 0.000027996578416041823, 0.000013486064917873263, -0.0000014205550195404417, -0.000016717431552354825, -0.00003239824489309241, -0.00004845619470295486, -0.00006488392097284113, -0.00008167344072768395, -0.00009881608266779326, -0.00011630254584578235, -0.000134122927443183, -0.0001522667855569792, -0.00017072306915224178, -0.0001894800112434245, -0.00020852521704417434, -0.00022784574374784246, -0.00024742817471772824, -0.00026725858015049425, -0.00028732242720909374, -0.0003076045740274102, -0.00032808926773727473, -0.0003487602312779994, -0.0003696006180382817, -0.00039059290984859706, -0.00041171900064429, -0.00043296032505169577, -0.00045429794314525324, -0.0004757124161811035, -0.0004971838198071831, -0.0005186919510053738, -0.0005402162469729259, -0.0005617356366067017, -0.0005832284295812785, -0.0006046723908249317, -0.0006260449390330644, -0.0006473231692560336, -0.0006684839703829051, -0.0006895039843981559, -0.000710359669543136, -0.000731027532147202, -0.0007514837903863777, -0.000771704162227947, -0.0007916639719227004, -0.0008113383362587028, -0.0008307023010845163, -0.0008497307715244494, -0.0008683991132471614, -0.0008866831646045461, -0.0009045584634477986, -0.000922000299232565, -0.0009389835464993075, -0.0009554827702629912, -0.0009714727766152153, -0.000986929306593871, -0.0010018296635038234, -0.001016150958603644, -0.0010298692409237303, -0.0010429598373262593, -0.0010553976134962566, -0.001067160927893583, -0.0010782313132298208, -0.0010885880181663468, -0.001098205538071845, -0.0011070578885002702, -0.001115133482641312, -0.0011224205008357393, -0.0011288733610789721, -0.001134502525433292, -0.0011392722062450377, -0.001143172631327465, -0.0011461862709457055, -0.0011482970085184934, -0.0011494916928265647, -0.0011497552449535495, -0.001149075700165883, -0.0011474412643782891, -0.00114484006082293, -0.0011412629577426628, -0.001136700795386366, -0.0011311451534842774, -0.0011245894559787622, -0.0011170279740759658, -0.00110845587457712, -0.0010988693663578895, -0.0010882663676571244, -0.0010766458418348251, -0.0010640072735802143, -0.0010503518239957826, -0.0010356821468104041, -0.0010200018714693214, -0.0010033157303544313, -0.000985629760693179, -0.0009669515631450903, -0.0009472899718477435, -0.0009266549999954207, -0.0009050579826107043, -0.0008825115697880996, -0.0008590299683449941, -0.0008346286688776923, -0.0008093242093186422, -0.0007831344484904399, -0.0007560787238727222, -0.0007281777992737946, -0.0006994535909524986, -0.0006699292108326442, -0.0006396291849638128, -0.0006085793855511994, -0.0005768070388328386, -0.0005443406366124165, -0.0005112097970335273, -0.00047744526762494543, -0.00044307897054750035, -0.00040814409766798117, -0.0003726750006857615, -0.0003367070808797812, -0.00030027682371347247, -0.0002634218056255867, -0.00022618073814697159, -0.00018859337566807589, -0.0001507003780746852, -0.00011254324298833094, -0.00007416428731734924, -0.00003560670730199985, 0.000003085523548063785, 0.000041867710432921324, 0.00008069434503517607, 0.00011951910789599325, 0.00015829502033131527, 0.00019697472076561434, 0.00023551045567409698, 0.000273853967149023, 0.0003119566063859104, 0.0003497693944357311, 0.0003872430841974543, 0.0004243281073189398, 0.00046097456525713825, 0.0004971324209116283, 0.000532751652541773, 0.0005677825044850944, 0.0006021753837116698, 0.0006358806886685873, 0.0006688490401380291, 0.0007010312176003141, 0.0007323781414864676, 0.0007628410971964845, 0.0007923721224082782, 0.0008209242042168955, 0.000848450750988169, 0.0008749056596557243, 0.0009002434389593702, 0.0009244189680276405, 0.0009473882280306129, 0.0009691087604070867, 0.0009895395597688055, 0.0010086402935785192, 0.001026370720635107, 0.0010426918893056865, 0.0010575665723725415, 0.001070959957358151, 0.0010828391940482756, 0.0010931703343583935, 0.0011019202109286796, 0.0011090596487870318, 0.0011145630445275898, 0.0011184043786736124, 0.001120554074746838, 0.0011209917680571181, 0.0011197029937617083, 0.0011166562966771064, 0.0011118464276884984, 0.0011052512953704699, 0.0010968607244598726, 0.0010866638388056194, 0.0010746506726143957, 0.001060816695739025, 0.001045155823714897, 0.0010276670439197623, 0.001008351157157161, 0.0009872096007023739, 0.0009642482949221396, 0.0009394748128782626, 0.0009128984193201994, 0.0008845315727779604, 0.0008543893284299989, 0.0008224889133179016, 0.0007888494392687725, 0.0007534931574735429, 0.0007164452155151603, 0.0006777324637972142, 0.0006373842981041069, 0.0005954329812500334, 0.0005519133506181678, 0.0005068625728051466, 0.00046032000323413937, 0.0004123276053463404, 0.00036292989933373846, 0.00031217386261437, 0.00026010877383320427, 0.0002067859842737511, 0.00015225938436383264, 0.0000965854576875034, 0.00003982286749323625, -0.0000179677059230694, -0.00007672351611450484, -0.00013637955229787953, -0.00019686867752685767, -0.00025812174980963077, -0.0003200676217906621, -0.0003826333414430741, -0.0004457441136063003, -0.0005093232294712956, -0.0005732921654282367, -0.00063757077202539, -0.0007020774864868515, -0.0007667293014381896, -0.000831441760556577, -0.0008961290102706094, -0.0009607038567017785, -0.0010250779361669813, -0.0010891617777670183, -0.0011528648888359837, -0.0012160958997774157, -0.001278762708717709, -0.0013407725703934634, -0.0014020320140358438, -0.0014624469501256642, -0.0015219229140548082, -0.0015803651881932726, -0.0016376788121915474, -0.0016937685933671551, -0.0017485393883605888, -0.0018018962922161296, -0.001853744622258798, -0.0019039899562331246, -0.0019525381533939561, -0.001999295568971595, -0.0020441692691091497, -0.0020870671590057003, -0.0021278980935438433, -0.002166571859834074, -0.0022029993905251185, -0.002237092766198614, -0.0022687651100535395, -0.0022979310017697827, -0.002324506765063281, -0.002348410532134342, -0.0023695620904663124, -0.002387882877950405, -0.0024032962764901395, -0.002415727498004215, -0.0024251041062769677, -0.0024313565047816045, -0.002434417346479244, -0.002434221285942243, -0.0024307050845577974, -0.0024238084309784105, -0.0024134744272458933, -0.0023996490147598095, -0.0023822808507958644, -0.002361320552774569, -0.0023367219180767287, -0.0023084438037733195, -0.0022764477146557157, -0.0022406968577953325, -0.0022011577213322964, -0.002157802353593739, -0.0021106071299345493, -0.0020595468628108226, -0.0020046032562800113, -0.0019457662560451291, -0.0018830178785251698, -0.0018163568650903469, -0.0017457762721459498, -0.0016712774888046648, -0.0015928655517344435, -0.0015105465040104254, -0.0014243352289427366, -0.001334245183172585, -0.0012402971508224737, -0.001142515914146565, -0.001040927635788706, -0.0009355648118899454, -0.0008264637875103248, -0.0007136636835055012, -0.0005972078914059598, -0.00047714437051389635, -0.0003535251665308113, -0.00022640509673521253, -0.00009584304366831371, 0.00003809737583447662, 0.000175349189952471, 0.0003158420005530984, 0.00045950168388054715, 0.0006062501796784794, 0.0007560055720837391, 0.0009086826695053086, 0.0010641930047446363, 0.0012224448181092644, 0.001383342762009772, 0.0015467879147444098, 0.0017126784900794694, 0.0018809098064416602, 0.002051374038980255, 0.00222396027153397, 0.0023985546780390995, 0.00257504080294078, 0.002753299611825817, 0.0029332096760600742, 0.0031146471999652266, 0.00329748586141485, 0.0034815970640890118, 0.0036668502022383534, 0.0038531128164763875, 0.004040250654892737, 0.004228127702681014, 0.004416606372309768, 0.004605547604211298, 0.004794811008263008, 0.004984255005236749, 0.005173736922644052, 0.005363113237573505, 0.005552239713188401, 0.005740971456077898, 0.005929163001618124, 0.006116668526010137, 0.006303342137957434, 0.006489037895773713, 0.006673609810898314, 0.006856912040272674, 0.007038799176867838, 0.007219126469467923, 0.00739774981209459, 0.007574525856115118, 0.00774931217821552, 0.007921967422212448, 0.008092351521264793, 0.008260325786691655, 0.0084257530686515, 0.008588497916423984, 0.008748426684777003, 0.008905407631376806, 0.00905931090707958, 0.009210008945621842, 0.009357376767512868, 0.0095012918586961, 0.009641634222518982, 0.009778286439590446, 0.009911133869143742, 0.010040064826756685, 0.010164970855541414, 0.010285747084632053, 0.01040229168758197, 0.010514505774592219, 0.010622294054150362, 0.010725565119997272, 0.010824231613731668, 0.010918209734582957, 0.011007419162404072, 0.01109178352506284, 0.011171230745049823, 0.011245693678816775, 0.011315108689601935, 0.011379415321537538, 0.011438558592290933, 0.011492488522300438, 0.011541158942797008, 0.01158452699694985, 0.011622555335241312, 0.011655213312299231, 0.011682471044774176, 0.011704304362857888, 0.011720697805424401, 0.011731632913262123, 0.011737103714478897, 0.011737103714478897, 0.011731632913262123, 0.011720697805424401, 0.011704304362857888, 0.011682471044774176, 0.011655213312299231, 0.011622555335241312, 0.01158452699694985, 0.011541158942797008, 0.011492488522300438, 0.011438558592290933, 0.011379415321537538, 0.011315108689601935, 0.011245693678816775, 0.011171230745049823, 0.01109178352506284, 0.011007419162404072, 0.010918209734582957, 0.010824231613731668, 0.010725565119997272, 0.010622294054150362, 0.010514505774592219, 0.01040229168758197, 0.010285747084632053, 0.010164970855541414, 0.010040064826756685, 0.009911133869143742, 0.009778286439590446, 0.009641634222518982, 0.0095012918586961, 0.009357376767512868, 0.009210008945621842, 0.00905931090707958, 0.008905407631376806, 0.008748426684777003, 0.008588497916423984, 0.0084257530686515, 0.008260325786691655, 0.008092351521264793, 0.007921967422212448, 0.00774931217821552, 0.007574525856115118, 0.00739774981209459, 0.007219126469467923, 0.007038799176867838, 0.006856912040272674, 0.006673609810898314, 0.006489037895773713, 0.006303342137957434, 0.006116668526010137, 0.005929163001618124, 0.005740971456077898, 0.005552239713188401, 0.005363113237573505, 0.005173736922644052, 0.004984255005236749, 0.004794811008263008, 0.004605547604211298, 0.004416606372309768, 0.004228127702681014, 0.004040250654892737, 0.0038531128164763875, 0.0036668502022383534, 0.0034815970640890118, 0.00329748586141485, 0.0031146471999652266, 0.0029332096760600742, 0.002753299611825817, 0.00257504080294078, 0.0023985546780390995, 0.00222396027153397, 0.002051374038980255, 0.0018809098064416602, 0.0017126784900794694, 0.0015467879147444098, 0.001383342762009772, 0.0012224448181092644, 0.0010641930047446363, 0.0009086826695053086, 0.0007560055720837391, 0.0006062501796784794, 0.00045950168388054715, 0.0003158420005530984, 0.000175349189952471, 0.00003809737583447662, -0.00009584304366831371, -0.00022640509673521253, -0.0003535251665308113, -0.00047714437051389635, -0.0005972078914059598, -0.0007136636835055012, -0.0008264637875103248, -0.0009355648118899454, -0.001040927635788706, -0.001142515914146565, -0.0012402971508224737, -0.001334245183172585, -0.0014243352289427366, -0.0015105465040104254, -0.0015928655517344435, -0.0016712774888046648, -0.0017457762721459498, -0.0018163568650903469, -0.0018830178785251698, -0.0019457662560451291, -0.0020046032562800113, -0.0020595468628108226, -0.0021106071299345493, -0.002157802353593739, -0.0022011577213322964, -0.0022406968577953325, -0.0022764477146557157, -0.0023084438037733195, -0.0023367219180767287, -0.002361320552774569, -0.0023822808507958644, -0.0023996490147598095, -0.0024134744272458933, -0.0024238084309784105, -0.0024307050845577974, -0.002434221285942243, -0.002434417346479244, -0.0024313565047816045, -0.0024251041062769677, -0.002415727498004215, -0.0024032962764901395, -0.002387882877950405, -0.0023695620904663124, -0.002348410532134342, -0.002324506765063281, -0.0022979310017697827, -0.0022687651100535395, -0.002237092766198614, -0.0022029993905251185, -0.002166571859834074, -0.0021278980935438433, -0.0020870671590057003, -0.0020441692691091497, -0.001999295568971595, -0.0019525381533939561, -0.0019039899562331246, -0.001853744622258798, -0.0018018962922161296, -0.0017485393883605888, -0.0016937685933671551, -0.0016376788121915474, -0.0015803651881932726, -0.0015219229140548082, -0.0014624469501256642, -0.0014020320140358438, -0.0013407725703934634, -0.001278762708717709, -0.0012160958997774157, -0.0011528648888359837, -0.0010891617777670183, -0.0010250779361669813, -0.0009607038567017785, -0.0008961290102706094, -0.000831441760556577, -0.0007667293014381896, -0.0007020774864868515, -0.00063757077202539, -0.0005732921654282367, -0.0005093232294712956, -0.0004457441136063003, -0.0003826333414430741, -0.0003200676217906621, -0.00025812174980963077, -0.00019686867752685767, -0.00013637955229787953, -0.00007672351611450484, -0.0000179677059230694, 0.00003982286749323625, 0.0000965854576875034, 0.00015225938436383264, 0.0002067859842737511, 0.00026010877383320427, 0.00031217386261437, 0.00036292989933373846, 0.0004123276053463404, 0.00046032000323413937, 0.0005068625728051466, 0.0005519133506181678, 0.0005954329812500334, 0.0006373842981041069, 0.0006777324637972142, 0.0007164452155151603, 0.0007534931574735429, 0.0007888494392687725, 0.0008224889133179016, 0.0008543893284299989, 0.0008845315727779604, 0.0009128984193201994, 0.0009394748128782626, 0.0009642482949221396, 0.0009872096007023739, 0.001008351157157161, 0.0010276670439197623, 0.001045155823714897, 0.001060816695739025, 0.0010746506726143957, 0.0010866638388056194, 0.0010968607244598726, 0.0011052512953704699, 0.0011118464276884984, 0.0011166562966771064, 0.0011197029937617083, 0.0011209917680571181, 0.001120554074746838, 0.0011184043786736124, 0.0011145630445275898, 0.0011090596487870318, 0.0011019202109286796, 0.0010931703343583935, 0.0010828391940482756, 0.001070959957358151, 0.0010575665723725415, 0.0010426918893056865, 0.001026370720635107, 0.0010086402935785192, 0.0009895395597688055, 0.0009691087604070867, 0.0009473882280306129, 0.0009244189680276405, 0.0009002434389593702, 0.0008749056596557243, 0.000848450750988169, 0.0008209242042168955, 0.0007923721224082782, 0.0007628410971964845, 0.0007323781414864676, 0.0007010312176003141, 0.0006688490401380291, 0.0006358806886685873, 0.0006021753837116698, 0.0005677825044850944, 0.000532751652541773, 0.0004971324209116283, 0.00046097456525713825, 0.0004243281073189398, 0.0003872430841974543, 0.0003497693944357311, 0.0003119566063859104, 0.000273853967149023, 0.00023551045567409698, 0.00019697472076561434, 0.00015829502033131527, 0.00011951910789599325, 0.00008069434503517607, 0.000041867710432921324, 0.000003085523548063785, -0.00003560670730199985, -0.00007416428731734924, -0.00011254324298833094, -0.0001507003780746852, -0.00018859337566807589, -0.00022618073814697159, -0.0002634218056255867, -0.00030027682371347247, -0.0003367070808797812, -0.0003726750006857615, -0.00040814409766798117, -0.00044307897054750035, -0.00047744526762494543, -0.0005112097970335273, -0.0005443406366124165, -0.0005768070388328386, -0.0006085793855511994, -0.0006396291849638128, -0.0006699292108326442, -0.0006994535909524986, -0.0007281777992737946, -0.0007560787238727222, -0.0007831344484904399, -0.0008093242093186422, -0.0008346286688776923, -0.0008590299683449941, -0.0008825115697880996, -0.0009050579826107043, -0.0009266549999954207, -0.0009472899718477435, -0.0009669515631450903, -0.000985629760693179, -0.0010033157303544313, -0.0010200018714693214, -0.0010356821468104041, -0.0010503518239957826, -0.0010640072735802143, -0.0010766458418348251, -0.0010882663676571244, -0.0010988693663578895, -0.00110845587457712, -0.0011170279740759658, -0.0011245894559787622, -0.0011311451534842774, -0.001136700795386366, -0.0011412629577426628, -0.00114484006082293, -0.0011474412643782891, -0.001149075700165883, -0.0011497552449535495, -0.0011494916928265647, -0.0011482970085184934, -0.0011461862709457055, -0.001143172631327465, -0.0011392722062450377, -0.001134502525433292, -0.0011288733610789721, -0.0011224205008357393, -0.001115133482641312, -0.0011070578885002702, -0.001098205538071845, -0.0010885880181663468, -0.0010782313132298208, -0.001067160927893583, -0.0010553976134962566, -0.0010429598373262593, -0.0010298692409237303, -0.001016150958603644, -0.0010018296635038234, -0.000986929306593871, -0.0009714727766152153, -0.0009554827702629912, -0.0009389835464993075, -0.000922000299232565, -0.0009045584634477986, -0.0008866831646045461, -0.0008683991132471614, -0.0008497307715244494, -0.0008307023010845163, -0.0008113383362587028, -0.0007916639719227004, -0.000771704162227947, -0.0007514837903863777, -0.000731027532147202, -0.000710359669543136, -0.0006895039843981559, -0.0006684839703829051, -0.0006473231692560336, -0.0006260449390330644, -0.0006046723908249317, -0.0005832284295812785, -0.0005617356366067017, -0.0005402162469729259, -0.0005186919510053738, -0.0004971838198071831, -0.0004757124161811035, -0.00045429794314525324, -0.00043296032505169577, -0.00041171900064429, -0.00039059290984859706, -0.0003696006180382817, -0.0003487602312779994, -0.00032808926773727473, -0.0003076045740274102, -0.00028732242720909374, -0.00026725858015049425, -0.00024742817471772824, -0.00022784574374784246, -0.00020852521704417434, -0.0001894800112434245, -0.00017072306915224178, -0.0001522667855569792, -0.000134122927443183, -0.00011630254584578235, -0.00009881608266779326, -0.00008167344072768395, -0.00006488392097284113, -0.00004845619470295486, -0.00003239824489309241, -0.000016717431552354825, -0.0000014205550195404417, 0.000013486064917873263, 0.000027996578416041823, 0.000042105866991998394, 0.00005580947004681174, 0.00006910334679829026, 0.00008198390428241564, 0.00009444816369190979, 0.00010649390448787931, 0.00011811939311034222, 0.00012932331202118152, 0.00014010492118016657, 0.00015046397564821766, 0.00016040086314937234, 0.0001699163889323255, 0.00017901156693343162, 0.00018768793613519225, 0.00019594765441000844, 0.00020379342129965214, 0.0002112279751888258, 0.00021825436568685826, 0.0002248766203312044, 0.00023109887243694582, 0.00023692535214431433, 0.00024236092911432053, 0.00024741089077219824, 0.00025208079324849864, 0.0002563760351381784, 0.00026030295633048156, 0.0002638682356241208, 0.0002670776879725044, 0.0002699387312629035, 0.00027245845620400524, 0.00027464338678576605, 0.0002765020258372484, 0.0002780409500002217, 0.00027926833477321045, 0.000280197444464886, 0.0002808065268305555, 0.0002811853995116189, 0.0002812218387032567, 0.0002810071637276198, 0.0002805501390130166, 0.0002798371088712506, 0.0002788693645809233, 0.0002776600678298683, 0.0002762259706331217, 0.0002745790007011535, 0.00027272653793114146, 0.0002706745796903796, 0.00026842872851524756, 0.000265996883919168, 0.00026338871874574443, 0.000260614166491108, 0.00025768336513093236, 0.00025460575109546185, 0.00025138980120093706, 0.00024804316088030066, 0.0002445732198467269, 0.00024098757818162363, 0.00023729369397980805, 0.00023349938436811445, 0.0002296129456080256, 0.0002256425365807074, 0.00022159611743123445, 0.00021748145118260308, 0.00021330607883745088, 0.00020907706346541747, 0.00020480094575553342, 0.00020048414321002534, 0.00019613295450734188, 0.000191753562437378, 0.00018735205242694257, 0.0001829343448175031, 0.00017850636200629103, 0.0001740740165774301, 0.0001696430686231646, 0.00016521898552431528, 0.0001608069510673283, 0.00015641203030453322, 0.0001520390228045441, 0.0001476923508970611, 0.0001433761787732808, 0.0001390945080465441, 0.00013485120459499745, 0.0001306498943438022, 0.0001264939791526471, 0.0001223867211507117, 0.00011833127277888537, 0.00011433071893118852, 0.00011038797758602729, 0.00010650572670297642, 0.00010268641529207459, 0.0000989323217880672, 0.00009524561718379787, 0.00009162826246394013, 0.00008808197111592392, 0.00008460822180317937, 0.00008120828768996651, 0.00007788334878376474, 0.00007463447593939765, 0.00007146257248874113, 0.00006836828400903681, 0.0000653520878490535, 0.00006241451652786996, 0.00005955600371707976, 0.00005677675565218903, 0.000054076836400090634, 0.000051456283434024254, 0.00004891512239763599, 0.00004645314118637872, 0.00004406996003435772, 0.000041765124869157065, 0.00003953809180607858, 0.000037388352711032095, 0.00003531515315607694, 0.0000333174817796639, 0.000031394387750225555, 0.00002954497152514943, 0.00002776823090942686, 0.000026062787460182665, 0.00002442737159197627, 0.000022860960742170415, 0.00002136207377464052, 0.00001992924403854817, 0.000018561209740219567, 0.00001725659281802051, 0.00001601386713533323, 0.000014831347439124435, 0.00001370786337628007, 0.000012641797347255405, 0.000011631201209261511, 0.00001067513223630924, 0.000009771649771624484, 0.000008919034969234169, 0.000008116254962232182, 0.000007360859185648702, 0.000006651966903409214, 0.0000059874129268137184, 0.0000053659189590266235, 0.000022913289467138396
43+const float __leaf_table_fir64XHigh[1024] = { 0.000022913289467138396, 0.0000053659189590266235, 0.0000059874129268137184, 0.000006651966903409214, 0.000007360859185648702, 0.000008116254962232182, 0.000008919034969234169, 0.000009771649771624484, 0.00001067513223630924, 0.000011631201209261511, 0.000012641797347255405, 0.00001370786337628007, 0.000014831347439124435, 0.00001601386713533323, 0.00001725659281802051, 0.000018561209740219567, 0.00001992924403854817, 0.00002136207377464052, 0.000022860960742170415, 0.00002442737159197627, 0.000026062787460182665, 0.00002776823090942686, 0.00002954497152514943, 0.000031394387750225555, 0.0000333174817796639, 0.00003531515315607694, 0.000037388352711032095, 0.00003953809180607858, 0.000041765124869157065, 0.00004406996003435772, 0.00004645314118637872, 0.00004891512239763599, 0.000051456283434024254, 0.000054076836400090634, 0.00005677675565218903, 0.00005955600371707976, 0.00006241451652786996, 0.0000653520878490535, 0.00006836828400903681, 0.00007146257248874113, 0.00007463447593939765, 0.00007788334878376474, 0.00008120828768996651, 0.00008460822180317937, 0.00008808197111592392, 0.00009162826246394013, 0.00009524561718379787, 0.0000989323217880672, 0.00010268641529207459, 0.00010650572670297642, 0.00011038797758602729, 0.00011433071893118852, 0.00011833127277888537, 0.0001223867211507117, 0.0001264939791526471, 0.0001306498943438022, 0.00013485120459499745, 0.0001390945080465441, 0.0001433761787732808, 0.0001476923508970611, 0.0001520390228045441, 0.00015641203030453322, 0.0001608069510673283, 0.00016521898552431528, 0.0001696430686231646, 0.0001740740165774301, 0.00017850636200629103, 0.0001829343448175031, 0.00018735205242694257, 0.000191753562437378, 0.00019613295450734188, 0.00020048414321002534, 0.00020480094575553342, 0.00020907706346541747, 0.00021330607883745088, 0.00021748145118260308, 0.00022159611743123445, 0.0002256425365807074, 0.0002296129456080256, 0.00023349938436811445, 0.00023729369397980805, 0.00024098757818162363, 0.0002445732198467269, 0.00024804316088030066, 0.00025138980120093706, 0.00025460575109546185, 0.00025768336513093236, 0.000260614166491108, 0.00026338871874574443, 0.000265996883919168, 0.00026842872851524756, 0.0002706745796903796, 0.00027272653793114146, 0.0002745790007011535, 0.0002762259706331217, 0.0002776600678298683, 0.0002788693645809233, 0.0002798371088712506, 0.0002805501390130166, 0.0002810071637276198, 0.0002812218387032567, 0.0002811853995116189, 0.0002808065268305555, 0.000280197444464886, 0.00027926833477321045, 0.0002780409500002217, 0.0002765020258372484, 0.00027464338678576605, 0.00027245845620400524, 0.0002699387312629035, 0.0002670776879725044, 0.0002638682356241208, 0.00026030295633048156, 0.0002563760351381784, 0.00025208079324849864, 0.00024741089077219824, 0.00024236092911432053, 0.00023692535214431433, 0.00023109887243694582, 0.0002248766203312044, 0.00021825436568685826, 0.0002112279751888258, 0.00020379342129965214, 0.00019594765441000844, 0.00018768793613519225, 0.00017901156693343162, 0.0001699163889323255, 0.00016040086314937234, 0.00015046397564821766, 0.00014010492118016657, 0.00012932331202118152, 0.00011811939311034222, 0.00010649390448787931, 0.00009444816369190979, 0.00008198390428241564, 0.00006910334679829026, 0.00005580947004681174, 0.000042105866991998394, 0.000027996578416041823, 0.000013486064917873263, -0.0000014205550195404417, -0.000016717431552354825, -0.00003239824489309241, -0.00004845619470295486, -0.00006488392097284113, -0.00008167344072768395, -0.00009881608266779326, -0.00011630254584578235, -0.000134122927443183, -0.0001522667855569792, -0.00017072306915224178, -0.0001894800112434245, -0.00020852521704417434, -0.00022784574374784246, -0.00024742817471772824, -0.00026725858015049425, -0.00028732242720909374, -0.0003076045740274102, -0.00032808926773727473, -0.0003487602312779994, -0.0003696006180382817, -0.00039059290984859706, -0.00041171900064429, -0.00043296032505169577, -0.00045429794314525324, -0.0004757124161811035, -0.0004971838198071831, -0.0005186919510053738, -0.0005402162469729259, -0.0005617356366067017, -0.0005832284295812785, -0.0006046723908249317, -0.0006260449390330644, -0.0006473231692560336, -0.0006684839703829051, -0.0006895039843981559, -0.000710359669543136, -0.000731027532147202, -0.0007514837903863777, -0.000771704162227947, -0.0007916639719227004, -0.0008113383362587028, -0.0008307023010845163, -0.0008497307715244494, -0.0008683991132471614, -0.0008866831646045461, -0.0009045584634477986, -0.000922000299232565, -0.0009389835464993075, -0.0009554827702629912, -0.0009714727766152153, -0.000986929306593871, -0.0010018296635038234, -0.001016150958603644, -0.0010298692409237303, -0.0010429598373262593, -0.0010553976134962566, -0.001067160927893583, -0.0010782313132298208, -0.0010885880181663468, -0.001098205538071845, -0.0011070578885002702, -0.001115133482641312, -0.0011224205008357393, -0.0011288733610789721, -0.001134502525433292, -0.0011392722062450377, -0.001143172631327465, -0.0011461862709457055, -0.0011482970085184934, -0.0011494916928265647, -0.0011497552449535495, -0.001149075700165883, -0.0011474412643782891, -0.00114484006082293, -0.0011412629577426628, -0.001136700795386366, -0.0011311451534842774, -0.0011245894559787622, -0.0011170279740759658, -0.00110845587457712, -0.0010988693663578895, -0.0010882663676571244, -0.0010766458418348251, -0.0010640072735802143, -0.0010503518239957826, -0.0010356821468104041, -0.0010200018714693214, -0.0010033157303544313, -0.000985629760693179, -0.0009669515631450903, -0.0009472899718477435, -0.0009266549999954207, -0.0009050579826107043, -0.0008825115697880996, -0.0008590299683449941, -0.0008346286688776923, -0.0008093242093186422, -0.0007831344484904399, -0.0007560787238727222, -0.0007281777992737946, -0.0006994535909524986, -0.0006699292108326442, -0.0006396291849638128, -0.0006085793855511994, -0.0005768070388328386, -0.0005443406366124165, -0.0005112097970335273, -0.00047744526762494543, -0.00044307897054750035, -0.00040814409766798117, -0.0003726750006857615, -0.0003367070808797812, -0.00030027682371347247, -0.0002634218056255867, -0.00022618073814697159, -0.00018859337566807589, -0.0001507003780746852, -0.00011254324298833094, -0.00007416428731734924, -0.00003560670730199985, 0.000003085523548063785, 0.000041867710432921324, 0.00008069434503517607, 0.00011951910789599325, 0.00015829502033131527, 0.00019697472076561434, 0.00023551045567409698, 0.000273853967149023, 0.0003119566063859104, 0.0003497693944357311, 0.0003872430841974543, 0.0004243281073189398, 0.00046097456525713825, 0.0004971324209116283, 0.000532751652541773, 0.0005677825044850944, 0.0006021753837116698, 0.0006358806886685873, 0.0006688490401380291, 0.0007010312176003141, 0.0007323781414864676, 0.0007628410971964845, 0.0007923721224082782, 0.0008209242042168955, 0.000848450750988169, 0.0008749056596557243, 0.0009002434389593702, 0.0009244189680276405, 0.0009473882280306129, 0.0009691087604070867, 0.0009895395597688055, 0.0010086402935785192, 0.001026370720635107, 0.0010426918893056865, 0.0010575665723725415, 0.001070959957358151, 0.0010828391940482756, 0.0010931703343583935, 0.0011019202109286796, 0.0011090596487870318, 0.0011145630445275898, 0.0011184043786736124, 0.001120554074746838, 0.0011209917680571181, 0.0011197029937617083, 0.0011166562966771064, 0.0011118464276884984, 0.0011052512953704699, 0.0010968607244598726, 0.0010866638388056194, 0.0010746506726143957, 0.001060816695739025, 0.001045155823714897, 0.0010276670439197623, 0.001008351157157161, 0.0009872096007023739, 0.0009642482949221396, 0.0009394748128782626, 0.0009128984193201994, 0.0008845315727779604, 0.0008543893284299989, 0.0008224889133179016, 0.0007888494392687725, 0.0007534931574735429, 0.0007164452155151603, 0.0006777324637972142, 0.0006373842981041069, 0.0005954329812500334, 0.0005519133506181678, 0.0005068625728051466, 0.00046032000323413937, 0.0004123276053463404, 0.00036292989933373846, 0.00031217386261437, 0.00026010877383320427, 0.0002067859842737511, 0.00015225938436383264, 0.0000965854576875034, 0.00003982286749323625, -0.0000179677059230694, -0.00007672351611450484, -0.00013637955229787953, -0.00019686867752685767, -0.00025812174980963077, -0.0003200676217906621, -0.0003826333414430741, -0.0004457441136063003, -0.0005093232294712956, -0.0005732921654282367, -0.00063757077202539, -0.0007020774864868515, -0.0007667293014381896, -0.000831441760556577, -0.0008961290102706094, -0.0009607038567017785, -0.0010250779361669813, -0.0010891617777670183, -0.0011528648888359837, -0.0012160958997774157, -0.001278762708717709, -0.0013407725703934634, -0.0014020320140358438, -0.0014624469501256642, -0.0015219229140548082, -0.0015803651881932726, -0.0016376788121915474, -0.0016937685933671551, -0.0017485393883605888, -0.0018018962922161296, -0.001853744622258798, -0.0019039899562331246, -0.0019525381533939561, -0.001999295568971595, -0.0020441692691091497, -0.0020870671590057003, -0.0021278980935438433, -0.002166571859834074, -0.0022029993905251185, -0.002237092766198614, -0.0022687651100535395, -0.0022979310017697827, -0.002324506765063281, -0.002348410532134342, -0.0023695620904663124, -0.002387882877950405, -0.0024032962764901395, -0.002415727498004215, -0.0024251041062769677, -0.0024313565047816045, -0.002434417346479244, -0.002434221285942243, -0.0024307050845577974, -0.0024238084309784105, -0.0024134744272458933, -0.0023996490147598095, -0.0023822808507958644, -0.002361320552774569, -0.0023367219180767287, -0.0023084438037733195, -0.0022764477146557157, -0.0022406968577953325, -0.0022011577213322964, -0.002157802353593739, -0.0021106071299345493, -0.0020595468628108226, -0.0020046032562800113, -0.0019457662560451291, -0.0018830178785251698, -0.0018163568650903469, -0.0017457762721459498, -0.0016712774888046648, -0.0015928655517344435, -0.0015105465040104254, -0.0014243352289427366, -0.001334245183172585, -0.0012402971508224737, -0.001142515914146565, -0.001040927635788706, -0.0009355648118899454, -0.0008264637875103248, -0.0007136636835055012, -0.0005972078914059598, -0.00047714437051389635, -0.0003535251665308113, -0.00022640509673521253, -0.00009584304366831371, 0.00003809737583447662, 0.000175349189952471, 0.0003158420005530984, 0.00045950168388054715, 0.0006062501796784794, 0.0007560055720837391, 0.0009086826695053086, 0.0010641930047446363, 0.0012224448181092644, 0.001383342762009772, 0.0015467879147444098, 0.0017126784900794694, 0.0018809098064416602, 0.002051374038980255, 0.00222396027153397, 0.0023985546780390995, 0.00257504080294078, 0.002753299611825817, 0.0029332096760600742, 0.0031146471999652266, 0.00329748586141485, 0.0034815970640890118, 0.0036668502022383534, 0.0038531128164763875, 0.004040250654892737, 0.004228127702681014, 0.004416606372309768, 0.004605547604211298, 0.004794811008263008, 0.004984255005236749, 0.005173736922644052, 0.005363113237573505, 0.005552239713188401, 0.005740971456077898, 0.005929163001618124, 0.006116668526010137, 0.006303342137957434, 0.006489037895773713, 0.006673609810898314, 0.006856912040272674, 0.007038799176867838, 0.007219126469467923, 0.00739774981209459, 0.007574525856115118, 0.00774931217821552, 0.007921967422212448, 0.008092351521264793, 0.008260325786691655, 0.0084257530686515, 0.008588497916423984, 0.008748426684777003, 0.008905407631376806, 0.00905931090707958, 0.009210008945621842, 0.009357376767512868, 0.0095012918586961, 0.009641634222518982, 0.009778286439590446, 0.009911133869143742, 0.010040064826756685, 0.010164970855541414, 0.010285747084632053, 0.01040229168758197, 0.010514505774592219, 0.010622294054150362, 0.010725565119997272, 0.010824231613731668, 0.010918209734582957, 0.011007419162404072, 0.01109178352506284, 0.011171230745049823, 0.011245693678816775, 0.011315108689601935, 0.011379415321537538, 0.011438558592290933, 0.011492488522300438, 0.011541158942797008, 0.01158452699694985, 0.011622555335241312, 0.011655213312299231, 0.011682471044774176, 0.011704304362857888, 0.011720697805424401, 0.011731632913262123, 0.011737103714478897, 0.011737103714478897, 0.011731632913262123, 0.011720697805424401, 0.011704304362857888, 0.011682471044774176, 0.011655213312299231, 0.011622555335241312, 0.01158452699694985, 0.011541158942797008, 0.011492488522300438, 0.011438558592290933, 0.011379415321537538, 0.011315108689601935, 0.011245693678816775, 0.011171230745049823, 0.01109178352506284, 0.011007419162404072, 0.010918209734582957, 0.010824231613731668, 0.010725565119997272, 0.010622294054150362, 0.010514505774592219, 0.01040229168758197, 0.010285747084632053, 0.010164970855541414, 0.010040064826756685, 0.009911133869143742, 0.009778286439590446, 0.009641634222518982, 0.0095012918586961, 0.009357376767512868, 0.009210008945621842, 0.00905931090707958, 0.008905407631376806, 0.008748426684777003, 0.008588497916423984, 0.0084257530686515, 0.008260325786691655, 0.008092351521264793, 0.007921967422212448, 0.00774931217821552, 0.007574525856115118, 0.00739774981209459, 0.007219126469467923, 0.007038799176867838, 0.006856912040272674, 0.006673609810898314, 0.006489037895773713, 0.006303342137957434, 0.006116668526010137, 0.005929163001618124, 0.005740971456077898, 0.005552239713188401, 0.005363113237573505, 0.005173736922644052, 0.004984255005236749, 0.004794811008263008, 0.004605547604211298, 0.004416606372309768, 0.004228127702681014, 0.004040250654892737, 0.0038531128164763875, 0.0036668502022383534, 0.0034815970640890118, 0.00329748586141485, 0.0031146471999652266, 0.0029332096760600742, 0.002753299611825817, 0.00257504080294078, 0.0023985546780390995, 0.00222396027153397, 0.002051374038980255, 0.0018809098064416602, 0.0017126784900794694, 0.0015467879147444098, 0.001383342762009772, 0.0012224448181092644, 0.0010641930047446363, 0.0009086826695053086, 0.0007560055720837391, 0.0006062501796784794, 0.00045950168388054715, 0.0003158420005530984, 0.000175349189952471, 0.00003809737583447662, -0.00009584304366831371, -0.00022640509673521253, -0.0003535251665308113, -0.00047714437051389635, -0.0005972078914059598, -0.0007136636835055012, -0.0008264637875103248, -0.0009355648118899454, -0.001040927635788706, -0.001142515914146565, -0.0012402971508224737, -0.001334245183172585, -0.0014243352289427366, -0.0015105465040104254, -0.0015928655517344435, -0.0016712774888046648, -0.0017457762721459498, -0.0018163568650903469, -0.0018830178785251698, -0.0019457662560451291, -0.0020046032562800113, -0.0020595468628108226, -0.0021106071299345493, -0.002157802353593739, -0.0022011577213322964, -0.0022406968577953325, -0.0022764477146557157, -0.0023084438037733195, -0.0023367219180767287, -0.002361320552774569, -0.0023822808507958644, -0.0023996490147598095, -0.0024134744272458933, -0.0024238084309784105, -0.0024307050845577974, -0.002434221285942243, -0.002434417346479244, -0.0024313565047816045, -0.0024251041062769677, -0.002415727498004215, -0.0024032962764901395, -0.002387882877950405, -0.0023695620904663124, -0.002348410532134342, -0.002324506765063281, -0.0022979310017697827, -0.0022687651100535395, -0.002237092766198614, -0.0022029993905251185, -0.002166571859834074, -0.0021278980935438433, -0.0020870671590057003, -0.0020441692691091497, -0.001999295568971595, -0.0019525381533939561, -0.0019039899562331246, -0.001853744622258798, -0.0018018962922161296, -0.0017485393883605888, -0.0016937685933671551, -0.0016376788121915474, -0.0015803651881932726, -0.0015219229140548082, -0.0014624469501256642, -0.0014020320140358438, -0.0013407725703934634, -0.001278762708717709, -0.0012160958997774157, -0.0011528648888359837, -0.0010891617777670183, -0.0010250779361669813, -0.0009607038567017785, -0.0008961290102706094, -0.000831441760556577, -0.0007667293014381896, -0.0007020774864868515, -0.00063757077202539, -0.0005732921654282367, -0.0005093232294712956, -0.0004457441136063003, -0.0003826333414430741, -0.0003200676217906621, -0.00025812174980963077, -0.00019686867752685767, -0.00013637955229787953, -0.00007672351611450484, -0.0000179677059230694, 0.00003982286749323625, 0.0000965854576875034, 0.00015225938436383264, 0.0002067859842737511, 0.00026010877383320427, 0.00031217386261437, 0.00036292989933373846, 0.0004123276053463404, 0.00046032000323413937, 0.0005068625728051466, 0.0005519133506181678, 0.0005954329812500334, 0.0006373842981041069, 0.0006777324637972142, 0.0007164452155151603, 0.0007534931574735429, 0.0007888494392687725, 0.0008224889133179016, 0.0008543893284299989, 0.0008845315727779604, 0.0009128984193201994, 0.0009394748128782626, 0.0009642482949221396, 0.0009872096007023739, 0.001008351157157161, 0.0010276670439197623, 0.001045155823714897, 0.001060816695739025, 0.0010746506726143957, 0.0010866638388056194, 0.0010968607244598726, 0.0011052512953704699, 0.0011118464276884984, 0.0011166562966771064, 0.0011197029937617083, 0.0011209917680571181, 0.001120554074746838, 0.0011184043786736124, 0.0011145630445275898, 0.0011090596487870318, 0.0011019202109286796, 0.0010931703343583935, 0.0010828391940482756, 0.001070959957358151, 0.0010575665723725415, 0.0010426918893056865, 0.001026370720635107, 0.0010086402935785192, 0.0009895395597688055, 0.0009691087604070867, 0.0009473882280306129, 0.0009244189680276405, 0.0009002434389593702, 0.0008749056596557243, 0.000848450750988169, 0.0008209242042168955, 0.0007923721224082782, 0.0007628410971964845, 0.0007323781414864676, 0.0007010312176003141, 0.0006688490401380291, 0.0006358806886685873, 0.0006021753837116698, 0.0005677825044850944, 0.000532751652541773, 0.0004971324209116283, 0.00046097456525713825, 0.0004243281073189398, 0.0003872430841974543, 0.0003497693944357311, 0.0003119566063859104, 0.000273853967149023, 0.00023551045567409698, 0.00019697472076561434, 0.00015829502033131527, 0.00011951910789599325, 0.00008069434503517607, 0.000041867710432921324, 0.000003085523548063785, -0.00003560670730199985, -0.00007416428731734924, -0.00011254324298833094, -0.0001507003780746852, -0.00018859337566807589, -0.00022618073814697159, -0.0002634218056255867, -0.00030027682371347247, -0.0003367070808797812, -0.0003726750006857615, -0.00040814409766798117, -0.00044307897054750035, -0.00047744526762494543, -0.0005112097970335273, -0.0005443406366124165, -0.0005768070388328386, -0.0006085793855511994, -0.0006396291849638128, -0.0006699292108326442, -0.0006994535909524986, -0.0007281777992737946, -0.0007560787238727222, -0.0007831344484904399, -0.0008093242093186422, -0.0008346286688776923, -0.0008590299683449941, -0.0008825115697880996, -0.0009050579826107043, -0.0009266549999954207, -0.0009472899718477435, -0.0009669515631450903, -0.000985629760693179, -0.0010033157303544313, -0.0010200018714693214, -0.0010356821468104041, -0.0010503518239957826, -0.0010640072735802143, -0.0010766458418348251, -0.0010882663676571244, -0.0010988693663578895, -0.00110845587457712, -0.0011170279740759658, -0.0011245894559787622, -0.0011311451534842774, -0.001136700795386366, -0.0011412629577426628, -0.00114484006082293, -0.0011474412643782891, -0.001149075700165883, -0.0011497552449535495, -0.0011494916928265647, -0.0011482970085184934, -0.0011461862709457055, -0.001143172631327465, -0.0011392722062450377, -0.001134502525433292, -0.0011288733610789721, -0.0011224205008357393, -0.001115133482641312, -0.0011070578885002702, -0.001098205538071845, -0.0010885880181663468, -0.0010782313132298208, -0.001067160927893583, -0.0010553976134962566, -0.0010429598373262593, -0.0010298692409237303, -0.001016150958603644, -0.0010018296635038234, -0.000986929306593871, -0.0009714727766152153, -0.0009554827702629912, -0.0009389835464993075, -0.000922000299232565, -0.0009045584634477986, -0.0008866831646045461, -0.0008683991132471614, -0.0008497307715244494, -0.0008307023010845163, -0.0008113383362587028, -0.0007916639719227004, -0.000771704162227947, -0.0007514837903863777, -0.000731027532147202, -0.000710359669543136, -0.0006895039843981559, -0.0006684839703829051, -0.0006473231692560336, -0.0006260449390330644, -0.0006046723908249317, -0.0005832284295812785, -0.0005617356366067017, -0.0005402162469729259, -0.0005186919510053738, -0.0004971838198071831, -0.0004757124161811035, -0.00045429794314525324, -0.00043296032505169577, -0.00041171900064429, -0.00039059290984859706, -0.0003696006180382817, -0.0003487602312779994, -0.00032808926773727473, -0.0003076045740274102, -0.00028732242720909374, -0.00026725858015049425, -0.00024742817471772824, -0.00022784574374784246, -0.00020852521704417434, -0.0001894800112434245, -0.00017072306915224178, -0.0001522667855569792, -0.000134122927443183, -0.00011630254584578235, -0.00009881608266779326, -0.00008167344072768395, -0.00006488392097284113, -0.00004845619470295486, -0.00003239824489309241, -0.000016717431552354825, -0.0000014205550195404417, 0.000013486064917873263, 0.000027996578416041823, 0.000042105866991998394, 0.00005580947004681174, 0.00006910334679829026, 0.00008198390428241564, 0.00009444816369190979, 0.00010649390448787931, 0.00011811939311034222, 0.00012932331202118152, 0.00014010492118016657, 0.00015046397564821766, 0.00016040086314937234, 0.0001699163889323255, 0.00017901156693343162, 0.00018768793613519225, 0.00019594765441000844, 0.00020379342129965214, 0.0002112279751888258, 0.00021825436568685826, 0.0002248766203312044, 0.00023109887243694582, 0.00023692535214431433, 0.00024236092911432053, 0.00024741089077219824, 0.00025208079324849864, 0.0002563760351381784, 0.00026030295633048156, 0.0002638682356241208, 0.0002670776879725044, 0.0002699387312629035, 0.00027245845620400524, 0.00027464338678576605, 0.0002765020258372484, 0.0002780409500002217, 0.00027926833477321045, 0.000280197444464886, 0.0002808065268305555, 0.0002811853995116189, 0.0002812218387032567, 0.0002810071637276198, 0.0002805501390130166, 0.0002798371088712506, 0.0002788693645809233, 0.0002776600678298683, 0.0002762259706331217, 0.0002745790007011535, 0.00027272653793114146, 0.0002706745796903796, 0.00026842872851524756, 0.000265996883919168, 0.00026338871874574443, 0.000260614166491108, 0.00025768336513093236, 0.00025460575109546185, 0.00025138980120093706, 0.00024804316088030066, 0.0002445732198467269, 0.00024098757818162363, 0.00023729369397980805, 0.00023349938436811445, 0.0002296129456080256, 0.0002256425365807074, 0.00022159611743123445, 0.00021748145118260308, 0.00021330607883745088, 0.00020907706346541747, 0.00020480094575553342, 0.00020048414321002534, 0.00019613295450734188, 0.000191753562437378, 0.00018735205242694257, 0.0001829343448175031, 0.00017850636200629103, 0.0001740740165774301, 0.0001696430686231646, 0.00016521898552431528, 0.0001608069510673283, 0.00015641203030453322, 0.0001520390228045441, 0.0001476923508970611, 0.0001433761787732808, 0.0001390945080465441, 0.00013485120459499745, 0.0001306498943438022, 0.0001264939791526471, 0.0001223867211507117, 0.00011833127277888537, 0.00011433071893118852, 0.00011038797758602729, 0.00010650572670297642, 0.00010268641529207459, 0.0000989323217880672, 0.00009524561718379787, 0.00009162826246394013, 0.00008808197111592392, 0.00008460822180317937, 0.00008120828768996651, 0.00007788334878376474, 0.00007463447593939765, 0.00007146257248874113, 0.00006836828400903681, 0.0000653520878490535, 0.00006241451652786996, 0.00005955600371707976, 0.00005677675565218903, 0.000054076836400090634, 0.000051456283434024254, 0.00004891512239763599, 0.00004645314118637872, 0.00004406996003435772, 0.000041765124869157065, 0.00003953809180607858, 0.000037388352711032095, 0.00003531515315607694, 0.0000333174817796639, 0.000031394387750225555, 0.00002954497152514943, 0.00002776823090942686, 0.000026062787460182665, 0.00002442737159197627, 0.000022860960742170415, 0.00002136207377464052, 0.00001992924403854817, 0.000018561209740219567, 0.00001725659281802051, 0.00001601386713533323, 0.000014831347439124435, 0.00001370786337628007, 0.000012641797347255405, 0.000011631201209261511, 0.00001067513223630924, 0.000009771649771624484, 0.000008919034969234169, 0.000008116254962232182, 0.000007360859185648702, 0.000006651966903409214, 0.0000059874129268137184, 0.0000053659189590266235, 0.000022913289467138396
4444 };
4545
46−const float* firCoeffs[COEFFS_SIZE] = { fir2XLow, fir4XLow, fir8XLow, fir16XLow, fir32XLow, fir64XLow, fir2XHigh, fir4XHigh, fir8XHigh, fir16XHigh, fir32XHigh, fir64XHigh
46+const float* __leaf_tableref_firCoeffs[COEFFS_SIZE] = { __leaf_table_fir2XLow, __leaf_table_fir4XLow, __leaf_table_fir8XLow, __leaf_table_fir16XLow, __leaf_table_fir32XLow, __leaf_table_fir64XLow, __leaf_table_fir2XHigh, __leaf_table_fir4XHigh, __leaf_table_fir8XHigh, __leaf_table_fir16XHigh, __leaf_table_fir32XHigh, __leaf_table_fir64XHigh
4747 };
4848
49−const float firNumTaps[COEFFS_SIZE] = { 32, 32, 64, 128, 256, 256, 128, 256, 256, 512, 512, 1024 };
49+const float __leaf_tablesize_firNumTaps[COEFFS_SIZE] = { 32, 32, 64, 128, 256, 256, 128, 256, 256, 512, 512, 1024 };
5050
51−const float shaper1[SHAPER1_TABLE_SIZE] = {0.333061f, 0.333022f, 0.332983f, 0.332944f, 0.332905f, 0.332866f, 0.332827f, 0.332788f, 0.332749f, 0.33271f, 0.332671f, 0.332632f, 0.332593f, 0.332554f, 0.332515f, 0.332475f, 0.332436f, 0.332397f, 0.332358f, 0.332319f,
51+const float __leaf_table_shaper1[SHAPER1_TABLE_SIZE] = {0.333061f, 0.333022f, 0.332983f, 0.332944f, 0.332905f, 0.332866f, 0.332827f, 0.332788f, 0.332749f, 0.33271f, 0.332671f, 0.332632f, 0.332593f, 0.332554f, 0.332515f, 0.332475f, 0.332436f, 0.332397f, 0.332358f, 0.332319f,
5252 0.33228f, 0.33224f, 0.332201f, 0.332162f, 0.332123f, 0.332083f, 0.332044f, 0.332005f, 0.331966f, 0.331926f, 0.331887f, 0.331848f, 0.331808f, 0.331769f, 0.33173f, 0.33169f, 0.331651f, 0.331611f, 0.331572f, 0.331533f,
5353 0.331493f, 0.331454f, 0.331414f, 0.331375f, 0.331335f, 0.331296f, 0.331256f, 0.331217f, 0.331177f, 0.331138f, 0.331098f, 0.331059f, 0.331019f, 0.330979f, 0.33094f, 0.3309f, 0.330861f, 0.330821f, 0.330781f, 0.330742f,
5454 0.330702f, 0.330662f, 0.330623f, 0.330583f, 0.330543f, 0.330504f, 0.330464f, 0.330424f, 0.330384f, 0.330344f, 0.330305f, 0.330265f, 0.330225f, 0.330185f, 0.330145f, 0.330106f, 0.330066f, 0.330026f, 0.329986f, 0.329946f,
@@ -3326,7 +3326,7 @@ const float shaper1[SHAPER1_TABLE_SIZE] = {0.333061f, 0.333022f, 0.332983f, 0.33 · 3271 unmodified lines
33263326 -0.220433f, -0.220479f, -0.220526f, -0.220572f, -0.220618f, -0.220664f, -0.22071f, -0.220756f, -0.220802f, -0.220848f, -0.220894f, -0.22094f, -0.220986f, -0.221032f, -0.221078f, -0.221124f, -0.22117f, -0.221216f, -0.221262f, -0.221308f,
33273327 -0.221354f, -0.221399f, -0.221445f, -0.221491f, -0.221537f, -0.221583f, -0.221629f, -0.221675f, -0.22172f, -0.221766f, -0.221812f, -0.221858f, -0.221904f, -0.221949f, -0.221995f, -0.222041f, };
33283328
3329−const float sawtooth[11][SAW_TABLE_SIZE] =
3329+const float __leaf_table_sawtooth[11][SAW_TABLE_SIZE] =
33303330 {
33313331
33323332 {
@@ -3376,7 +3376,7 @@ const float sawtooth[11][SAW_TABLE_SIZE] = · 43 unmodified lines
33763376 };
33773377
33783378
3379−const float triangle[11][TRI_TABLE_SIZE] =
3379+const float __leaf_table_triangle[11][TRI_TABLE_SIZE] =
33803380 {
33813381
33823382 {
@@ -3424,7 +3424,7 @@ const float triangle[11][TRI_TABLE_SIZE] = · 41 unmodified lines
34243424 }
34253425 };
34263426
3427−const float squarewave[11][SQR_TABLE_SIZE] =
3427+const float __leaf_table_squarewave[11][SQR_TABLE_SIZE] =
34283428 {
34293429
34303430 {
@@ -3473,7 +3473,7 @@ const float squarewave[11][SQR_TABLE_SIZE] = · 42 unmodified lines
34733473
34743474 };
34753475
3476−const float exp_decay[EXP_DECAY_TABLE_SIZE] = {
3476+const float __leaf_table_exp_decay[EXP_DECAY_TABLE_SIZE] = {
34773477 1.0f, 0.999969f, 0.999939f, 0.999908f, 0.999878f, 0.999847f, 0.999817f, 0.999786f, 0.999756f, 0.999725f, 0.999695f, 0.999664f, 0.999634f, 0.999603f, 0.999573f, 0.999542f, 0.999512f, 0.999481f, 0.999451f, 0.99942f,
34783478 0.99939f, 0.999359f, 0.999329f, 0.999298f, 0.999268f, 0.999237f, 0.999207f, 0.999176f, 0.999146f, 0.999115f, 0.999085f, 0.999054f, 0.999024f, 0.998993f, 0.998963f, 0.998932f, 0.998902f, 0.998871f, 0.998841f, 0.99881f,
34793479 0.99878f, 0.998749f, 0.998719f, 0.998688f, 0.998658f, 0.998627f, 0.998597f, 0.998566f, 0.998536f, 0.998505f, 0.998475f, 0.998444f, 0.998414f, 0.998383f, 0.998353f, 0.998322f, 0.998292f, 0.998261f, 0.998231f, 0.9982f,
@@ -6753,7 +6753,7 @@ const float exp_decay[EXP_DECAY_TABLE_SIZE] = { · 3273 unmodified lines
67536753 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
67546754 };
67556755
6756−const float attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE] = {
6756+const float __leaf_table_attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE] = {
67576757 18000.0f, 10922.666667f, 5461.333333f, 3640.888889f, 2730.666667f, 2184.533333f, 1820.444444f, 1560.380952f, 1365.333333f, 1213.62963f, 1092.266667f, 992.969697f, 910.222222f, 840.205128f, 780.190476f, 728.177778f, 682.666667f, 642.509804f, 606.814815f, 574.877193f,
67586758 546.133333f, 520.126984f, 496.484848f, 474.898551f, 455.111111f, 436.906667f, 420.102564f, 404.54321f, 390.095238f, 376.643678f, 364.088889f, 352.344086f, 341.333333f, 330.989899f, 321.254902f, 312.07619f, 303.407407f, 295.207207f, 287.438596f, 280.068376f,
67596759 273.066667f, 266.406504f, 260.063492f, 254.015504f, 248.242424f, 242.725926f, 237.449275f, 232.397163f, 227.555556f, 222.911565f, 218.453333f, 214.169935f, 210.051282f, 206.08805f, 202.271605f, 198.593939f, 195.047619f, 191.625731f, 188.321839f, 185.129944f,
@@ -10033,7 +10033,7 @@ const float attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE] = { · 3273 unmodified lines
1003310033 0.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,
1003410034 };
1003510035
10036−const float filtertan[FILTERTAN_TABLE_SIZE] = {
10036+const float __leaf_table_filtertan[FILTERTAN_TABLE_SIZE] = {
1003710037 0.001349f, 0.001351f, 0.001354f, 0.001356f, 0.001358f, 0.00136f, 0.001362f, 0.001365f, 0.001367f, 0.001369f, 0.001371f, 0.001373f, 0.001376f, 0.001378f, 0.00138f, 0.001382f, 0.001384f, 0.001387f, 0.001389f, 0.001391f,
1003810038 0.001393f, 0.001396f, 0.001398f, 0.0014f, 0.001402f, 0.001405f, 0.001407f, 0.001409f, 0.001411f, 0.001414f, 0.001416f, 0.001418f, 0.00142f, 0.001423f, 0.001425f, 0.001427f, 0.00143f, 0.001432f, 0.001434f, 0.001437f,
1003910039 0.001439f, 0.001441f, 0.001444f, 0.001446f, 0.001448f, 0.00145f, 0.001453f, 0.001455f, 0.001458f, 0.00146f, 0.001462f, 0.001465f, 0.001467f, 0.001469f, 0.001472f, 0.001474f, 0.001476f, 0.001479f, 0.001481f, 0.001484f,
@@ -13936,7 +13936,7 @@ const float tanh1[TANH1_TABLE_SIZE] = {-0.964028f, -0.964023f, -0.964019f, -0.96 · 3896 unmodified lines
1393613936
1393713937 #endif
1393813938
13939−const float sinewave[SINE_TABLE_SIZE] = {0.0f, 0.00305f, 0.00613f, 0.00919f, 0.01227f, 0.01532f, 0.0184f, 0.02145f, 0.02454f, 0.02759f, 0.03067f, 0.03372f, 0.0368f, 0.03986f, 0.04291f, 0.04599f, 0.04904f, 0.05212f, 0.05518f, 0.05823f,
13939+const float __leaf_table_sinewave[SINE_TABLE_SIZE] = {0.0f, 0.00305f, 0.00613f, 0.00919f, 0.01227f, 0.01532f, 0.0184f, 0.02145f, 0.02454f, 0.02759f, 0.03067f, 0.03372f, 0.0368f, 0.03986f, 0.04291f, 0.04599f, 0.04904f, 0.05212f, 0.05518f, 0.05823f,
1394013940 0.06131f, 0.06436f, 0.06741f, 0.0705f, 0.07355f, 0.0766f, 0.07965f, 0.08273f, 0.08578f, 0.08884f, 0.09189f, 0.09494f, 0.09799f, 0.10104f, 0.1041f, 0.10715f, 0.1102f, 0.11325f, 0.1163f, 0.11935f,
1394113941 0.12241f, 0.12543f, 0.12848f, 0.13153f, 0.13455f, 0.1376f, 0.14066f, 0.14368f, 0.1467f, 0.14975f, 0.15277f, 0.15582f, 0.15884f, 0.16187f, 0.16489f, 0.16791f, 0.17093f, 0.17398f, 0.17697f, 0.17999f,
1394213942 0.18301f, 0.18604f, 0.18906f, 0.19205f, 0.19507f, 0.19809f, 0.20108f, 0.2041f, 0.20709f, 0.21008f, 0.2131f, 0.21609f, 0.21909f, 0.22208f, 0.22507f, 0.22806f, 0.23105f, 0.23401f, 0.237f, 0.23999f,

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