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
21#include "leaf-filters.h"21#include "leaf-filters.h"
22#include "leaf-envelopes.h"22#include "leaf-envelopes.h"
23 23
24 /*!
25 * @internal
26 * Header.
27 * @include basic-oscillators.h
28 * @example basic-oscillators.c
29 * An example.
30 */
31
24 //==============================================================================32 //==============================================================================
25 33
26 /* Envelope Follower */34 /* Envelope Follower */
LEAF/Inc/leaf-delay.h+8−0
@@ -18,6 +18,14 @@ extern "C" { · 17 unmodified lines
18#include "leaf-math.h"18#include "leaf-math.h"
19#include "leaf-mempool.h"19#include "leaf-mempool.h"
20 20
21 /*!
22 * @internal
23 * Header.
24 * @include basic-oscillators.h
25 * @example basic-oscillators.c
26 * An example.
27 */
28
21 //==============================================================================29 //==============================================================================
22 30
23 /* Non-interpolating delay, reimplemented from STK (Cook and Scavone). */31 /* 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
19#include "leaf-mempool.h"19#include "leaf-mempool.h"
20#include "leaf-math.h"20#include "leaf-math.h"
21 21
22 /*!
23 * @internal
24 * Header.
25 * @include basic-oscillators.h
26 * @example basic-oscillators.c
27 * An example.
28 */
29
22 //==============================================================================30 //==============================================================================
23 31
24 typedef struct _tSampleReducer32 typedef struct _tSampleReducer
@@ -136,6 +144,7 @@ extern "C" { · 111 unmodified lines
136 void tCrusher_setSamplingRatio (tCrusher* const, float ratio);144 void tCrusher_setSamplingRatio (tCrusher* const, float ratio);
137 145
138 //==============================================================================146 //==============================================================================
147
139 148
140#ifdef __cplusplus149#ifdef __cplusplus
141}150}
LEAF/Inc/leaf-dynamics.h+32−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
21#include "leaf-mempool.h"21#include "leaf-mempool.h"
22#include "leaf-analysis.h"22#include "leaf-analysis.h"
23 23
24 /*!
25 * @internal
26 * Header.
27 * @include basic-oscillators.h
28 * @example basic-oscillators.c
29 * An example.
30 */
31
24 //==============================================================================32 //==============================================================================
25 33
26 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~34 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@@ -80,6 +88,30 @@ extern "C" { · 53 unmodified lines
80 88
81 //==============================================================================89 //==============================================================================
82 90
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
83#ifdef __cplusplus115#ifdef __cplusplus
84}116}
85#endif117#endif
LEAF/Inc/leaf-effects.h+8−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
21#include "leaf-analysis.h"21#include "leaf-analysis.h"
22#include "leaf-envelopes.h"22#include "leaf-envelopes.h"
23 23
24 /*!
25 * @internal
26 * Header.
27 * @include basic-oscillators.h
28 * @example basic-oscillators.c
29 * An example.
30 */
31
24 //==============================================================================32 //==============================================================================
25 33
26 /* tTalkbox */34 /* tTalkbox */
LEAF/Inc/leaf-electrical.h+8−0
@@ -18,6 +18,14 @@ extern "C" { · 17 unmodified lines
18#include "leaf-math.h"18#include "leaf-math.h"
19#include "leaf-mempool.h"19#include "leaf-mempool.h"
20 20
21 /*!
22 * @internal
23 * Header.
24 * @include basic-oscillators.h
25 * @example basic-oscillators.c
26 * An example.
27 */
28
21 //==============================================================================29 //==============================================================================
22 30
23 typedef enum WDFComponentType31 typedef enum WDFComponentType
LEAF/Inc/leaf-envelopes.h+28−0
@@ -24,6 +24,14 @@ extern "C" { · 23 unmodified lines
24#include "leaf-analysis.h"24#include "leaf-analysis.h"
25#include "leaf-envelopes.h"25#include "leaf-envelopes.h"
26 26
27 /*!
28 * @internal
29 * Header.
30 * @include basic-oscillators.h
31 * @example basic-oscillators.c
32 * An example.
33 */
34
27 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~35 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
28 36
29 /* Attack-Decay envelope */37 /* Attack-Decay envelope */
@@ -154,6 +162,26 @@ extern "C" { · 124 unmodified lines
154 void tRamp_setVal (tRamp* const, float val);162 void tRamp_setVal (tRamp* const, float val);
155 163
156 164
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
157#ifdef __cplusplus185#ifdef __cplusplus
158}186}
159#endif187#endif
LEAF/Inc/leaf-filters.h+30−1
@@ -20,6 +20,14 @@ extern "C" { · 19 unmodified lines
20#include "leaf-delay.h"20#include "leaf-delay.h"
21#include "leaf-tables.h"21#include "leaf-tables.h"
22 22
23 /*!
24 * @internal
25 * Header.
26 * @include basic-oscillators.h
27 * @example basic-oscillators.c
28 * An example.
29 */
30
23 //==============================================================================31 //==============================================================================
24 32
25 /* tAllpass: Schroeder allpass. Comb-filter with feedforward and feedback. */33 /* tAllpass: Schroeder allpass. Comb-filter with feedforward and feedback. */
@@ -344,10 +352,31 @@ extern "C" { · 318 unmodified lines
344 void tFIR_freeFromPool (tFIR* const, tMempool* const);352 void tFIR_freeFromPool (tFIR* const, tMempool* const);
345 353
346 float tFIR_tick (tFIR* const, float input);354 float tFIR_tick (tFIR* const, float input);
347 void tFIR_coeffs (tFIR* const, float in);355
348 356
349 //==============================================================================357 //==============================================================================
350 358
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
351#ifdef __cplusplus380#ifdef __cplusplus
352}381}
353#endif382#endif
LEAF/Inc/leaf-global.h+22−9
@@ -15,17 +15,29 @@ · 14 unmodified lines
15extern "C" {15extern "C" {
16#endif16#endif
17 17
18 typedef struct _LEAF18#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
19 {25 {
20 float sampleRate;26 ///@{
21 float invSampleRate;27 float sampleRate; //!< The current audio sample rate. Set with LEAF_setSampleRate().
22 int blockSize;28 float invSampleRate; //!< The inverse of the current sample rate.
23 float twoPiTimesInvSampleRate;29 int blockSize; //!< The audio block size.
24 float (*random)(void);30 float twoPiTimesInvSampleRate; //!< Two-pi times the inverse of the current sample rate.
25 int clearOnAllocation;31 float (*random)(void); //!< A pointer to the random() function provided on initialization.
26 } LEAF;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;
27 39
28 extern LEAF leaf; // The global instance of LEAF.40 extern LEAF leaf;
29 41
30 //==============================================================================42 //==============================================================================
31 43
@@ -37,3 +49,4 @@ extern "C" { · 5 unmodified lines
37 49
38//==============================================================================50//==============================================================================
39 51
52
LEAF/Inc/leaf-instruments.h+8−0
@@ -21,6 +21,14 @@ extern "C" { · 20 unmodified lines
21#include "leaf-filters.h"21#include "leaf-filters.h"
22#include "leaf-envelopes.h"22#include "leaf-envelopes.h"
23 23
24 /*!
25 * @internal
26 * Header.
27 * @include basic-oscillators.h
28 * @example basic-oscillators.c
29 * An example.
30 */
31
24 //==============================================================================32 //==============================================================================
25 33
26 // 808 Cowbell34 // 808 Cowbell
LEAF/Inc/leaf-math.h+3−0
@@ -167,6 +167,9 @@ extern "C" { · 166 unmodified lines
167 167
168 float dbtorms(float f);168 float dbtorms(float f);
169 169
170 float atodb(float a);
171
172 float dbtoa(float db);
170 //==============================================================================173 //==============================================================================
171 174
172#ifdef __cplusplus175#ifdef __cplusplus
LEAF/Inc/leaf-mempool.h+62−30
@@ -54,8 +54,11 @@ extern "C" { · 53 unmodified lines
54 54
55 //#define size_t unsigned long55 //#define size_t unsigned long
56 56
57 /**57 /*!
58 * memory pool structure58 * @defgroup tmempool tMempool
59 * @ingroup mempool
60 * An object that can contain an additional mempool for the allocation of LEAF objects.
61 * @{
59 */62 */
60 63
61 // node of free list64 // node of free list
@@ -66,28 +69,75 @@ extern "C" { · 4 unmodified lines
66 size_t size;69 size_t size;
67 } mpool_node_t;70 } mpool_node_t;
68 71
69 typedef struct mpool_t {72 typedef struct _tMempool
73 {
70 void* mpool; // start of the mpool74 void* mpool; // start of the mpool
71 size_t usize; // used size of the pool75 size_t usize; // used size of the pool
72 size_t msize; // max size of the pool76 size_t msize; // max size of the pool
73 mpool_node_t* head; // first node of memory pool free list77 mpool_node_t* head; // first node of memory pool free list
74 } mpool_t;78 } _tMempool;
75
76 void mpool_create (char* memory, size_t size, mpool_t* pool);
77 79
78 void* mpool_alloc(size_t size, mpool_t* pool);80 typedef _tMempool* tMempool;
79 void* mpool_calloc(size_t asize, mpool_t* pool);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 //==============================================================================
80 118
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);
82 130
83 size_t mpool_get_size(mpool_t* pool);131 void mpool_free(void* ptr, _tMempool* pool);
84 size_t mpool_get_used(mpool_t* pool);132
133 size_t mpool_get_size(_tMempool* pool);
134 size_t mpool_get_used(_tMempool* pool);
85 135
86 void leaf_pool_init(char* memory, size_t size);136 void leaf_pool_init(char* memory, size_t size);
87 137
88 void* leaf_alloc(size_t size);138 void* leaf_alloc(size_t size);
89 void* leaf_calloc(size_t size);139 void* leaf_calloc(size_t size);
90 140
91 void leaf_free(void* ptr);141 void leaf_free(void* ptr);
92 142
93 size_t leaf_pool_get_size(void);143 size_t leaf_pool_get_size(void);
@@ -97,24 +147,6 @@ extern "C" { · 3 unmodified lines
97 147
98 void leaf_mempool_overrun(void);148 void leaf_mempool_overrun(void);
99 149
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
118#ifdef __cplusplus150#ifdef __cplusplus
119}151}
120#endif152#endif
LEAF/Inc/leaf-midi.h+282−41
@@ -20,10 +20,25 @@ extern "C" { · 19 unmodified lines
20#include "leaf-math.h"20#include "leaf-math.h"
21#include "leaf-envelopes.h"21#include "leaf-envelopes.h"
22 22
23 /*!
24 * @internal
25 * Header.
26 * @include basic-oscillators.h
27 * @example basic-oscillators.c
28 * An example.
29 */
30
23 //==============================================================================31 //==============================================================================
24 32
25 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~33 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
26 34
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
27 // STACK implementation (fixed size)42 // STACK implementation (fixed size)
28#define STACK_SIZE 12843#define STACK_SIZE 128
29 typedef struct _tStack44 typedef struct _tStack
@@ -38,21 +53,120 @@ extern "C" { · 8 unmodified lines
38 53
39 typedef _tStack* tStack;54 typedef _tStack* tStack;
40 55
41 void tStack_init (tStack* const);56 //! Initialize a tStack to the default LEAF mempool.
42 void tStack_free (tStack* const);57 /*!
43 void tStack_initToPool (tStack* const, tMempool* const);58 @param stack A pointer to the tStack to be initialized.
44 void tStack_freeFromPool (tStack* const, tMempool* const);59 */
45 60 void tStack_init (tStack* const stack);
46 void tStack_setCapacity (tStack* const, uint16_t cap);61
47 int tStack_addIfNotAlreadyThere (tStack* const, uint16_t item);62
48 void tStack_add (tStack* const, uint16_t item);63 //! Free a tStack from the default LEAF mempool.
49 int tStack_remove (tStack* const, uint16_t item);64 /*!
50 void tStack_clear (tStack* const);65 @param stack A pointer to the tStack to be freed.
51 int tStack_first (tStack* const);66 */
52 int tStack_getSize (tStack* const);67 void tStack_free (tStack* const stack);
53 int tStack_contains (tStack* const, uint16_t item);68
54 int tStack_next (tStack* const);69
55 int tStack_get (tStack* const, int which);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 */
56 170
57 /* tPoly */171 /* tPoly */
58 typedef struct _tPoly172 typedef struct _tPoly
@@ -93,32 +207,159 @@ extern "C" { · 34 unmodified lines
93 typedef _tPoly* tPoly;207 typedef _tPoly* tPoly;
94 208
95 /* MPoly*/209 /* MPoly*/
96 void tPoly_init (tPoly* const, int maxNumVoices);210 //! Initialize a tPoly to the default LEAF mempool.
97 void tPoly_free (tPoly* const);211 /*!
98 void tPoly_initToPool (tPoly* const, int maxNumVoices, tMempool* const);212 @param poly A pointer to the tPoly to be initialized.
99 void tPoly_freeFromPool (tPoly* const, tMempool* const);213 @param maxNumVoices The maximum number of voices this tPoly can handle at once.
100 214 */
101 //ADDING A NOTE215 void tPoly_init (tPoly* const poly, int maxNumVoices);
102 int tPoly_noteOn (tPoly* const, int note, uint8_t vel);216
103 int tPoly_noteOff (tPoly* const, uint8_t note);217
104 void tPoly_orderedAddToStack (tPoly* const, uint8_t noteVal);218 //! Free a tPoly from the default LEAF mempool.
105 void tPoly_setNumVoices (tPoly* const, uint8_t numVoices);219 /*!
106 220 @param poly A pointer to the tPoly to be freed.
107 void tPoly_setPitchBend (tPoly* const, float pitchBend);221 */
108 void tPoly_setPitchGlideActive (tPoly* const, oBool isActive);222 void tPoly_free (tPoly* const poly);
109 void tPoly_setPitchGlideTime (tPoly* const, float t);223
110 void tPoly_setBendGlideTime (tPoly* const polyh, float t);224
111 void tPoly_setBendSamplesPerTick (tPoly* const polyh, float t);225 //! Initialize a tPoly to a specified mempool.
112 void tPoly_tickPitch (tPoly* const);226 /*!
113 void tPoly_tickPitchGlide (tPoly* const);227 @param poly A pointer to the tPoly to be initialized.
114 void tPoly_tickPitchBend (tPoly* const);228 @param pool A pointer to the tMempool to which the tPoly should be initialized.
115 229 */
116 int tPoly_getNumVoices (tPoly* const);230 void tPoly_initToPool (tPoly* const poly, int maxNumVoices, tMempool* const pool);
117 int tPoly_getNumActiveVoices (tPoly* const);231
118 float tPoly_getPitch (tPoly* const, uint8_t voice);232
119 int tPoly_getKey (tPoly* const, uint8_t voice);233 //! Free a tPoly from a specified mempool.
120 int tPoly_getVelocity (tPoly* const, uint8_t voice);234 /*!
121 int tPoly_isOn (tPoly* const, uint8_t voice);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 /*! @} */
122 363
123 //==============================================================================364 //==============================================================================
124 365
LEAF/Inc/leaf-oscillators.h+469−67
@@ -15,28 +15,81 @@ extern "C" { · 14 unmodified lines
15 15
16#include "leaf-math.h"16#include "leaf-math.h"
17#include "leaf-mempool.h"17#include "leaf-mempool.h"
18#include "leaf-tables.h"
18#include "leaf-filters.h"19#include "leaf-filters.h"
19 20
21 /*!
22 * Header.
23 * @include basic-oscillators.h
24 * @example basic-oscillators.c
25 * An example.
26 */
27
20 //==============================================================================28 //==============================================================================
21 29
22 /* tCycle: Cycle/Sine waveform. Wavetable synthesis.*/
23 typedef struct _tCycle30 typedef struct _tCycle
24 {31 {
25 // Underlying phasor32 // Underlying phasor
26 float phase;33 float phase;
27 float inc,freq;34 float inc,freq;
28
29 } _tCycle;35 } _tCycle;
30 36
31 typedef _tCycle* tCycle;37 typedef _tCycle* tCycle;
32 38
33 void tCycle_init (tCycle* const);39 /*!
34 void tCycle_free (tCycle* const);40 * @defgroup tcycle tCycle
35 void tCycle_initToPool (tCycle* const, tMempool* const);41 * @ingroup oscillators
36 void tCycle_freeFromPool (tCycle* const, tMempool* const);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 /*! @} */
37 92
38 float tCycle_tick (tCycle* const);
39 int tCycle_setFreq (tCycle* const, float freq);
40 93
41 //==============================================================================94 //==============================================================================
42 95
@@ -46,18 +99,65 @@ extern "C" { · 3 unmodified lines
46 // Underlying phasor99 // Underlying phasor
47 float phase;100 float phase;
48 float inc,freq;101 float inc,freq;
49 102 TableName oct;
103 float w;
50 } _tTriangle;104 } _tTriangle;
51 105
52 typedef _tTriangle* tTriangle;106 typedef _tTriangle* tTriangle;
53 107
54 void tTriangle_init (tTriangle* const);108 /*!
55 void tTriangle_free (tTriangle* const);109 * @defgroup ttriangle tTriangle
56 void tTriangle_initToPool (tTriangle* const, tMempool* const);110 * @ingroup oscillators
57 void tTriangle_freeFromPool (tTriangle* const, tMempool* const);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);
58 151
59 float tTriangle_tick (tTriangle* const);152
60 int tTriangle_setFreq (tTriangle* const, float freq);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 /*! @} */
61 161
62 //==============================================================================162 //==============================================================================
63 163
@@ -67,18 +167,65 @@ extern "C" { · 3 unmodified lines
67 // Underlying phasor167 // Underlying phasor
68 float phase;168 float phase;
69 float inc,freq;169 float inc,freq;
70 170 TableName oct;
171 float w;
71 } _tSquare;172 } _tSquare;
72 173
73 typedef _tSquare* tSquare;174 typedef _tSquare* tSquare;
74 175
75 void tSquare_init (tSquare* const);176 /*!
76 void tSquare_free (tSquare* const);177 * @defgroup tsquare tSquare
77 void tSquare_initToPool (tSquare* const, tMempool* const);178 * @ingroup oscillators
78 void tSquare_freeFromPool(tSquare* const, tMempool* const);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);
79 227
80 float tSquare_tick (tSquare* const);228 /*! @} */
81 int tSquare_setFreq (tSquare* const, float freq);
82 229
83 //==============================================================================230 //==============================================================================
84 231
@@ -88,18 +235,65 @@ extern "C" { · 3 unmodified lines
88 // Underlying phasor235 // Underlying phasor
89 float phase;236 float phase;
90 float inc,freq;237 float inc,freq;
91 238 TableName oct;
239 float w;
92 } _tSawtooth;240 } _tSawtooth;
93 241
94 typedef _tSawtooth* tSawtooth;242 typedef _tSawtooth* tSawtooth;
95 243
96 void tSawtooth_init (tSawtooth* const);244 /*!
97 void tSawtooth_free (tSawtooth* const);245 * @defgroup tsawtooth tSawtooth
98 void tSawtooth_initToPool (tSawtooth* const, tMempool* const);246 * @ingroup oscillators
99 void tSawtooth_freeFromPool (tSawtooth* const, tMempool* const);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
100 272
101 float tSawtooth_tick (tSawtooth* const);273 //! Free a tSawtooth from a specified mempool.
102 int tSawtooth_setFreq (tSawtooth* const, float freq);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 /*! @} */
103 297
104 //==============================================================================298 //==============================================================================
105 299
@@ -113,23 +307,81 @@ extern "C" { · 7 unmodified lines
113 307
114 typedef _tPhasor* tPhasor;308 typedef _tPhasor* tPhasor;
115 309
116 void tPhasor_init (tPhasor* const);310 /*!
117 void tPhasor_free (tPhasor* const);311 * @defgroup tphasor Phasor
118 void tPhasor_initToPool (tPhasor* const, tMempool* const);312 * @ingroup oscillators
119 void tPhasor_freeFromPool(tPhasor* const, tMempool* const);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
120 338
121 float tPhasor_tick (tPhasor* const);339 //! Free a tPhasor from a specified mempool.
122 int tPhasor_setFreq (tPhasor* const, float freq);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 /*! @} */
123 363
124 //==============================================================================364 //==============================================================================
125 365
366 /*!
367 * @defgroup tnoise tNoise
368 * @ingroup oscillators
369 * @brief A noise generator.
370 * @{
371 */
372
126 /* tNoise. WhiteNoise, PinkNoise. */373 /* tNoise. WhiteNoise, PinkNoise. */
127 typedef enum NoiseType374 /*!
375 * Noise types
376 */
377 enum NoiseType
128 {378 {
129 WhiteNoise=0,379 WhiteNoise, //!< White noise. Full spectrum.
130 PinkNoise,380 PinkNoise, //!< Pink noise. Inverse frequency-proportional spectrum.
131 NoiseTypeNil,381 NoiseTypeNil,
132 } NoiseType;382 };
383
384 typedef enum NoiseType NoiseType;
133 385
134 typedef struct _tNoise386 typedef struct _tNoise
135 {387 {
@@ -141,23 +393,65 @@ extern "C" { · 5 unmodified lines
141 393
142 typedef _tNoise* tNoise;394 typedef _tNoise* tNoise;
143 395
144 void tNoise_init (tNoise* const, NoiseType type);396 //! Initialize a tNoise to the default LEAF mempool.
145 void tNoise_free (tNoise* const);397 /*!
146 void tNoise_initToPool (tNoise* const, NoiseType type, tMempool* const);398 @param osc A pointer to the tNoise to be initialized.
147 void tNoise_freeFromPool (tNoise* const, tMempool* const);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
148 417
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 /*! @} */
150 434
151 //==============================================================================435 //==============================================================================
152 436
153 /* tNeuron */437 /*!
154 typedef enum NeuronMode438 * @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
155 {448 {
156 NeuronNormal = 0,449 NeuronNormal, //!< Normal operation
157 NeuronTanh,450 NeuronTanh, //!< Tanh voltage shaping
158 NeuronAaltoShaper,451 NeuronAaltoShaper, //!< Aalto voltage shaping
159 NeuronModeNil452 NeuronModeNil
160 } NeuronMode;453 };
454 typedef enum NeuronMode NeuronMode;
161 455
162 typedef struct _tNeuron456 typedef struct _tNeuron
163 {457 {
@@ -178,23 +472,131 @@ extern "C" { · 14 unmodified lines
178 472
179 typedef _tNeuron* tNeuron;473 typedef _tNeuron* tNeuron;
180 474
181 void tNeuron_init (tNeuron* const);475 //! Initialize a tNeuron to the default LEAF mempool.
182 void tNeuron_free (tNeuron* const);476 /*!
183 void tNeuron_initToPool (tNeuron* const, tMempool* const);477 @param neuron A pointer to the tNeuron to be initialized.
184 void tNeuron_freeFromPool(tNeuron* const, tMempool* const);478 */
185 479 void tNeuron_init (tNeuron* const neuron);
186 void tNeuron_reset (tNeuron* const);480
187 float tNeuron_tick (tNeuron* const);481
188 void tNeuron_setMode (tNeuron* const, NeuronMode mode);482 //! Free a tNeuron from the default LEAF mempool.
189 void tNeuron_setCurrent (tNeuron* const, float current);483 /*!
190 void tNeuron_setK (tNeuron* const, float K);484 @param neuron A pointer to the tNeuron to be freed.
191 void tNeuron_setL (tNeuron* const, float L);485 */
192 void tNeuron_setN (tNeuron* const, float N);486 void tNeuron_free (tNeuron* const neuron);
193 void tNeuron_setC (tNeuron* const, float C);487
194 void tNeuron_setV1 (tNeuron* const, float V1);488
195 void tNeuron_setV2 (tNeuron* const, float V2);489 //! Initialize a tNeuron to a specified mempool.
196 void tNeuron_setV3 (tNeuron* const, float V3);490 /*!
197 void tNeuron_setTimeStep (tNeuron* const, float timestep);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 /*! @} */
198 600
199 //==============================================================================601 //==============================================================================
200 602
LEAF/Inc/leaf-physical.h+8−0
@@ -26,6 +26,14 @@ extern "C" { · 25 unmodified lines
26#include "leaf-envelopes.h"26#include "leaf-envelopes.h"
27#include "leaf-dynamics.h"27#include "leaf-dynamics.h"
28 28
29 /*!
30 * @internal
31 * Header.
32 * @include basic-oscillators.h
33 * @example basic-oscillators.c
34 * An example.
35 */
36
29 //==============================================================================37 //==============================================================================
30 38
31 /* Karplus Strong model */39 /* Karplus Strong model */
LEAF/Inc/leaf-reverb.h+8−0
@@ -22,6 +22,14 @@ extern "C" { · 21 unmodified lines
22#include "leaf-filters.h"22#include "leaf-filters.h"
23#include "leaf-oscillators.h"23#include "leaf-oscillators.h"
24 24
25 /*!
26 * @internal
27 * Header.
28 * @include basic-oscillators.h
29 * @example basic-oscillators.c
30 * An example.
31 */
32
25 //==============================================================================33 //==============================================================================
26 34
27 /* PRCReverb: Reverb, reimplemented from STK (Cook and Scavone). */35 /* PRCReverb: Reverb, reimplemented from STK (Cook and Scavone). */
LEAF/Inc/leaf-sampling.h+8−0
@@ -23,6 +23,14 @@ extern "C" { · 22 unmodified lines
23#include "leaf-mempool.h"23#include "leaf-mempool.h"
24#include "leaf-analysis.h"24#include "leaf-analysis.h"
25 25
26 /*!
27 * @internal
28 * Header.
29 * @include basic-oscillators.h
30 * @example basic-oscillators.c
31 * An example.
32 */
33
26 //==============================================================================34 //==============================================================================
27 35
28 typedef enum RecordMode36 typedef enum RecordMode
LEAF/Inc/leaf-tables.h+25−25
@@ -32,23 +32,23 @@ extern "C" { · 31 unmodified lines
32#define FILTERTAN_TABLE_SIZE 409632#define FILTERTAN_TABLE_SIZE 4096
33 33
34#define SHAPER1_TABLE_SIZE 6553634#define SHAPER1_TABLE_SIZE 65536
35extern const float shaper1[SHAPER1_TABLE_SIZE];35extern const float __leaf_table_shaper1[SHAPER1_TABLE_SIZE];
36 36
37#define COEFFS_SIZE 3237#define COEFFS_SIZE 32
38extern const float* firCoeffs[COEFFS_SIZE];38extern const float* __leaf_tableref_firCoeffs[COEFFS_SIZE];
39extern const float firNumTaps[COEFFS_SIZE];39extern const float __leaf_tablesize_firNumTaps[COEFFS_SIZE];
40extern const float fir2XLow[32];40extern const float __leaf_table_fir2XLow[32];
41extern const float fir4XLow[64];41extern const float __leaf_table_fir4XLow[64];
42extern const float fir8XLow[64];42extern const float __leaf_table_fir8XLow[64];
43extern const float fir16XLow[128];43extern const float __leaf_table_fir16XLow[128];
44extern const float fir32XLow[256];44extern const float __leaf_table_fir32XLow[256];
45extern const float fir64XLow[256];45extern const float __leaf_table_fir64XLow[256];
46extern const float fir2XHigh[128];46extern const float __leaf_table_fir2XHigh[128];
47extern const float fir4XHigh[256];47extern const float __leaf_table_fir4XHigh[256];
48extern const float fir8XHigh[256];48extern const float __leaf_table_fir8XHigh[256];
49extern const float fir16XHigh[512];49extern const float __leaf_table_fir16XHigh[512];
50extern const float fir32XHigh[512];50extern const float __leaf_table_fir32XHigh[512];
51extern const float fir64XHigh[1024];51extern const float __leaf_table_fir64XHigh[1024];
52 52
53typedef enum TableName53typedef enum TableName
54{54{
@@ -68,26 +68,26 @@ typedef enum TableName · 13 unmodified lines
68 68
69// 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)69// 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)
70 70
71extern const float exp_decay[EXP_DECAY_TABLE_SIZE];71extern const float __leaf_table_exp_decay[EXP_DECAY_TABLE_SIZE];
72extern const float attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE];72extern const float __leaf_table_attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE];
73 73
74extern const float filtertan[FILTERTAN_TABLE_SIZE];74extern const float __leaf_table_filtertan[FILTERTAN_TABLE_SIZE];
75 75
76extern const float mtof1[MTOF1_TABLE_SIZE];76extern const float __leaf_table_mtof1[MTOF1_TABLE_SIZE];
77extern const float decayCoeffTable[DECAY_COEFF_TABLE_SIZE];77extern const float __leaf_table_decayCoeffTable[DECAY_COEFF_TABLE_SIZE];
78 78
79extern const float tanh1[TANH1_TABLE_SIZE];79extern const float __leaf_table_tanh1[TANH1_TABLE_SIZE];
80 80
81//==============================================================================81//==============================================================================
82 82
83/* Sine wave table ripped from http://aquaticus.info/pwm-sine-wave. */83/* Sine wave table ripped from http://aquaticus.info/pwm-sine-wave. */
84extern const float sinewave[SINE_TABLE_SIZE];84extern const float __leaf_table_sinewave[SINE_TABLE_SIZE];
85 85
86extern const float sawtooth[11][SAW_TABLE_SIZE];86extern const float __leaf_table_sawtooth[11][SAW_TABLE_SIZE];
87 87
88extern const float triangle[11][TRI_TABLE_SIZE];88extern const float __leaf_table_triangle[11][TRI_TABLE_SIZE];
89 89
90extern const float squarewave[11][SQR_TABLE_SIZE];90extern const float __leaf_table_squarewave[11][SQR_TABLE_SIZE];
91 91
92//==============================================================================92//==============================================================================
93 93
LEAF/Src/leaf-analysis.c+22−22
@@ -41,7 +41,7 @@ void tEnvelopeFollower_free(tEnvelopeFollower* const ef) · 40 unmodified lines
41void tEnvelopeFollower_initToPool (tEnvelopeFollower* const ef, float attackThreshold, float decayCoeff, tMempool* const mp)41void tEnvelopeFollower_initToPool (tEnvelopeFollower* const ef, float attackThreshold, float decayCoeff, tMempool* const mp)
42{42{
43 _tMempool* m = *mp;43 _tMempool* m = *mp;
44 _tEnvelopeFollower* e = *ef = (_tEnvelopeFollower*) mpool_alloc(sizeof(_tEnvelopeFollower), &m->pool);44 _tEnvelopeFollower* e = *ef = (_tEnvelopeFollower*) mpool_alloc(sizeof(_tEnvelopeFollower), m);
45 45
46 e->y = 0.0f;46 e->y = 0.0f;
47 e->a_thresh = attackThreshold;47 e->a_thresh = attackThreshold;
@@ -53,7 +53,7 @@ void tEnvelopeFollower_freeFromPool (tEnvelopeFollower* const ef, tMempool* · 5 unmodified lines
53 _tMempool* m = *mp;53 _tMempool* m = *mp;
54 _tEnvelopeFollower* e = *ef;54 _tEnvelopeFollower* e = *ef;
55 55
56 mpool_free(e, &m->pool);56 mpool_free(e, m);
57}57}
58 58
59float tEnvelopeFollower_tick(tEnvelopeFollower* const ef, float x)59float tEnvelopeFollower_tick(tEnvelopeFollower* const ef, float x)
@@ -108,7 +108,7 @@ void tPowerFollower_free(tPowerFollower* const pf) · 48 unmodified lines
108void tPowerFollower_initToPool (tPowerFollower* const pf, float factor, tMempool* const mp)108void tPowerFollower_initToPool (tPowerFollower* const pf, float factor, tMempool* const mp)
109{109{
110 _tMempool* m = *mp;110 _tMempool* m = *mp;
111 _tPowerFollower* p = *pf = (_tPowerFollower*) mpool_alloc(sizeof(_tPowerFollower), &m->pool);111 _tPowerFollower* p = *pf = (_tPowerFollower*) mpool_alloc(sizeof(_tPowerFollower), m);
112 112
113 p->curr=0.0f;113 p->curr=0.0f;
114 p->factor=factor;114 p->factor=factor;
@@ -120,7 +120,7 @@ void tPowerFollower_freeFromPool (tPowerFollower* const pf, tMempool* const m · 5 unmodified lines
120 _tMempool* m = *mp;120 _tMempool* m = *mp;
121 _tPowerFollower* p = *pf;121 _tPowerFollower* p = *pf;
122 122
123 mpool_free(p, &m->pool);123 mpool_free(p, m);
124}124}
125 125
126int tPowerFollower_setFactor(tPowerFollower* const pf, float factor)126int tPowerFollower_setFactor(tPowerFollower* const pf, float factor)
@@ -206,7 +206,7 @@ void tEnvPD_free (tEnvPD* const xpd) · 79 unmodified lines
206void tEnvPD_initToPool (tEnvPD* const xpd, int ws, int hs, int bs, tMempool* const mp)206void tEnvPD_initToPool (tEnvPD* const xpd, int ws, int hs, int bs, tMempool* const mp)
207{207{
208 _tMempool* m = *mp;208 _tMempool* m = *mp;
209 _tEnvPD* x = *xpd = (_tEnvPD*) mpool_calloc(sizeof(_tEnvPD), &m->pool);209 _tEnvPD* x = *xpd = (_tEnvPD*) mpool_calloc(sizeof(_tEnvPD), m);
210 210
211 int period = hs, npoints = ws;211 int period = hs, npoints = ws;
212 212
@@ -251,7 +251,7 @@ void tEnvPD_freeFromPool (tEnvPD* const xpd, tMempool* const mp) · 38 unmodified lines
251 _tMempool* m = *mp;251 _tMempool* m = *mp;
252 _tEnvPD* x = *xpd;252 _tEnvPD* x = *xpd;
253 253
254 mpool_free(x, &m->pool);254 mpool_free(x, m);
255}255}
256 256
257float tEnvPD_tick (tEnvPD* const xpd)257float tEnvPD_tick (tEnvPD* const xpd)
@@ -323,7 +323,7 @@ void tAttackDetection_free(tAttackDetection* const ad) · 65 unmodified lines
323void tAttackDetection_initToPool (tAttackDetection* const ad, int blocksize, int atk, int rel, tMempool* const mp)323void tAttackDetection_initToPool (tAttackDetection* const ad, int blocksize, int atk, int rel, tMempool* const mp)
324{324{
325 _tMempool* m = *mp;325 _tMempool* m = *mp;
326 *ad = (_tAttackDetection*) mpool_alloc(sizeof(_tAttackDetection), &m->pool);326 *ad = (_tAttackDetection*) mpool_alloc(sizeof(_tAttackDetection), m);
327 327
328 atkdtk_init(ad, blocksize, atk, rel);328 atkdtk_init(ad, blocksize, atk, rel);
329}329}
@@ -333,7 +333,7 @@ void tAttackDetection_freeFromPool (tAttackDetection* const ad, tMempool* c · 3 unmodified lines
333 _tMempool* m = *mp;333 _tMempool* m = *mp;
334 _tAttackDetection* a = *ad;334 _tAttackDetection* a = *ad;
335 335
336 mpool_free(a, &m->pool);336 mpool_free(a, m);
337}337}
338 338
339/*******Public Functions***********/339/*******Public Functions***********/
@@ -495,7 +495,7 @@ void tSNAC_free(tSNAC* const snac) · 155 unmodified lines
495void tSNAC_initToPool (tSNAC* const snac, int overlaparg, tMempool* const mp)495void tSNAC_initToPool (tSNAC* const snac, int overlaparg, tMempool* const mp)
496{496{
497 _tMempool* m = *mp;497 _tMempool* m = *mp;
498 _tSNAC* s = *snac = (_tSNAC*) mpool_alloc(sizeof(_tSNAC), &m->pool);498 _tSNAC* s = *snac = (_tSNAC*) mpool_alloc(sizeof(_tSNAC), m);
499 499
500 s->biasfactor = DEFBIAS;500 s->biasfactor = DEFBIAS;
501 s->timeindex = 0;501 s->timeindex = 0;
@@ -505,10 +505,10 @@ void tSNAC_initToPool (tSNAC* const snac, int overlaparg, tMempool* const · 3 unmodified lines
505 s->minrms = DEFMINRMS;505 s->minrms = DEFMINRMS;
506 s->framesize = SNAC_FRAME_SIZE;506 s->framesize = SNAC_FRAME_SIZE;
507 507
508 s->inputbuf = (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->pool);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->pool);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->pool);511 s->biasbuf = (float*) mpool_calloc(sizeof(float) * SNAC_FRAME_SIZE, m);
512 512
513 snac_biasbuf(snac);513 snac_biasbuf(snac);
514 tSNAC_setOverlap(snac, overlaparg);514 tSNAC_setOverlap(snac, overlaparg);
@@ -519,11 +519,11 @@ void tSNAC_freeFromPool (tSNAC* const snac, tMempool* const mp) · 4 unmodified lines
519 _tMempool* m = *mp;519 _tMempool* m = *mp;
520 _tSNAC* s = *snac;520 _tSNAC* s = *snac;
521 521
522 mpool_free(s->inputbuf, &m->pool);522 mpool_free(s->inputbuf, m);
523 mpool_free(s->processbuf, &m->pool);523 mpool_free(s->processbuf, m);
524 mpool_free(s->spectrumbuf, &m->pool);524 mpool_free(s->spectrumbuf, m);
525 mpool_free(s->biasbuf, &m->pool);525 mpool_free(s->biasbuf, m);
526 mpool_free(s, &m->pool);526 mpool_free(s, m);
527}527}
528 528
529/******************************************************************************/529/******************************************************************************/
@@ -840,18 +840,18 @@ static void snac_biasbuf(tSNAC* const snac) · 310 unmodified lines
840//===========================================================================840//===========================================================================
841void tPeriodDetection_init (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize)841void tPeriodDetection_init (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize)
842{842{
843 tPeriodDetection_initToPool(pd, in, out, bufSize, frameSize, &leaf_mempool);843 tPeriodDetection_initToPool(pd, in, out, bufSize, frameSize, &leaf.mempool);
844}844}
845 845
846void tPeriodDetection_free (tPeriodDetection* const pd)846void tPeriodDetection_free (tPeriodDetection* const pd)
847{847{
848 tPeriodDetection_freeFromPool(pd, &leaf_mempool);848 tPeriodDetection_freeFromPool(pd, &leaf.mempool);
849}849}
850 850
851void tPeriodDetection_initToPool (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize, tMempool* const mp)851void tPeriodDetection_initToPool (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize, tMempool* const mp)
852{852{
853 _tMempool* m = *mp;853 _tMempool* m = *mp;
854 _tPeriodDetection* p = *pd = (_tPeriodDetection*) mpool_calloc(sizeof(_tPeriodDetection), &m->pool);854 _tPeriodDetection* p = *pd = (_tPeriodDetection*) mpool_calloc(sizeof(_tPeriodDetection), m);
855 855
856 p->inBuffer = in;856 p->inBuffer = in;
857 p->outBuffer = out;857 p->outBuffer = out;
@@ -882,7 +882,7 @@ void tPeriodDetection_freeFromPool (tPeriodDetection* const pd, tMempoo · 24 unmodified lines
882 882
883 tEnvPD_freeFromPool(&p->env, mp);883 tEnvPD_freeFromPool(&p->env, mp);
884 tSNAC_freeFromPool(&p->snac, mp);884 tSNAC_freeFromPool(&p->snac, mp);
885 mpool_free(p, &m->pool);885 mpool_free(p, m);
886}886}
887 887
888float tPeriodDetection_tick (tPeriodDetection* pd, float sample)888float tPeriodDetection_tick (tPeriodDetection* pd, float sample)
LEAF/Src/leaf-delay.c+30−30
@@ -21,24 +21,24 @@ · 20 unmodified lines
21// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Delay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //21// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Delay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
22void tDelay_init (tDelay* const dl, uint32_t delay, uint32_t maxDelay)22void tDelay_init (tDelay* const dl, uint32_t delay, uint32_t maxDelay)
23{23{
24 tDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);24 tDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
25}25}
26 26
27void tDelay_free(tDelay* const dl)27void tDelay_free(tDelay* const dl)
28{28{
29 tDelay_freeFromPool(dl, &leaf_mempool);29 tDelay_freeFromPool(dl, &leaf.mempool);
30}30}
31 31
32void tDelay_initToPool (tDelay* const dl, uint32_t delay, uint32_t maxDelay, tMempool* const mp)32void tDelay_initToPool (tDelay* const dl, uint32_t delay, uint32_t maxDelay, tMempool* const mp)
33{33{
34 _tMempool* m = *mp;34 _tMempool* m = *mp;
35 _tDelay* d = *dl = (_tDelay*) mpool_alloc(sizeof(_tDelay), &m->pool);35 _tDelay* d = *dl = (_tDelay*) mpool_alloc(sizeof(_tDelay), m);
36 36
37 d->maxDelay = maxDelay;37 d->maxDelay = maxDelay;
38 38
39 d->delay = delay;39 d->delay = delay;
40 40
41 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);41 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
42 42
43 d->inPoint = 0;43 d->inPoint = 0;
44 d->outPoint = 0;44 d->outPoint = 0;
@@ -56,8 +56,8 @@ void tDelay_freeFromPool (tDelay* const dl, tMempool* const mp) · 11 unmodified lines
56 _tMempool* m = *mp;56 _tMempool* m = *mp;
57 _tDelay* d = *dl;57 _tDelay* d = *dl;
58 58
59 mpool_free(d->buff, &m->pool);59 mpool_free(d->buff, m);
60 mpool_free(d, &m->pool);60 mpool_free(d, m);
61}61}
62 62
63void tDelay_clear(tDelay* const dl)63void tDelay_clear(tDelay* const dl)
@@ -169,18 +169,18 @@ float tDelay_getGain (tDelay* const dl) · 105 unmodified lines
169// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LinearDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //169// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LinearDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
170void tLinearDelay_init (tLinearDelay* const dl, float delay, uint32_t maxDelay)170void tLinearDelay_init (tLinearDelay* const dl, float delay, uint32_t maxDelay)
171{171{
172 tLinearDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);172 tLinearDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
173}173}
174 174
175void tLinearDelay_free(tLinearDelay* const dl)175void tLinearDelay_free(tLinearDelay* const dl)
176{176{
177 tLinearDelay_freeFromPool(dl, &leaf_mempool);177 tLinearDelay_freeFromPool(dl, &leaf.mempool);
178}178}
179 179
180void tLinearDelay_initToPool (tLinearDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)180void tLinearDelay_initToPool (tLinearDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
181{181{
182 _tMempool* m = *mp;182 _tMempool* m = *mp;
183 _tLinearDelay* d = *dl = (_tLinearDelay*) mpool_alloc(sizeof(_tLinearDelay), &m->pool);183 _tLinearDelay* d = *dl = (_tLinearDelay*) mpool_alloc(sizeof(_tLinearDelay), m);
184 184
185 d->maxDelay = maxDelay;185 d->maxDelay = maxDelay;
186 186
@@ -188,7 +188,7 @@ void tLinearDelay_initToPool (tLinearDelay* const dl, float delay, uint32_t · 1 unmodified line
188 else if (delay < 0.0f) d->delay = 0.0f;188 else if (delay < 0.0f) d->delay = 0.0f;
189 else d->delay = delay;189 else d->delay = delay;
190 190
191 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);191 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
192 192
193 d->gain = 1.0f;193 d->gain = 1.0f;
194 194
@@ -206,8 +206,8 @@ void tLinearDelay_freeFromPool(tLinearDelay* const dl, tMempool* const mp) · 11 unmodified lines
206 _tMempool* m = *mp;206 _tMempool* m = *mp;
207 _tLinearDelay* d = *dl;207 _tLinearDelay* d = *dl;
208 208
209 mpool_free(d->buff, &m->pool);209 mpool_free(d->buff, m);
210 mpool_free(d, &m->pool);210 mpool_free(d, m);
211}211}
212 212
213void tLinearDelay_clear(tLinearDelay* const dl)213void tLinearDelay_clear(tLinearDelay* const dl)
@@ -367,18 +367,18 @@ float tLinearDelay_getGain (tLinearDelay* const dl) · 153 unmodified lines
367// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LinearDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //367// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LinearDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
368void tHermiteDelay_init (tHermiteDelay* const dl, float delay, uint32_t maxDelay)368void tHermiteDelay_init (tHermiteDelay* const dl, float delay, uint32_t maxDelay)
369{369{
370 tHermiteDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);370 tHermiteDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
371}371}
372 372
373void tHermiteDelay_free(tHermiteDelay* const dl)373void tHermiteDelay_free(tHermiteDelay* const dl)
374{374{
375 tHermiteDelay_freeFromPool(dl, &leaf_mempool);375 tHermiteDelay_freeFromPool(dl, &leaf.mempool);
376}376}
377 377
378void tHermiteDelay_initToPool (tHermiteDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)378void tHermiteDelay_initToPool (tHermiteDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
379{379{
380 _tMempool* m = *mp;380 _tMempool* m = *mp;
381 _tHermiteDelay* d = *dl = (_tHermiteDelay*) mpool_alloc(sizeof(_tHermiteDelay), &m->pool);381 _tHermiteDelay* d = *dl = (_tHermiteDelay*) mpool_alloc(sizeof(_tHermiteDelay), m);
382 382
383 d->maxDelay = maxDelay;383 d->maxDelay = maxDelay;
384 384
@@ -386,7 +386,7 @@ void tHermiteDelay_initToPool (tHermiteDelay* const dl, float delay, uint32_ · 1 unmodified line
386 else if (delay < 0.0f) d->delay = 0.0f;386 else if (delay < 0.0f) d->delay = 0.0f;
387 else d->delay = delay;387 else d->delay = delay;
388 388
389 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);389 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
390 390
391 d->gain = 1.0f;391 d->gain = 1.0f;
392 392
@@ -404,8 +404,8 @@ void tHermiteDelay_freeFromPool(tHermiteDelay* const dl, tMempool* const mp) · 11 unmodified lines
404 _tMempool* m = *mp;404 _tMempool* m = *mp;
405 _tHermiteDelay* d = *dl;405 _tHermiteDelay* d = *dl;
406 406
407 mpool_free(d->buff, &m->pool);407 mpool_free(d->buff, m);
408 mpool_free(d, &m->pool);408 mpool_free(d, m);
409}409}
410 410
411 411
@@ -567,18 +567,18 @@ float tHermiteDelay_getGain (tHermiteDelay* const dl) · 155 unmodified lines
567// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ AllpassDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //567// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ AllpassDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
568void tAllpassDelay_init (tAllpassDelay* const dl, float delay, uint32_t maxDelay)568void tAllpassDelay_init (tAllpassDelay* const dl, float delay, uint32_t maxDelay)
569{569{
570 tAllpassDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);570 tAllpassDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
571}571}
572 572
573void tAllpassDelay_free(tAllpassDelay* const dl)573void tAllpassDelay_free(tAllpassDelay* const dl)
574{574{
575 tAllpassDelay_freeFromPool(dl, &leaf_mempool);575 tAllpassDelay_freeFromPool(dl, &leaf.mempool);
576}576}
577 577
578void tAllpassDelay_initToPool (tAllpassDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)578void tAllpassDelay_initToPool (tAllpassDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
579{579{
580 _tMempool* m = *mp;580 _tMempool* m = *mp;
581 _tAllpassDelay* d = *dl = (_tAllpassDelay*) mpool_alloc(sizeof(_tAllpassDelay), &m->pool);581 _tAllpassDelay* d = *dl = (_tAllpassDelay*) mpool_alloc(sizeof(_tAllpassDelay), m);
582 582
583 d->maxDelay = maxDelay;583 d->maxDelay = maxDelay;
584 584
@@ -586,7 +586,7 @@ void tAllpassDelay_initToPool (tAllpassDelay* const dl, float delay, uint32_ · 1 unmodified line
586 else if (delay < 0.0f) d->delay = 0.0f;586 else if (delay < 0.0f) d->delay = 0.0f;
587 else d->delay = delay;587 else d->delay = delay;
588 588
589 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);589 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
590 590
591 d->gain = 1.0f;591 d->gain = 1.0f;
592 592
@@ -606,8 +606,8 @@ void tAllpassDelay_freeFromPool(tAllpassDelay* const dl, tMempool* const mp) · 13 unmodified lines
606 _tMempool* m = *mp;606 _tMempool* m = *mp;
607 _tAllpassDelay* d = *dl;607 _tAllpassDelay* d = *dl;
608 608
609 mpool_free(d->buff, &m->pool);609 mpool_free(d->buff, m);
610 mpool_free(d, &m->pool);610 mpool_free(d, m);
611}611}
612 612
613void tAllpassDelay_clear(tAllpassDelay* const dl)613void tAllpassDelay_clear(tAllpassDelay* const dl)
@@ -747,22 +747,22 @@ float tAllpassDelay_getGain (tAllpassDelay* const dl) · 133 unmodified lines
747// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ TapeDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //747// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ TapeDelay ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ //
748void tTapeDelay_init (tTapeDelay* const dl, float delay, uint32_t maxDelay)748void tTapeDelay_init (tTapeDelay* const dl, float delay, uint32_t maxDelay)
749{749{
750 tTapeDelay_initToPool(dl, delay, maxDelay, &leaf_mempool);750 tTapeDelay_initToPool(dl, delay, maxDelay, &leaf.mempool);
751}751}
752 752
753void tTapeDelay_free(tTapeDelay* const dl)753void tTapeDelay_free(tTapeDelay* const dl)
754{754{
755 tTapeDelay_freeFromPool(dl, &leaf_mempool);755 tTapeDelay_freeFromPool(dl, &leaf.mempool);
756}756}
757 757
758void tTapeDelay_initToPool (tTapeDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)758void tTapeDelay_initToPool (tTapeDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
759{759{
760 _tMempool* m = *mp;760 _tMempool* m = *mp;
761 _tTapeDelay* d = *dl = (_tTapeDelay*) mpool_alloc(sizeof(_tTapeDelay), &m->pool);761 _tTapeDelay* d = *dl = (_tTapeDelay*) mpool_alloc(sizeof(_tTapeDelay), m);
762 762
763 d->maxDelay = maxDelay;763 d->maxDelay = maxDelay;
764 764
765 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, &m->pool);765 d->buff = (float*) mpool_alloc(sizeof(float) * maxDelay, m);
766 766
767 d->gain = 1.0f;767 d->gain = 1.0f;
768 768
@@ -781,8 +781,8 @@ void tTapeDelay_freeFromPool(tTapeDelay* const dl, tMempool* const mp) · 12 unmodified lines
781 _tMempool* m = *mp;781 _tMempool* m = *mp;
782 _tTapeDelay* d = *dl;782 _tTapeDelay* d = *dl;
783 783
784 mpool_free(d->buff, &m->pool);784 mpool_free(d->buff, m);
785 mpool_free(d, &m->pool);785 mpool_free(d, m);
786}786}
787 787
788void tTapeDelay_clear(tTapeDelay* const dl)788void 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
45void tSampleReducer_initToPool (tSampleReducer* const sr, tMempool* const mp)45void tSampleReducer_initToPool (tSampleReducer* const sr, tMempool* const mp)
46{46{
47 _tMempool* m = *mp;47 _tMempool* m = *mp;
48 _tSampleReducer* s = *sr = (_tSampleReducer*) mpool_alloc(sizeof(_tSampleReducer), &m->pool);48 _tSampleReducer* s = *sr = (_tSampleReducer*) mpool_alloc(sizeof(_tSampleReducer), m);
49 49
50 s->invRatio = 1.0f;50 s->invRatio = 1.0f;
51 s->hold = 0.0f;51 s->hold = 0.0f;
@@ -57,7 +57,7 @@ void tSampleReducer_freeFromPool (tSampleReducer* const sr, tMempool* const m · 5 unmodified lines
57 _tMempool* m = *mp;57 _tMempool* m = *mp;
58 _tSampleReducer* s = *sr;58 _tSampleReducer* s = *sr;
59 59
60 mpool_free(s, &m->pool);60 mpool_free(s, m);
61}61}
62 62
63float tSampleReducer_tick(tSampleReducer* const sr, float input)63float tSampleReducer_tick(tSampleReducer* const sr, float input)
@@ -97,9 +97,9 @@ void tOversampler_init(tOversampler* const osr, int ratio, oBool extraQuality) · 33 unmodified lines
97 ratio == 32 || ratio == 64) {97 ratio == 32 || ratio == 64) {
98 os->ratio = ratio;98 os->ratio = ratio;
99 int idx = (int)(log2f(os->ratio))-1+offset;99 int idx = (int)(log2f(os->ratio))-1+offset;
100 os->numTaps = firNumTaps[idx];100 os->numTaps = __leaf_tablesize_firNumTaps[idx];
101 os->phaseLength = os->numTaps / os->ratio;101 os->phaseLength = os->numTaps / os->ratio;
102 os->pCoeffs = (float*) firCoeffs[idx];102 os->pCoeffs = (float*) __leaf_tableref_firCoeffs[idx];
103 os->upState = leaf_alloc(sizeof(float) * os->numTaps * 2);103 os->upState = leaf_alloc(sizeof(float) * os->numTaps * 2);
104 os->downState = leaf_alloc(sizeof(float) * os->numTaps * 2);104 os->downState = leaf_alloc(sizeof(float) * os->numTaps * 2);
105 }105 }
@@ -117,7 +117,7 @@ void tOversampler_free(tOversampler* const osr) · 11 unmodified lines
117void tOversampler_initToPool (tOversampler* const osr, int ratio, oBool extraQuality, tMempool* const mp)117void tOversampler_initToPool (tOversampler* const osr, int ratio, oBool extraQuality, tMempool* const mp)
118{118{
119 _tMempool* m = *mp;119 _tMempool* m = *mp;
120 _tOversampler* os = *osr = (_tOversampler*) mpool_alloc(sizeof(_tOversampler), &m->pool);120 _tOversampler* os = *osr = (_tOversampler*) mpool_alloc(sizeof(_tOversampler), m);
121 121
122 uint8_t offset = 0;122 uint8_t offset = 0;
123 if (extraQuality) offset = 6;123 if (extraQuality) offset = 6;
@@ -126,11 +126,11 @@ void tOversampler_initToPool (tOversampler* const osr, int ratio, oBool e · 2 unmodified lines
126 ratio == 32 || ratio == 64) {126 ratio == 32 || ratio == 64) {
127 os->ratio = ratio;127 os->ratio = ratio;
128 int idx = (int)(log2f(os->ratio))-1+offset;128 int idx = (int)(log2f(os->ratio))-1+offset;
129 os->numTaps = firNumTaps[idx];129 os->numTaps = __leaf_tablesize_firNumTaps[idx];
130 os->phaseLength = os->numTaps / os->ratio;130 os->phaseLength = os->numTaps / os->ratio;
131 os->pCoeffs = (float*) firCoeffs[idx];131 os->pCoeffs = (float*) __leaf_tableref_firCoeffs[idx];
132 os->upState = mpool_alloc(sizeof(float) * os->numTaps * 2, &m->pool);132 os->upState = mpool_alloc(sizeof(float) * os->numTaps * 2, m);
133 os->downState = mpool_alloc(sizeof(float) * os->numTaps * 2, &m->pool);133 os->downState = mpool_alloc(sizeof(float) * os->numTaps * 2, m);
134 }134 }
135}135}
136 136
@@ -139,9 +139,9 @@ void tOversampler_freeFromPool (tOversampler* const osr, tMempool* const mp · 2 unmodified lines
139 _tMempool* m = *mp;139 _tMempool* m = *mp;
140 _tOversampler* os = *osr;140 _tOversampler* os = *osr;
141 141
142 mpool_free(os->upState, &m->pool);142 mpool_free(os->upState, m);
143 mpool_free(os->downState, &m->pool);143 mpool_free(os->downState, m);
144 mpool_free(os, &m->pool);144 mpool_free(os, m);
145}145}
146 146
147float tOversampler_tick(tOversampler* const osr, float input, float (*effectTick)(float))147float tOversampler_tick(tOversampler* const osr, float input, float (*effectTick)(float))
@@ -385,7 +385,7 @@ void tLockhartWavefolder_free(tLockhartWavefolder* const wf) · 237 unmodified lines
385void tLockhartWavefolder_initToPool (tLockhartWavefolder* const wf, tMempool* const mp)385void tLockhartWavefolder_initToPool (tLockhartWavefolder* const wf, tMempool* const mp)
386{386{
387 _tMempool* m = *mp;387 _tMempool* m = *mp;
388 _tLockhartWavefolder* w = *wf = (_tLockhartWavefolder*) mpool_alloc(sizeof(_tLockhartWavefolder), &m->pool);388 _tLockhartWavefolder* w = *wf = (_tLockhartWavefolder*) mpool_alloc(sizeof(_tLockhartWavefolder), m);
389 389
390 w->Ln1 = 0.0;390 w->Ln1 = 0.0;
391 w->Fn1 = 0.0;391 w->Fn1 = 0.0;
@@ -412,7 +412,7 @@ void tLockhartWavefolder_freeFromPool (tLockhartWavefolder* const wf, tMempoo · 20 unmodified lines
412 _tMempool* m = *mp;412 _tMempool* m = *mp;
413 _tLockhartWavefolder* w = *wf;413 _tLockhartWavefolder* w = *wf;
414 414
415 mpool_free(w, &m->pool);415 mpool_free(w, m);
416}416}
417 417
418double tLockhartWavefolderLambert(double x, double ln)418double tLockhartWavefolderLambert(double x, double ln)
@@ -511,7 +511,7 @@ void tCrusher_free (tCrusher* const cr) · 92 unmodified lines
511void tCrusher_initToPool (tCrusher* const cr, tMempool* const mp)511void tCrusher_initToPool (tCrusher* const cr, tMempool* const mp)
512{512{
513 _tMempool* m = *mp;513 _tMempool* m = *mp;
514 _tCrusher* c = *cr = (_tCrusher*) mpool_alloc(sizeof(_tCrusher), &m->pool);514 _tCrusher* c = *cr = (_tCrusher*) mpool_alloc(sizeof(_tCrusher), m);
515 515
516 c->op = 4;516 c->op = 4;
517 c->div = SCALAR;517 c->div = SCALAR;
@@ -526,7 +526,7 @@ void tCrusher_freeFromPool (tCrusher* const cr, tMempool* const mp) · 8 unmodified lines
526 _tMempool* m = *mp;526 _tMempool* m = *mp;
527 _tCrusher* c = *cr;527 _tCrusher* c = *cr;
528 tSampleReducer_freeFromPool(&c->sReducer, mp);528 tSampleReducer_freeFromPool(&c->sReducer, mp);
529 mpool_free(c, &m->pool);529 mpool_free(c, m);
530}530}
531 531
532float tCrusher_tick (tCrusher* const cr, float input)532float 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
66void tCompressor_initToPool (tCompressor* const comp, tMempool* const mp)66void tCompressor_initToPool (tCompressor* const comp, tMempool* const mp)
67{67{
68 _tMempool* m = *mp;68 _tMempool* m = *mp;
69 _tCompressor* c = *comp = (_tCompressor*) mpool_alloc(sizeof(_tCompressor), &m->pool);69 _tCompressor* c = *comp = (_tCompressor*) mpool_alloc(sizeof(_tCompressor), m);
70 70
71 c->tauAttack = 100;71 c->tauAttack = 100;
72 c->tauRelease = 100;72 c->tauRelease = 100;
@@ -84,7 +84,7 @@ void tCompressor_freeFromPool(tCompressor* const comp, tMempool* const mp) · 11 unmodified lines
84 _tMempool* m = *mp;84 _tMempool* m = *mp;
85 _tCompressor* c = *comp;85 _tCompressor* c = *comp;
86 86
87 mpool_free(c, &m->pool);87 mpool_free(c, m);
88}88}
89 89
90float tCompressor_tick(tCompressor* const comp, float in)90float tCompressor_tick(tCompressor* const comp, float in)
@@ -160,7 +160,7 @@ void tFeedbackLeveler_free(tFeedbackLeveler* const fb) · 69 unmodified lines
160void tFeedbackLeveler_initToPool (tFeedbackLeveler* const fb, float targetLevel, float factor, float strength, int mode, tMempool* const mp)160void tFeedbackLeveler_initToPool (tFeedbackLeveler* const fb, float targetLevel, float factor, float strength, int mode, tMempool* const mp)
161{161{
162 _tMempool* m = *mp;162 _tMempool* m = *mp;
163 _tFeedbackLeveler* p = *fb = (_tFeedbackLeveler*) mpool_alloc(sizeof(_tFeedbackLeveler), &m->pool);163 _tFeedbackLeveler* p = *fb = (_tFeedbackLeveler*) mpool_alloc(sizeof(_tFeedbackLeveler), m);
164 164
165 p->curr=0.0f;165 p->curr=0.0f;
166 p->targetLevel=targetLevel;166 p->targetLevel=targetLevel;
@@ -175,7 +175,7 @@ void tFeedbackLeveler_freeFromPool (tFeedbackLeveler* const fb, tMempool* c · 8 unmodified lines
175 _tFeedbackLeveler* p = *fb;175 _tFeedbackLeveler* p = *fb;
176 176
177 tPowerFollower_freeFromPool(&p->pwrFlw, mp);177 tPowerFollower_freeFromPool(&p->pwrFlw, mp);
178 mpool_free(p, &m->pool);178 mpool_free(p, m);
179}179}
180 180
181void tFeedbackLeveler_setStrength(tFeedbackLeveler* const fb, float strength)181void tFeedbackLeveler_setStrength(tFeedbackLeveler* const fb, float strength)
@@ -219,3 +219,63 @@ void tFeedbackLeveler_setTargetLevel (tFeedbackLeveler* const fb, float Ta · 37 unmodified lines
219 p->targetLevel=TargetLevel;219 p->targetLevel=TargetLevel;
220}220}
221 221
222
223
224void tThreshold_init(tThreshold* const th, float low, float high)
225{
226 tThreshold_initToPool(th, low, high, &leaf.mempool);
227}
228
229void tThreshold_free(tThreshold* const th)
230{
231 tThreshold_freeFromPool(th, &leaf.mempool);
232}
233
234void 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
245void 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
253int 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
269void tThreshold_setLow(tThreshold* const th, float low)
270{
271 _tThreshold* t = *th;
272
273 t->lowThresh = low;
274}
275
276void 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
62void tTalkbox_initToPool (tTalkbox* const voc, int bufsize, tMempool* const mp)62void tTalkbox_initToPool (tTalkbox* const voc, int bufsize, tMempool* const mp)
63{63{
64 _tMempool* m = *mp;64 _tMempool* m = *mp;
65 _tTalkbox* v = *voc = (_tTalkbox*) mpool_alloc(sizeof(_tTalkbox), &m->pool);65 _tTalkbox* v = *voc = (_tTalkbox*) mpool_alloc(sizeof(_tTalkbox), m);
66 66
67 v->param[0] = 0.5f; //wet67 v->param[0] = 0.5f; //wet
68 v->param[1] = 0.0f; //dry68 v->param[1] = 0.0f; //dry
@@ -71,11 +71,11 @@ void tTalkbox_initToPool (tTalkbox* const voc, int bufsize, tMempool* con · 2 unmodified lines
71 71
72 v->bufsize = bufsize;72 v->bufsize = bufsize;
73 73
74 v->car0 = (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->pool);75 v->car1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
76 v->window = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);76 v->window = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
77 v->buf0 = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);77 v->buf0 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
78 v->buf1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, &m->pool);78 v->buf1 = (float*) mpool_alloc(sizeof(float) * v->bufsize, m);
79 79
80 tTalkbox_update(voc);80 tTalkbox_update(voc);
81 tTalkbox_suspend(voc);81 tTalkbox_suspend(voc);
@@ -86,13 +86,13 @@ void tTalkbox_freeFromPool (tTalkbox* const voc, tMempool* const mp) · 4 unmodified lines
86 _tMempool* m = *mp;86 _tMempool* m = *mp;
87 _tTalkbox* v = *voc;87 _tTalkbox* v = *voc;
88 88
89 mpool_free(v->buf1, &m->pool);89 mpool_free(v->buf1, m);
90 mpool_free(v->buf0, &m->pool);90 mpool_free(v->buf0, m);
91 mpool_free(v->window, &m->pool);91 mpool_free(v->window, m);
92 mpool_free(v->car1, &m->pool);92 mpool_free(v->car1, m);
93 mpool_free(v->car0, &m->pool);93 mpool_free(v->car0, m);
94 94
95 mpool_free(v, &m->pool);95 mpool_free(v, m);
96}96}
97 97
98void tTalkbox_update(tTalkbox* const voc) ///update internal parameters...98void tTalkbox_update(tTalkbox* const voc) ///update internal parameters...
@@ -297,7 +297,7 @@ void tVocoder_free (tVocoder* const voc) · 198 unmodified lines
297void tVocoder_initToPool (tVocoder* const voc, tMempool* const mp)297void tVocoder_initToPool (tVocoder* const voc, tMempool* const mp)
298{298{
299 _tMempool* m = *mp;299 _tMempool* m = *mp;
300 _tVocoder* v = *voc = (_tVocoder*) mpool_alloc(sizeof(_tVocoder), &m->pool);300 _tVocoder* v = *voc = (_tVocoder*) mpool_alloc(sizeof(_tVocoder), m);
301 301
302 v->param[0] = 0.33f; //input select302 v->param[0] = 0.33f; //input select
303 v->param[1] = 0.50f; //output dB303 v->param[1] = 0.50f; //output dB
@@ -316,7 +316,7 @@ void tVocoder_freeFromPool (tVocoder* const voc, tMempool* const mp) · 12 unmodified lines
316 _tMempool* m = *mp;316 _tMempool* m = *mp;
317 _tVocoder* v = *voc;317 _tVocoder* v = *voc;
318 318
319 mpool_free(v, &m->pool);319 mpool_free(v, m);
320}320}
321 321
322void tVocoder_update (tVocoder* const voc)322void tVocoder_update (tVocoder* const voc)
@@ -518,10 +518,10 @@ void tSOLAD_initToPool (tSOLAD* const wp, tMempool* const mp) · 195 unmodified lines
518{518{
519 _tMempool* m = *mp;519 _tMempool* m = *mp;
520 520
521 _tSOLAD* w = *wp = (_tSOLAD*) mpool_calloc(sizeof(_tSOLAD), &m->pool);521 _tSOLAD* w = *wp = (_tSOLAD*) mpool_calloc(sizeof(_tSOLAD), m);
522 522
523 w->pitchfactor = 1.;523 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);
525 525
526 solad_init(w);526 solad_init(w);
527}527}
@@ -531,8 +531,8 @@ void tSOLAD_freeFromPool (tSOLAD* const wp, tMempool* const mp) · 3 unmodified lines
531 _tMempool* m = *mp;531 _tMempool* m = *mp;
532 _tSOLAD* w = *wp;532 _tSOLAD* w = *wp;
533 533
534 mpool_free(w->delaybuf, &m->pool);534 mpool_free(w->delaybuf, m);
535 mpool_free(w, &m->pool);535 mpool_free(w, m);
536}536}
537 537
538// send one block of input samples, receive one block of output samples538// 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
901{901{
902 _tMempool* m = *mp;902 _tMempool* m = *mp;
903 903
904 _tPitchShift* ps = *psr = (_tPitchShift*) mpool_calloc(sizeof(_tPitchShift), &m->pool);904 _tPitchShift* ps = *psr = (_tPitchShift*) mpool_calloc(sizeof(_tPitchShift), m);
905 905
906 _tPeriodDetection* p = *pd;906 _tPeriodDetection* p = *pd;
907 907
@@ -930,7 +930,7 @@ void tPitchShift_freeFromPool (tPitchShift* const psr, tMempool* const mp) · 22 unmodified lines
930 930
931 tSOLAD_freeFromPool(&ps->sola, mp);931 tSOLAD_freeFromPool(&ps->sola, mp);
932 tHighpass_freeFromPool(&ps->hp, mp);932 tHighpass_freeFromPool(&ps->hp, mp);
933 mpool_free(ps, &m->pool);933 mpool_free(ps, m);
934}934}
935 935
936void tPitchShift_setPitchFactor(tPitchShift* psr, float pf)936void tPitchShift_setPitchFactor(tPitchShift* psr, float pf)
@@ -1052,25 +1052,25 @@ float tPitchShift_shiftToFunc (tPitchShift* psr, float (*fun)(float)) · 115 unmodified lines
1052 1052
1053void tRetune_init(tRetune* const rt, int numVoices, int bufSize, int frameSize)1053void tRetune_init(tRetune* const rt, int numVoices, int bufSize, int frameSize)
1054{1054{
1055 tRetune_initToPool(rt, numVoices, bufSize, frameSize, &leaf_mempool);1055 tRetune_initToPool(rt, numVoices, bufSize, frameSize, &leaf.mempool);
1056}1056}
1057 1057
1058void tRetune_free(tRetune* const rt)1058void tRetune_free(tRetune* const rt)
1059{1059{
1060 tRetune_freeFromPool(rt, &leaf_mempool);1060 tRetune_freeFromPool(rt, &leaf.mempool);
1061}1061}
1062 1062
1063void tRetune_initToPool (tRetune* const rt, int numVoices, int bufSize, int frameSize, tMempool* const mp)1063void tRetune_initToPool (tRetune* const rt, int numVoices, int bufSize, int frameSize, tMempool* const mp)
1064{1064{
1065 _tMempool* m = *mp;1065 _tMempool* m = *mp;
1066 _tRetune* r = *rt = (_tRetune*) mpool_alloc(sizeof(_tRetune), &m->pool);1066 _tRetune* r = *rt = (_tRetune*) mpool_alloc(sizeof(_tRetune), m);
1067 1067
1068 r->bufSize = bufSize;1068 r->bufSize = bufSize;
1069 r->frameSize = frameSize;1069 r->frameSize = frameSize;
1070 r->numVoices = numVoices;1070 r->numVoices = numVoices;
1071 1071
1072 r->inBuffer = (float*) mpool_calloc(sizeof(float) * r->bufSize, &m->pool);1072 r->inBuffer = (float*) mpool_calloc(sizeof(float) * r->bufSize, m);
1073 r->outBuffers = (float**) mpool_calloc(sizeof(float*) * r->numVoices, &m->pool);1073 r->outBuffers = (float**) mpool_calloc(sizeof(float*) * r->numVoices, m);
1074 1074
1075 r->hopSize = DEFHOPSIZE;1075 r->hopSize = DEFHOPSIZE;
1076 r->windowSize = DEFWINDOWSIZE;1076 r->windowSize = DEFWINDOWSIZE;
@@ -1079,12 +1079,12 @@ void tRetune_initToPool (tRetune* const rt, int numVoices, int bufSize, · 2 unmodified lines
1079 1079
1080 r->inputPeriod = 0.0f;1080 r->inputPeriod = 0.0f;
1081 1081
1082 r->ps = (tPitchShift*) mpool_calloc(sizeof(tPitchShift) * 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->pool);1083 r->pitchFactor = (float*) mpool_calloc(sizeof(float) * r->numVoices, m);
1084 r->tickOutput = (float*) mpool_calloc(sizeof(float) * r->numVoices, &m->pool);1084 r->tickOutput = (float*) mpool_calloc(sizeof(float) * r->numVoices, m);
1085 for (int i = 0; i < r->numVoices; ++i)1085 for (int i = 0; i < r->numVoices; ++i)
1086 {1086 {
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);
1088 }1088 }
1089 1089
1090 tPeriodDetection_initToPool(&r->pd, r->inBuffer, r->outBuffers[0], r->bufSize, r->frameSize, mp);1090 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
1104 for (int i = 0; i < r->numVoices; ++i)1104 for (int i = 0; i < r->numVoices; ++i)
1105 {1105 {
1106 tPitchShift_freeFromPool(&r->ps[i], mp);1106 tPitchShift_freeFromPool(&r->ps[i], mp);
1107 mpool_free(r->outBuffers[i], &m->pool);1107 mpool_free(r->outBuffers[i], m);
1108 }1108 }
1109 mpool_free(r->tickOutput, &m->pool);1109 mpool_free(r->tickOutput, m);
1110 mpool_free(r->pitchFactor, &m->pool);1110 mpool_free(r->pitchFactor, m);
1111 mpool_free(r->ps, &m->pool);1111 mpool_free(r->ps, m);
1112 mpool_free(r->inBuffer, &m->pool);1112 mpool_free(r->inBuffer, m);
1113 mpool_free(r->outBuffers, &m->pool);1113 mpool_free(r->outBuffers, m);
1114 mpool_free(r, &m->pool);1114 mpool_free(r, m);
1115}1115}
1116 1116
1117float* tRetune_tick(tRetune* const rt, float sample)1117float* tRetune_tick(tRetune* const rt, float sample)
@@ -1225,37 +1225,37 @@ float tRetune_getInputFreq(tRetune* const rt) · 107 unmodified lines
1225 1225
1226void tAutotune_init(tAutotune* const rt, int numVoices, int bufSize, int frameSize)1226void tAutotune_init(tAutotune* const rt, int numVoices, int bufSize, int frameSize)
1227{1227{
1228 tAutotune_initToPool(rt, numVoices, bufSize, frameSize, &leaf_mempool);1228 tAutotune_initToPool(rt, numVoices, bufSize, frameSize, &leaf.mempool);
1229}1229}
1230 1230
1231void tAutotune_free(tAutotune* const rt)1231void tAutotune_free(tAutotune* const rt)
1232{1232{
1233 tAutotune_freeFromPool(rt, &leaf_mempool);1233 tAutotune_freeFromPool(rt, &leaf.mempool);
1234}1234}
1235 1235
1236void tAutotune_initToPool (tAutotune* const rt, int numVoices, int bufSize, int frameSize, tMempool* const mp)1236void tAutotune_initToPool (tAutotune* const rt, int numVoices, int bufSize, int frameSize, tMempool* const mp)
1237{1237{
1238 _tMempool* m = *mp;1238 _tMempool* m = *mp;
1239 _tAutotune* r = *rt = (_tAutotune*) mpool_alloc(sizeof(_tAutotune), &m->pool);1239 _tAutotune* r = *rt = (_tAutotune*) mpool_alloc(sizeof(_tAutotune), m);
1240 1240
1241 r->bufSize = bufSize;1241 r->bufSize = bufSize;
1242 r->frameSize = frameSize;1242 r->frameSize = frameSize;
1243 r->numVoices = numVoices;1243 r->numVoices = numVoices;
1244 1244
1245 r->inBuffer = (float*) mpool_alloc(sizeof(float) * r->bufSize, &m->pool);1245 r->inBuffer = (float*) mpool_alloc(sizeof(float) * r->bufSize, m);
1246 r->outBuffers = (float**) mpool_alloc(sizeof(float*) * r->numVoices, &m->pool);1246 r->outBuffers = (float**) mpool_alloc(sizeof(float*) * r->numVoices, m);
1247 1247
1248 r->hopSize = DEFHOPSIZE;1248 r->hopSize = DEFHOPSIZE;
1249 r->windowSize = DEFWINDOWSIZE;1249 r->windowSize = DEFWINDOWSIZE;
1250 r->fba = FBA;1250 r->fba = FBA;
1251 tAutotune_setTimeConstant(rt, DEFTIMECONSTANT);1251 tAutotune_setTimeConstant(rt, DEFTIMECONSTANT);
1252 1252
1253 r->ps = (tPitchShift*) mpool_alloc(sizeof(tPitchShift) * 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->pool);1254 r->freq = (float*) mpool_alloc(sizeof(float) * r->numVoices, m);
1255 r->tickOutput = (float*) mpool_alloc(sizeof(float) * r->numVoices, &m->pool);1255 r->tickOutput = (float*) mpool_alloc(sizeof(float) * r->numVoices, m);
1256 for (int i = 0; i < r->numVoices; ++i)1256 for (int i = 0; i < r->numVoices; ++i)
1257 {1257 {
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);
1259 }1259 }
1260 1260
1261 tPeriodDetection_initToPool(&r->pd, r->inBuffer, r->outBuffers[0], r->bufSize, r->frameSize, mp);1261 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
1277 for (int i = 0; i < r->numVoices; ++i)1277 for (int i = 0; i < r->numVoices; ++i)
1278 {1278 {
1279 tPitchShift_freeFromPool(&r->ps[i], mp);1279 tPitchShift_freeFromPool(&r->ps[i], mp);
1280 mpool_free(r->outBuffers[i], &m->pool);1280 mpool_free(r->outBuffers[i], m);
1281 }1281 }
1282 mpool_free(r->tickOutput, &m->pool);1282 mpool_free(r->tickOutput, m);
1283 mpool_free(r->freq, &m->pool);1283 mpool_free(r->freq, m);
1284 mpool_free(r->ps, &m->pool);1284 mpool_free(r->ps, m);
1285 mpool_free(r->inBuffer, &m->pool);1285 mpool_free(r->inBuffer, m);
1286 mpool_free(r->outBuffers, &m->pool);1286 mpool_free(r->outBuffers, m);
1287 mpool_free(r, &m->pool);1287 mpool_free(r, m);
1288}1288}
1289 1289
1290float* tAutotune_tick(tAutotune* const rt, float sample)1290float* tAutotune_tick(tAutotune* const rt, float sample)
@@ -1453,19 +1453,19 @@ void tFormantShifter_free(tFormantShifter* const fsr) · 162 unmodified lines
1453void tFormantShifter_initToPool (tFormantShifter* const fsr, int order, tMempool* const mp)1453void tFormantShifter_initToPool (tFormantShifter* const fsr, int order, tMempool* const mp)
1454{1454{
1455 _tMempool* m = *mp;1455 _tMempool* m = *mp;
1456 _tFormantShifter* fs = *fsr = (_tFormantShifter*) mpool_alloc(sizeof(_tFormantShifter), &m->pool);1456 _tFormantShifter* fs = *fsr = (_tFormantShifter*) mpool_alloc(sizeof(_tFormantShifter), m);
1457 1457
1458 fs->ford = order;1458 fs->ford = order;
1459 fs->fk = (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->pool);1460 fs->fb = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1461 fs->fc = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);1461 fs->fc = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1462 fs->frb = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);1462 fs->frb = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1463 fs->frc = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);1463 fs->frc = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1464 fs->fsig = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);1464 fs->fsig = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1465 fs->fsmooth = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);1465 fs->fsmooth = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1466 fs->ftvec = (float*) mpool_calloc(sizeof(float) * fs->ford, &m->pool);1466 fs->ftvec = (float*) mpool_calloc(sizeof(float) * fs->ford, m);
1467 1467
1468 fs->fbuff = (float*) mpool_calloc(sizeof(float*) * fs->ford, &m->pool);1468 fs->fbuff = (float*) mpool_calloc(sizeof(float*) * fs->ford, m);
1469 1469
1470 1470
1471 fs->falph = powf(0.001f, 10.0f * leaf.invSampleRate);1471 fs->falph = powf(0.001f, 10.0f * leaf.invSampleRate);
@@ -1489,20 +1489,20 @@ void tFormantShifter_freeFromPool (tFormantShifter* const fsr, tMempool* c · 17 unmodified lines
1489 _tMempool* m = *mp;1489 _tMempool* m = *mp;
1490 _tFormantShifter* fs = *fsr;1490 _tFormantShifter* fs = *fsr;
1491 1491
1492 mpool_free(fs->fk, &m->pool);1492 mpool_free(fs->fk, m);
1493 mpool_free(fs->fb, &m->pool);1493 mpool_free(fs->fb, m);
1494 mpool_free(fs->fc, &m->pool);1494 mpool_free(fs->fc, m);
1495 mpool_free(fs->frb, &m->pool);1495 mpool_free(fs->frb, m);
1496 mpool_free(fs->frc, &m->pool);1496 mpool_free(fs->frc, m);
1497 mpool_free(fs->fsig, &m->pool);1497 mpool_free(fs->fsig, m);
1498 mpool_free(fs->fsmooth, &m->pool);1498 mpool_free(fs->fsmooth, m);
1499 mpool_free(fs->ftvec, &m->pool);1499 mpool_free(fs->ftvec, m);
1500 mpool_free(fs->fbuff, &m->pool);1500 mpool_free(fs->fbuff, m);
1501 tHighpass_freeFromPool(&fs->hp, mp);1501 tHighpass_freeFromPool(&fs->hp, mp);
1502 tHighpass_freeFromPool(&fs->hp2, mp);1502 tHighpass_freeFromPool(&fs->hp2, mp);
1503 tFeedbackLeveler_freeFromPool(&fs->fbl1, mp);1503 tFeedbackLeveler_freeFromPool(&fs->fbl1, mp);
1504 tFeedbackLeveler_freeFromPool(&fs->fbl2, mp);1504 tFeedbackLeveler_freeFromPool(&fs->fbl2, mp);
1505 mpool_free(fs, &m->pool);1505 mpool_free(fs, m);
1506}1506}
1507 1507
1508float tFormantShifter_tick(tFormantShifter* const fsr, float in)1508float 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
181void tWDF_initToPool (tWDF* const wdf, WDFComponentType type, float value, tWDF* const rL, tWDF* const rR, tMempool* const mp)181void tWDF_initToPool (tWDF* const wdf, WDFComponentType type, float value, tWDF* const rL, tWDF* const rR, tMempool* const mp)
182{182{
183 _tMempool* m = *mp;183 _tMempool* m = *mp;
184 *wdf = (_tWDF*) mpool_alloc(sizeof(_tWDF), &m->pool);184 *wdf = (_tWDF*) mpool_alloc(sizeof(_tWDF), m);
185 185
186 wdf_init(wdf, type, value, rL, rR);186 wdf_init(wdf, type, value, rL, rR);
187}187}
@@ -191,7 +191,7 @@ void tWDF_freeFromPool (tWDF* const wdf, tMempool* const mp) · 3 unmodified lines
191 _tMempool* m = *mp;191 _tMempool* m = *mp;
192 _tWDF* r = *wdf;192 _tWDF* r = *wdf;
193 193
194 mpool_free(r, &m->pool);194 mpool_free(r, m);
195}195}
196 196
197float tWDF_tick(tWDF* const wdf, float sample, tWDF* const outputPoint, uint8_t paramsChanged)197float 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
28{28{
29 _tEnvelope* env = *envlp = (_tEnvelope*) leaf_alloc(sizeof(_tEnvelope));29 _tEnvelope* env = *envlp = (_tEnvelope*) leaf_alloc(sizeof(_tEnvelope));
30 30
31 env->exp_buff = exp_decay;31 env->exp_buff = __leaf_table_exp_decay;
32 env->inc_buff = attack_decay_inc;32 env->inc_buff = __leaf_table_attack_decay_inc;
33 env->buff_size = sizeof(exp_decay);33 env->buff_size = sizeof(__leaf_table_exp_decay);
34 34
35 env->loop = loop;35 env->loop = loop;
36 36
@@ -73,11 +73,11 @@ void tEnvelope_free(tEnvelope* const envlp) · 36 unmodified lines
73void tEnvelope_initToPool (tEnvelope* const envlp, float attack, float decay, oBool loop, tMempool* const mp)73void tEnvelope_initToPool (tEnvelope* const envlp, float attack, float decay, oBool loop, tMempool* const mp)
74{74{
75 _tMempool* m = *mp;75 _tMempool* m = *mp;
76 _tEnvelope* env = *envlp = (_tEnvelope*) mpool_alloc(sizeof(_tEnvelope), &m->pool);76 _tEnvelope* env = *envlp = (_tEnvelope*) mpool_alloc(sizeof(_tEnvelope), m);
77 77
78 env->exp_buff = exp_decay;78 env->exp_buff = __leaf_table_exp_decay;
79 env->inc_buff = attack_decay_inc;79 env->inc_buff = __leaf_table_attack_decay_inc;
80 env->buff_size = sizeof(exp_decay);80 env->buff_size = sizeof(__leaf_table_exp_decay);
81 81
82 env->loop = loop;82 env->loop = loop;
83 83
@@ -115,7 +115,7 @@ void tEnvelope_freeFromPool (tEnvelope* const envlp, tMempool* const mp) · 31 unmodified lines
115{115{
116 _tMempool* m = *mp;116 _tMempool* m = *mp;
117 _tEnvelope* env = *envlp;117 _tEnvelope* env = *envlp;
118 mpool_free(env, &m->pool);118 mpool_free(env, m);
119}119}
120 120
121void tEnvelope_setAttack(tEnvelope* const envlp, float attack)121void 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
258{258{
259 _tADSR* adsr = *adsrenv = (_tADSR*) leaf_alloc(sizeof(_tADSR));259 _tADSR* adsr = *adsrenv = (_tADSR*) leaf_alloc(sizeof(_tADSR));
260 260
261 adsr->exp_buff = exp_decay;261 adsr->exp_buff = __leaf_table_exp_decay;
262 adsr->inc_buff = attack_decay_inc;262 adsr->inc_buff = __leaf_table_attack_decay_inc;
263 adsr->buff_size = sizeof(exp_decay);263 adsr->buff_size = sizeof(__leaf_table_exp_decay);
264 264
265 if (attack > 8192.0f)265 if (attack > 8192.0f)
266 attack = 8192.0f;266 attack = 8192.0f;
@@ -323,11 +323,11 @@ void tADSR_free(tADSR* const adsrenv) · 56 unmodified lines
323void tADSR_initToPool (tADSR* const adsrenv, float attack, float decay, float sustain, float release, tMempool* const mp)323void tADSR_initToPool (tADSR* const adsrenv, float attack, float decay, float sustain, float release, tMempool* const mp)
324{324{
325 _tMempool* m = *mp;325 _tMempool* m = *mp;
326 _tADSR* adsr = *adsrenv = (_tADSR*) mpool_alloc(sizeof(_tADSR), &m->pool);326 _tADSR* adsr = *adsrenv = (_tADSR*) mpool_alloc(sizeof(_tADSR), m);
327 327
328 adsr->exp_buff = exp_decay;328 adsr->exp_buff = __leaf_table_exp_decay;
329 adsr->inc_buff = attack_decay_inc;329 adsr->inc_buff = __leaf_table_attack_decay_inc;
330 adsr->buff_size = sizeof(exp_decay);330 adsr->buff_size = sizeof(__leaf_table_exp_decay);
331 331
332 if (attack > 8192.0f)332 if (attack > 8192.0f)
333 attack = 8192.0f;333 attack = 8192.0f;
@@ -383,7 +383,7 @@ void tADSR_freeFromPool (tADSR* const adsrenv, tMempool* const mp) · 49 unmodified lines
383{383{
384 _tMempool* m = *mp;384 _tMempool* m = *mp;
385 _tADSR* adsr = *adsrenv;385 _tADSR* adsr = *adsrenv;
386 mpool_free(adsr, &m->pool);386 mpool_free(adsr, m);
387}387}
388 388
389void tADSR_setAttack(tADSR* const adsrenv, float attack)389void tADSR_setAttack(tADSR* const adsrenv, float attack)
@@ -614,7 +614,7 @@ void tRamp_free(tRamp* const r) · 224 unmodified lines
614void tRamp_initToPool (tRamp* const r, float time, int samples_per_tick, tMempool* const mp)614void tRamp_initToPool (tRamp* const r, float time, int samples_per_tick, tMempool* const mp)
615{615{
616 _tMempool* m = *mp;616 _tMempool* m = *mp;
617 _tRamp* ramp = *r = (_tRamp*) mpool_alloc(sizeof(_tRamp), &m->pool);617 _tRamp* ramp = *r = (_tRamp*) mpool_alloc(sizeof(_tRamp), m);
618 618
619 ramp->inv_sr_ms = 1.0f/(leaf.sampleRate*0.001f);619 ramp->inv_sr_ms = 1.0f/(leaf.sampleRate*0.001f);
620 ramp->minimum_time = ramp->inv_sr_ms * samples_per_tick;620 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
639 _tMempool* m = *mp;639 _tMempool* m = *mp;
640 _tRamp* ramp = *r;640 _tRamp* ramp = *r;
641 641
642 mpool_free(ramp, &m->pool);642 mpool_free(ramp, m);
643}643}
644 644
645void tRamp_setTime(tRamp* const ramp, float time)645void tRamp_setTime(tRamp* const ramp, float time)
@@ -723,7 +723,7 @@ void tExpSmooth_free(tExpSmooth* const expsmooth) · 77 unmodified lines
723void tExpSmooth_initToPool (tExpSmooth* const expsmooth, float val, float factor, tMempool* const mp)723void tExpSmooth_initToPool (tExpSmooth* const expsmooth, float val, float factor, tMempool* const mp)
724{724{
725 _tMempool* m = *mp;725 _tMempool* m = *mp;
726 _tExpSmooth* smooth = *expsmooth = (_tExpSmooth*) mpool_alloc(sizeof(_tExpSmooth), &m->pool);726 _tExpSmooth* smooth = *expsmooth = (_tExpSmooth*) mpool_alloc(sizeof(_tExpSmooth), m);
727 727
728 smooth->curr=val;728 smooth->curr=val;
729 smooth->dest=val;729 smooth->dest=val;
@@ -738,7 +738,7 @@ void tExpSmooth_freeFromPool (tExpSmooth* const expsmooth, tMempool* const mp · 8 unmodified lines
738 _tMempool* m = *mp;738 _tMempool* m = *mp;
739 _tExpSmooth* smooth = *expsmooth;739 _tExpSmooth* smooth = *expsmooth;
740 740
741 mpool_free(smooth, &m->pool);741 mpool_free(smooth, m);
742}742}
743 743
744void tExpSmooth_setFactor(tExpSmooth* const expsmooth, float factor)744void tExpSmooth_setFactor(tExpSmooth* const expsmooth, float factor)
@@ -778,3 +778,61 @@ float tExpSmooth_sample(tExpSmooth* const expsmooth) · 33 unmodified lines
778 return smooth->curr;778 return smooth->curr;
779}779}
780 780
781//tSlide is based on the max/msp slide~ object
782////
783
784void tSlide_init (tSlide* const sl, float upSlide, float downSlide)
785{
786 tSlide_initToPool (sl, upSlide, downSlide, &leaf.mempool);
787}
788void tSlide_free (tSlide* const sl)
789{
790 tSlide_freeFromPool (sl, &leaf.mempool);
791}
792void 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
812void 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
820float 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
43void tAllpass_initToPool (tAllpass* const ft, float initDelay, uint32_t maxDelay, tMempool* const mp)43void tAllpass_initToPool (tAllpass* const ft, float initDelay, uint32_t maxDelay, tMempool* const mp)
44{44{
45 _tMempool* m = *mp;45 _tMempool* m = *mp;
46 _tAllpass* f = *ft = (_tAllpass*) mpool_alloc(sizeof(_tAllpass), &m->pool);46 _tAllpass* f = *ft = (_tAllpass*) mpool_alloc(sizeof(_tAllpass), m);
47 47
48 f->gain = 0.7f;48 f->gain = 0.7f;
49 49
@@ -58,7 +58,7 @@ void tAllpass_freeFromPool (tAllpass* const ft, tMempool* const mp) · 8 unmodified lines
58 _tAllpass* f = *ft;58 _tAllpass* f = *ft;
59 59
60 tLinearDelay_freeFromPool(&f->delay, mp);60 tLinearDelay_freeFromPool(&f->delay, mp);
61 mpool_free(f, &m->pool);61 mpool_free(f, m);
62}62}
63 63
64void tAllpass_setDelay(tAllpass* const ft, float delay)64void tAllpass_setDelay(tAllpass* const ft, float delay)
@@ -112,7 +112,7 @@ void tOnePole_free(tOnePole* const ft) · 47 unmodified lines
112void tOnePole_initToPool (tOnePole* const ft, float freq, tMempool* const mp)112void tOnePole_initToPool (tOnePole* const ft, float freq, tMempool* const mp)
113{113{
114 _tMempool* m = *mp;114 _tMempool* m = *mp;
115 _tOnePole* f = *ft = (_tOnePole*) mpool_alloc(sizeof(_tOnePole), &m->pool);115 _tOnePole* f = *ft = (_tOnePole*) mpool_alloc(sizeof(_tOnePole), m);
116 116
117 f->gain = 1.0f;117 f->gain = 1.0f;
118 f->a0 = 1.0;118 f->a0 = 1.0;
@@ -128,7 +128,7 @@ void tOnePole_freeFromPool (tOnePole* const ft, tMempool* const mp) · 9 unmodified lines
128 _tMempool* m = *mp;128 _tMempool* m = *mp;
129 _tOnePole* f = *ft;129 _tOnePole* f = *ft;
130 130
131 mpool_free(f, &m->pool);131 mpool_free(f, m);
132}132}
133 133
134void tOnePole_setB0(tOnePole* const ft, float b0)134void tOnePole_setB0(tOnePole* const ft, float b0)
@@ -215,7 +215,7 @@ void tTwoPole_free(tTwoPole* const ft) · 80 unmodified lines
215void tTwoPole_initToPool (tTwoPole* const ft, tMempool* const mp)215void tTwoPole_initToPool (tTwoPole* const ft, tMempool* const mp)
216{216{
217 _tMempool* m = *mp;217 _tMempool* m = *mp;
218 _tTwoPole* f = *ft = (_tTwoPole*) mpool_alloc(sizeof(_tTwoPole), &m->pool);218 _tTwoPole* f = *ft = (_tTwoPole*) mpool_alloc(sizeof(_tTwoPole), m);
219 219
220 f->gain = 1.0f;220 f->gain = 1.0f;
221 f->a0 = 1.0;221 f->a0 = 1.0;
@@ -230,7 +230,7 @@ void tTwoPole_freeFromPool (tTwoPole* const ft, tMempool* const mp) · 8 unmodified lines
230 _tMempool* m = *mp;230 _tMempool* m = *mp;
231 _tTwoPole* f = *ft;231 _tTwoPole* f = *ft;
232 232
233 mpool_free(f, &m->pool);233 mpool_free(f, m);
234}234}
235 235
236float tTwoPole_tick(tTwoPole* const ft, float input)236float tTwoPole_tick(tTwoPole* const ft, float input)
@@ -341,7 +341,7 @@ void tOneZero_free(tOneZero* const ft) · 104 unmodified lines
341void tOneZero_initToPool (tOneZero* const ft, float theZero, tMempool* const mp)341void tOneZero_initToPool (tOneZero* const ft, float theZero, tMempool* const mp)
342{342{
343 _tMempool* m = *mp;343 _tMempool* m = *mp;
344 _tOneZero* f = *ft = (_tOneZero*) mpool_alloc(sizeof(_tOneZero), &m->pool);344 _tOneZero* f = *ft = (_tOneZero*) mpool_alloc(sizeof(_tOneZero), m);
345 345
346 f->gain = 1.0f;346 f->gain = 1.0f;
347 f->lastIn = 0.0f;347 f->lastIn = 0.0f;
@@ -354,7 +354,7 @@ void tOneZero_freeFromPool (tOneZero* const ft, tMempool* const mp) · 6 unmodified lines
354 _tMempool* m = *mp;354 _tMempool* m = *mp;
355 _tOneZero* f = *ft;355 _tOneZero* f = *ft;
356 356
357 mpool_free(f, &m->pool);357 mpool_free(f, m);
358}358}
359 359
360float tOneZero_tick(tOneZero* const ft, float input)360float tOneZero_tick(tOneZero* const ft, float input)
@@ -456,7 +456,7 @@ void tTwoZero_free(tTwoZero* const ft) · 95 unmodified lines
456void tTwoZero_initToPool (tTwoZero* const ft, tMempool* const mp)456void tTwoZero_initToPool (tTwoZero* const ft, tMempool* const mp)
457{457{
458 _tMempool* m = *mp;458 _tMempool* m = *mp;
459 _tTwoZero* f = *ft = (_tTwoZero*) mpool_alloc(sizeof(_tTwoZero), &m->pool);459 _tTwoZero* f = *ft = (_tTwoZero*) mpool_alloc(sizeof(_tTwoZero), m);
460 460
461 f->gain = 1.0f;461 f->gain = 1.0f;
462 f->lastIn[0] = 0.0f;462 f->lastIn[0] = 0.0f;
@@ -468,7 +468,7 @@ void tTwoZero_freeFromPool (tTwoZero* const ft, tMempool* const mp) · 5 unmodified lines
468 _tMempool* m = *mp;468 _tMempool* m = *mp;
469 _tTwoZero* f = *ft;469 _tTwoZero* f = *ft;
470 470
471 mpool_free(f, &m->pool);471 mpool_free(f, m);
472}472}
473 473
474float tTwoZero_tick(tTwoZero* const ft, float input)474float tTwoZero_tick(tTwoZero* const ft, float input)
@@ -564,7 +564,7 @@ void tPoleZero_free(tPoleZero* const pzf) · 89 unmodified lines
564void tPoleZero_initToPool (tPoleZero* const pzf, tMempool* const mp)564void tPoleZero_initToPool (tPoleZero* const pzf, tMempool* const mp)
565{565{
566 _tMempool* m = *mp;566 _tMempool* m = *mp;
567 _tPoleZero* f = *pzf = (_tPoleZero*) mpool_alloc(sizeof(_tPoleZero), &m->pool);567 _tPoleZero* f = *pzf = (_tPoleZero*) mpool_alloc(sizeof(_tPoleZero), m);
568 568
569 f->gain = 1.0f;569 f->gain = 1.0f;
570 f->b0 = 1.0;570 f->b0 = 1.0;
@@ -579,7 +579,7 @@ void tPoleZero_freeFromPool (tPoleZero* const pzf, tMempool* const mp) · 8 unmodified lines
579 _tMempool* m = *mp;579 _tMempool* m = *mp;
580 _tPoleZero* f = *pzf;580 _tPoleZero* f = *pzf;
581 581
582 mpool_free(f, &m->pool);582 mpool_free(f, m);
583}583}
584 584
585void tPoleZero_setB0(tPoleZero* const pzf, float b0)585void tPoleZero_setB0(tPoleZero* const pzf, float b0)
@@ -695,7 +695,7 @@ void tBiQuad_free(tBiQuad* const ft) · 109 unmodified lines
695void tBiQuad_initToPool (tBiQuad* const ft, tMempool* const mp)695void tBiQuad_initToPool (tBiQuad* const ft, tMempool* const mp)
696{696{
697 _tMempool* m = *mp;697 _tMempool* m = *mp;
698 _tBiQuad* f = *ft = (_tBiQuad*) mpool_alloc(sizeof(_tBiQuad), &m->pool);698 _tBiQuad* f = *ft = (_tBiQuad*) mpool_alloc(sizeof(_tBiQuad), m);
699 699
700 f->gain = 1.0f;700 f->gain = 1.0f;
701 701
@@ -713,7 +713,7 @@ void tBiQuad_freeFromPool (tBiQuad* const ft, tMempool* const mp) · 11 unmodified lines
713 _tMempool* m = *mp;713 _tMempool* m = *mp;
714 _tBiQuad* f = *ft;714 _tBiQuad* f = *ft;
715 715
716 mpool_free(f, &m->pool);716 mpool_free(f, m);
717}717}
718 718
719float tBiQuad_tick(tBiQuad* const ft, float input)719float tBiQuad_tick(tBiQuad* const ft, float input)
@@ -867,7 +867,7 @@ void tSVF_free(tSVF* const svff) · 147 unmodified lines
867void tSVF_initToPool (tSVF* const svff, SVFType type, float freq, float Q, tMempool* const mp)867void tSVF_initToPool (tSVF* const svff, SVFType type, float freq, float Q, tMempool* const mp)
868{868{
869 _tMempool* m = *mp;869 _tMempool* m = *mp;
870 _tSVF* svf = *svff = (_tSVF*) mpool_alloc(sizeof(_tSVF), &m->pool);870 _tSVF* svf = *svff = (_tSVF*) mpool_alloc(sizeof(_tSVF), m);
871 871
872 svf->type = type;872 svf->type = type;
873 873
@@ -886,7 +886,7 @@ void tSVF_freeFromPool (tSVF* const svff, tMempool* const mp) · 12 unmodified lines
886 _tMempool* m = *mp;886 _tMempool* m = *mp;
887 _tSVF* svf = *svff;887 _tSVF* svf = *svff;
888 888
889 mpool_free(svf, &m->pool);889 mpool_free(svf, m);
890}890}
891 891
892float tSVF_tick(tSVF* const svff, float v0)892float 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
939 svf->ic1eq = 0;939 svf->ic1eq = 0;
940 svf->ic2eq = 0;940 svf->ic2eq = 0;
941 941
942 svf->g = filtertan[input];942 svf->g = __leaf_table_filtertan[input];
943 svf->k = 1.0f/Q;943 svf->k = 1.0f/Q;
944 svf->a1 = 1.0f/(1.0f+svf->g*(svf->g+svf->k));944 svf->a1 = 1.0f/(1.0f+svf->g*(svf->g+svf->k));
945 svf->a2 = svf->g*svf->a1;945 svf->a2 = svf->g*svf->a1;
@@ -956,14 +956,14 @@ void tEfficientSVF_free(tEfficientSVF* const svff) · 10 unmodified lines
956void tEfficientSVF_initToPool (tEfficientSVF* const svff, SVFType type, uint16_t input, float Q, tMempool* const mp)956void tEfficientSVF_initToPool (tEfficientSVF* const svff, SVFType type, uint16_t input, float Q, tMempool* const mp)
957{957{
958 _tMempool* m = *mp;958 _tMempool* m = *mp;
959 _tEfficientSVF* svf = *svff = (_tEfficientSVF*) mpool_alloc(sizeof(_tEfficientSVF), &m->pool);959 _tEfficientSVF* svf = *svff = (_tEfficientSVF*) mpool_alloc(sizeof(_tEfficientSVF), m);
960 960
961 svf->type = type;961 svf->type = type;
962 962
963 svf->ic1eq = 0;963 svf->ic1eq = 0;
964 svf->ic2eq = 0;964 svf->ic2eq = 0;
965 965
966 svf->g = filtertan[input];966 svf->g = __leaf_table_filtertan[input];
967 svf->k = 1.0f/Q;967 svf->k = 1.0f/Q;
968 svf->a1 = 1.0f/(1.0f+svf->g*(svf->g+svf->k));968 svf->a1 = 1.0f/(1.0f+svf->g*(svf->g+svf->k));
969 svf->a2 = svf->g*svf->a1;969 svf->a2 = svf->g*svf->a1;
@@ -975,7 +975,7 @@ void tEfficientSVF_freeFromPool (tEfficientSVF* const svff, tMempool* const · 5 unmodified lines
975 _tMempool* m = *mp;975 _tMempool* m = *mp;
976 _tEfficientSVF* svf = *svff;976 _tEfficientSVF* svf = *svff;
977 977
978 mpool_free(svf, &m->pool);978 mpool_free(svf, m);
979}979}
980 980
981float tEfficientSVF_tick(tEfficientSVF* const svff, float v0)981float tEfficientSVF_tick(tEfficientSVF* const svff, float v0)
@@ -1002,7 +1002,7 @@ void tEfficientSVF_setFreq(tEfficientSVF* const svff, uint16_t input) · 20 unmodified lines
1002{1002{
1003 _tEfficientSVF* svf = *svff;1003 _tEfficientSVF* svf = *svff;
1004 1004
1005 svf->g = filtertan[input];1005 svf->g = __leaf_table_filtertan[input];
1006 svf->a1 = 1.0f/(1.0f + svf->g * (svf->g + svf->k));1006 svf->a1 = 1.0f/(1.0f + svf->g * (svf->g + svf->k));
1007 svf->a2 = svf->g * svf->a1;1007 svf->a2 = svf->g * svf->a1;
1008 svf->a3 = svf->g * svf->a2;1008 svf->a3 = svf->g * svf->a2;
@@ -1040,7 +1040,7 @@ void tHighpass_free(tHighpass* const ft) · 31 unmodified lines
1040void tHighpass_initToPool (tHighpass* const ft, float freq, tMempool* const mp)1040void tHighpass_initToPool (tHighpass* const ft, float freq, tMempool* const mp)
1041{1041{
1042 _tMempool* m = *mp;1042 _tMempool* m = *mp;
1043 _tHighpass* f = *ft = (_tHighpass*) mpool_calloc(sizeof(_tHighpass), &m->pool);1043 _tHighpass* f = *ft = (_tHighpass*) mpool_calloc(sizeof(_tHighpass), m);
1044 1044
1045 f->R = (1.0f - (freq * leaf.twoPiTimesInvSampleRate));1045 f->R = (1.0f - (freq * leaf.twoPiTimesInvSampleRate));
1046 f->ys = 0.0f;1046 f->ys = 0.0f;
@@ -1054,7 +1054,7 @@ void tHighpass_freeFromPool (tHighpass* const ft, tMempool* const mp) · 7 unmodified lines
1054 _tMempool* m = *mp;1054 _tMempool* m = *mp;
1055 _tHighpass* f = *ft;1055 _tHighpass* f = *ft;
1056 1056
1057 mpool_free(f, &m->pool);1057 mpool_free(f, m);
1058}1058}
1059 1059
1060void tHighpass_setFreq(tHighpass* const ft, float freq)1060void tHighpass_setFreq(tHighpass* const ft, float freq)
@@ -1121,7 +1121,7 @@ void tButterworth_free(tButterworth* const ft) · 60 unmodified lines
1121void tButterworth_initToPool (tButterworth* const ft, int N, float f1, float f2, tMempool* const mp)1121void tButterworth_initToPool (tButterworth* const ft, int N, float f1, float f2, tMempool* const mp)
1122{1122{
1123 _tMempool* m = *mp;1123 _tMempool* m = *mp;
1124 _tButterworth* f = *ft = (_tButterworth*) mpool_alloc(sizeof(_tButterworth), &m->pool);1124 _tButterworth* f = *ft = (_tButterworth*) mpool_alloc(sizeof(_tButterworth), m);
1125 1125
1126 f->f1 = f1;1126 f->f1 = f1;
1127 f->f2 = f2;1127 f->f2 = f2;
@@ -1149,7 +1149,7 @@ void tButterworth_freeFromPool (tButterworth* const ft, tMempool* const mp) · 21 unmodified lines
1149 tSVF_freeFromPool(&f->high[i], mp);1149 tSVF_freeFromPool(&f->high[i], mp);
1150 }1150 }
1151 1151
1152 mpool_free(f, &m->pool);1152 mpool_free(f, m);
1153}1153}
1154 1154
1155float tButterworth_tick(tButterworth* const ft, float samp)1155float tButterworth_tick(tButterworth* const ft, float samp)
@@ -1214,11 +1214,11 @@ void tFIR_free(tFIR* const firf) · 58 unmodified lines
1214void tFIR_initToPool (tFIR* const firf, float* coeffs, int numTaps, tMempool* const mp)1214void tFIR_initToPool (tFIR* const firf, float* coeffs, int numTaps, tMempool* const mp)
1215{1215{
1216 _tMempool* m = *mp;1216 _tMempool* m = *mp;
1217 _tFIR* fir = *firf = (_tFIR*) mpool_alloc(sizeof(_tFIR), &m->pool);1217 _tFIR* fir = *firf = (_tFIR*) mpool_alloc(sizeof(_tFIR), m);
1218 1218
1219 fir->numTaps = numTaps;1219 fir->numTaps = numTaps;
1220 fir->coeff = coeffs;1220 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);
1222 for (int i = 0; i < fir->numTaps; ++i) fir->past[i] = 0.0f;1222 for (int i = 0; i < fir->numTaps; ++i) fir->past[i] = 0.0f;
1223}1223}
1224 1224
@@ -1227,8 +1227,8 @@ void tFIR_freeFromPool (tFIR* const firf, tMempool* const mp) · 2 unmodified lines
1227 _tMempool* m = *mp;1227 _tMempool* m = *mp;
1228 _tFIR* fir = *firf;1228 _tFIR* fir = *firf;
1229 1229
1230 mpool_free(fir->past, &m->pool);1230 mpool_free(fir->past, m);
1231 mpool_free(fir, &m->pool);1231 mpool_free(fir, m);
1232}1232}
1233 1233
1234float tFIR_tick(tFIR* const firf, float input)1234float tFIR_tick(tFIR* const firf, float input)
@@ -1241,3 +1241,86 @@ float tFIR_tick(tFIR* const firf, float input) · 6 unmodified lines
1241 for (int i = fir->numTaps-1; i > 0; --i) fir->past[i] = fir->past[i-1];1241 for (int i = fir->numTaps-1; i > 0; --i) fir->past[i] = fir->past[i-1];
1242 return y;1242 return y;
1243}1243}
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
1251void tMedianFilter_init (tMedianFilter* const f, int size)
1252{
1253 tMedianFilter_initToPool(f, size, &leaf.mempool);
1254}
1255void tMedianFilter_free (tMedianFilter* const f)
1256{
1257 tMedianFilter_freeFromPool(f, &leaf.mempool);
1258}
1259void 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}
1277void 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
1287float 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
66void t808Cowbell_initToPool (t808Cowbell* const cowbellInst, int useStick, tMempool* const mp)66void t808Cowbell_initToPool (t808Cowbell* const cowbellInst, int useStick, tMempool* const mp)
67{67{
68 _tMempool* m = *mp;68 _tMempool* m = *mp;
69 _t808Cowbell* cowbell = *cowbellInst = (_t808Cowbell*) mpool_alloc(sizeof(_t808Cowbell), &m->pool);69 _t808Cowbell* cowbell = *cowbellInst = (_t808Cowbell*) mpool_alloc(sizeof(_t808Cowbell), m);
70 70
71 tSquare_initToPool(&cowbell->p[0], mp);71 tSquare_initToPool(&cowbell->p[0], mp);
72 tSquare_setFreq(&cowbell->p[0], 540.0f);72 tSquare_setFreq(&cowbell->p[0], 540.0f);
@@ -107,7 +107,7 @@ void t808Cowbell_freeFromPool (t808Cowbell* const cowbellInst, tMempoo · 34 unmodified lines
107 tHighpass_freeFromPool(&cowbell->highpass, mp);107 tHighpass_freeFromPool(&cowbell->highpass, mp);
108 tNoise_freeFromPool(&cowbell->stick, mp);108 tNoise_freeFromPool(&cowbell->stick, mp);
109 tEnvelope_freeFromPool(&cowbell->envStick, mp);109 tEnvelope_freeFromPool(&cowbell->envStick, mp);
110 mpool_free(cowbell, &m->pool);110 mpool_free(cowbell, m);
111}111}
112 112
113void t808Cowbell_on(t808Cowbell* const cowbellInst, float vel)113void t808Cowbell_on(t808Cowbell* const cowbellInst, float vel)
@@ -242,7 +242,7 @@ void t808Hihat_free(t808Hihat* const hihatInst) · 128 unmodified lines
242void t808Hihat_initToPool (t808Hihat* const hihatInst, tMempool* const mp)242void t808Hihat_initToPool (t808Hihat* const hihatInst, tMempool* const mp)
243{243{
244 _tMempool* m = *mp;244 _tMempool* m = *mp;
245 _t808Hihat* hihat = *hihatInst = (_t808Hihat*) mpool_alloc(sizeof(_t808Hihat), &m->pool);245 _t808Hihat* hihat = *hihatInst = (_t808Hihat*) mpool_alloc(sizeof(_t808Hihat), m);
246 246
247 for (int i = 0; i < 6; i++)247 for (int i = 0; i < 6; i++)
248 {248 {
@@ -294,7 +294,7 @@ void t808Hihat_freeFromPool (t808Hihat* const hihatInst, tMempool* const mp) · 45 unmodified lines
294 294
295 tHighpass_freeFromPool(&hihat->highpass, mp);295 tHighpass_freeFromPool(&hihat->highpass, mp);
296 296
297 mpool_free(hihat, &m->pool);297 mpool_free(hihat, m);
298}298}
299 299
300void t808Hihat_on(t808Hihat* const hihatInst, float vel)300void t808Hihat_on(t808Hihat* const hihatInst, float vel)
@@ -454,7 +454,7 @@ void t808Snare_free (t808Snare* const snareInst) · 153 unmodified lines
454void t808Snare_initToPool (t808Snare* const snareInst, tMempool* const mp)454void t808Snare_initToPool (t808Snare* const snareInst, tMempool* const mp)
455{455{
456 _tMempool* m = *mp;456 _tMempool* m = *mp;
457 _t808Snare* snare = *snareInst = (_t808Snare*) mpool_alloc(sizeof(_t808Snare), &m->pool);457 _t808Snare* snare = *snareInst = (_t808Snare*) mpool_alloc(sizeof(_t808Snare), m);
458 458
459 float ratio[2] = {1.0, 1.5};459 float ratio[2] = {1.0, 1.5};
460 for (int i = 0; i < 2; i++)460 for (int i = 0; i < 2; i++)
@@ -499,7 +499,7 @@ void t808Snare_freeFromPool (t808Snare* const snareInst, tMempool* const mp) · 38 unmodified lines
499 tEnvelope_freeFromPool(&snare->noiseEnvGain, mp);499 tEnvelope_freeFromPool(&snare->noiseEnvGain, mp);
500 tEnvelope_freeFromPool(&snare->noiseEnvFilter, mp);500 tEnvelope_freeFromPool(&snare->noiseEnvFilter, mp);
501 501
502 mpool_free(snare, &m->pool);502 mpool_free(snare, m);
503}503}
504 504
505void t808Snare_on(t808Snare* const snareInst, float vel)505void t808Snare_on(t808Snare* const snareInst, float vel)
@@ -629,7 +629,7 @@ void t808Kick_free (t808Kick* const kickInst) · 123 unmodified lines
629void t808Kick_initToPool (t808Kick* const kickInst, tMempool* const mp)629void t808Kick_initToPool (t808Kick* const kickInst, tMempool* const mp)
630{630{
631 _tMempool* m = *mp;631 _tMempool* m = *mp;
632 _t808Kick* kick = *kickInst = (_t808Kick*) mpool_alloc(sizeof(_t808Kick), &m->pool);632 _t808Kick* kick = *kickInst = (_t808Kick*) mpool_alloc(sizeof(_t808Kick), m);
633 633
634 tCycle_initToPool(&kick->tone, mp);634 tCycle_initToPool(&kick->tone, mp);
635 kick->toneInitialFreq = 40.0f;635 kick->toneInitialFreq = 40.0f;
@@ -658,7 +658,7 @@ void t808Kick_freeFromPool (t808Kick* const kickInst, tMempool* const mp) · 22 unmodified lines
658 tNoise_freeFromPool(&kick->noiseOsc, mp);658 tNoise_freeFromPool(&kick->noiseOsc, mp);
659 tEnvelope_freeFromPool(&kick->noiseEnvGain, mp);659 tEnvelope_freeFromPool(&kick->noiseEnvGain, mp);
660 660
661 mpool_free(kick, &m->pool);661 mpool_free(kick, m);
662}662}
663 663
664float t808Kick_tick (t808Kick* const kickInst)664float t808Kick_tick (t808Kick* const kickInst)
LEAF/Src/leaf-math.c+38−6
@@ -18,11 +18,28 @@ · 17 unmodified lines
18 18
19#endif19#endif
20 20
21// The C-embedded Audio Library.
22#define TWO_TO_16 65536.f
23 21
24#define EXPONENTIAL_TABLE_SIZE 6553622#define EXPONENTIAL_TABLE_SIZE 65536
25 23
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;
28float 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
26float interpolate3max(float *buf, const int peakindex)43float interpolate3max(float *buf, const int peakindex)
27{44{
28 float a = buf[peakindex-1];45 float a = buf[peakindex-1];
@@ -190,11 +207,12 @@ float LEAF_round (float input, float rnd) · 161 unmodified lines
190 return roundf(input * scale) / scale;207 return roundf(input * scale) / scale;
191}208}
192 209
193union unholy_t unholy;210
194 211
195float LEAF_bitwise_xor(float input, uint32_t op)212float LEAF_bitwise_xor(float input, uint32_t op)
196{213{
197 unholy.f = input;214 union unholy_t unholy;
215 unholy.f = input;
198 unholy.i = (unholy.i ^ op);216 unholy.i = (unholy.i ^ op);
199 217
200 return unholy.f;218 return unholy.f;
@@ -444,8 +462,8 @@ float powtodb(float f) · 243 unmodified lines
444 if (f <= 0) return (0);462 if (f <= 0) return (0);
445 else463 else
446 {464 {
447 float val = 100 + 10.f/LOGTEN * logf(f);465 float val = 100.0f + 10.0f/LOGTEN * logf(f);
448 return (val < 0 ? 0 : val);466 return (val < 0.0f ? 0.0f : val);
449 }467 }
450}468}
451 469
@@ -483,3 +501,17 @@ float dbtorms(float f) · 31 unmodified lines
483 return (expf((LOGTEN * 0.05f) * (f-100.0f)));501 return (expf((LOGTEN * 0.05f) * (f-100.0f)));
484}502}
485 503
504
505float atodb(float a)
506{
507 return 20.0f*log10f(a);
508}
509
510float 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
48 48
49#endif49#endif
50 50
51_tMempool leaf_pool;
52tMempool leaf_mempool;
53size_t header_size;
54
55
56/**51/**
57 * private function52 * private function
58 */53 */
@@ -63,33 +58,33 @@ static inline void delink_node(mpool_node_t* node); · 4 unmodified lines
63/**58/**
64 * create memory pool59 * create memory pool
65 */60 */
66void mpool_create (char* memory, size_t size, mpool_t* pool)61void mpool_create (char* memory, size_t size, _tMempool* pool)
67{62{
68 header_size = mpool_align(sizeof(mpool_node_t));63 leaf.header_size = mpool_align(sizeof(mpool_node_t));
69 64
70 pool->mpool = (void*)memory;65 pool->mpool = (void*)memory;
71 pool->usize = 0;66 pool->usize = 0;
72 pool->msize = size;67 pool->msize = size;
73 68
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);
75 70
76 for (int i = 0; i < pool->head->size; i++)71 for (int i = 0; i < pool->head->size; i++)
77 {72 {
78 memory[i+header_size]=0;73 memory[i+leaf.header_size]=0;
79 }74 }
80}75}
81 76
82void leaf_pool_init(char* memory, size_t size)77void leaf_pool_init(char* memory, size_t size)
83{78{
84 mpool_create(memory, size, &leaf_pool.pool);79 mpool_create(memory, size, &leaf._mempool);
85 80
86 leaf_mempool = &leaf_pool;81 leaf.mempool = &leaf._mempool;
87}82}
88 83
89/**84/**
90 * allocate memory from memory pool85 * allocate memory from memory pool
91 */86 */
92void* mpool_alloc(size_t asize, mpool_t* pool)87void* mpool_alloc(size_t asize, _tMempool* pool)
93{88{
94 // If the head is NULL, the mempool is full89 // If the head is NULL, the mempool is full
95 if (pool->head == NULL) return NULL;90 if (pool->head == NULL) return NULL;
@@ -112,14 +107,14 @@ void* mpool_alloc(size_t asize, mpool_t* pool) · 16 unmodified lines
112 mpool_node_t* new_node;107 mpool_node_t* new_node;
113 size_t leftover = node_to_alloc->size - size_to_alloc;108 size_t leftover = node_to_alloc->size - size_to_alloc;
114 node_to_alloc->size = size_to_alloc;109 node_to_alloc->size = size_to_alloc;
115 if (leftover > header_size)110 if (leftover > leaf.header_size)
116 {111 {
117 long offset = (char*) node_to_alloc - (char*) pool->mpool;112 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;
119 new_node = create_node(&pool->mpool[offset],114 new_node = create_node(&pool->mpool[offset],
120 node_to_alloc->next,115 node_to_alloc->next,
121 node_to_alloc->prev,116 node_to_alloc->prev,
122 leftover - header_size);117 leftover - leaf.header_size);
123 }118 }
124 else119 else
125 {120 {
@@ -139,7 +134,7 @@ void* mpool_alloc(size_t asize, mpool_t* pool) · 13 unmodified lines
139 // Remove the allocated node from the free list134 // Remove the allocated node from the free list
140 delink_node(node_to_alloc);135 delink_node(node_to_alloc);
141 136
142 pool->usize += header_size + node_to_alloc->size;137 pool->usize += leaf.header_size + node_to_alloc->size;
143 138
144 if (leaf.clearOnAllocation > 0)139 if (leaf.clearOnAllocation > 0)
145 {140 {
@@ -155,7 +150,7 @@ void* mpool_alloc(size_t asize, mpool_t* pool) · 9 unmodified lines
155/**150/**
156 * allocate memory from memory pool and also clear that memory to be blank151 * allocate memory from memory pool and also clear that memory to be blank
157 */152 */
158void* mpool_calloc(size_t asize, mpool_t* pool)153void* mpool_calloc(size_t asize, _tMempool* pool)
159{154{
160 // If the head is NULL, the mempool is full155 // If the head is NULL, the mempool is full
161 if (pool->head == NULL) return NULL;156 if (pool->head == NULL) return NULL;
@@ -178,14 +173,14 @@ void* mpool_calloc(size_t asize, mpool_t* pool) · 16 unmodified lines
178 mpool_node_t* new_node;173 mpool_node_t* new_node;
179 size_t leftover = node_to_alloc->size - size_to_alloc;174 size_t leftover = node_to_alloc->size - size_to_alloc;
180 node_to_alloc->size = size_to_alloc;175 node_to_alloc->size = size_to_alloc;
181 if (leftover > header_size)176 if (leftover > leaf.header_size)
182 {177 {
183 long offset = (char*) node_to_alloc - (char*) pool->mpool;178 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;
185 new_node = create_node(&pool->mpool[offset],180 new_node = create_node(&pool->mpool[offset],
186 node_to_alloc->next,181 node_to_alloc->next,
187 node_to_alloc->prev,182 node_to_alloc->prev,
188 leftover - header_size);183 leftover - leaf.header_size);
189 }184 }
190 else185 else
191 {186 {
@@ -205,7 +200,7 @@ void* mpool_calloc(size_t asize, mpool_t* pool) · 13 unmodified lines
205 // Remove the allocated node from the free list200 // Remove the allocated node from the free list
206 delink_node(node_to_alloc);201 delink_node(node_to_alloc);
207 202
208 pool->usize += header_size + node_to_alloc->size;203 pool->usize += leaf.header_size + node_to_alloc->size;
209 // Format the new pool204 // Format the new pool
210 char* new_pool = (char*)node_to_alloc->pool;205 char* new_pool = (char*)node_to_alloc->pool;
211 for (int i = 0; i < node_to_alloc->size; i++) new_pool[i] = 0;206 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
216void* leaf_alloc(size_t size)211void* leaf_alloc(size_t size)
217{212{
218 //printf("alloc %i\n", size);213 //printf("alloc %i\n", size);
219 void* block = mpool_alloc(size, &leaf_pool.pool);214 void* block = mpool_alloc(size, &leaf._mempool);
220 215
221 if (block == NULL) leaf_mempool_overrun();216 if (block == NULL) leaf_mempool_overrun();
222 217
@@ -226,7 +221,7 @@ void* leaf_alloc(size_t size) · 3 unmodified lines
226void* leaf_calloc(size_t size)221void* leaf_calloc(size_t size)
227{222{
228 //printf("alloc %i\n", size);223 //printf("alloc %i\n", size);
229 void* block = mpool_calloc(size, &leaf_pool.pool);224 void* block = mpool_calloc(size, &leaf._mempool);
230 225
231 if (block == NULL) leaf_mempool_overrun();226 if (block == NULL) leaf_mempool_overrun();
232 227
@@ -234,13 +229,13 @@ void* leaf_calloc(size_t size) · 1 unmodified line
234 return block;229 return block;
235}230}
236 231
237void mpool_free(void* ptr, mpool_t* pool)232void mpool_free(void* ptr, _tMempool* pool)
238{233{
239 //if (ptr < pool->mpool || ptr >= pool->mpool + pool->msize)234 //if (ptr < pool->mpool || ptr >= pool->mpool + pool->msize)
240 // Get the node at the freed space235 // 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);
242 237
243 pool->usize -= header_size + freed_node->size;238 pool->usize -= leaf.header_size + freed_node->size;
244 239
245 // Check each node in the list against the newly freed one to see if it's adjacent in memory240 // Check each node in the list against the newly freed one to see if it's adjacent in memory
246 mpool_node_t* other_node = pool->head;241 mpool_node_t* other_node = pool->head;
@@ -249,10 +244,10 @@ void mpool_free(void* ptr, mpool_t* pool) · 2 unmodified lines
249 {244 {
250 next_node = other_node->next;245 next_node = other_node->next;
251 // Check if a node is directly after the freed node246 // 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)
253 {248 {
254 // Increase freed node's size249 // Increase freed node's size
255 freed_node->size += header_size + other_node->size;250 freed_node->size += leaf.header_size + other_node->size;
256 // If we are merging with the head, move the head forward251 // If we are merging with the head, move the head forward
257 if (other_node == pool->head) pool->head = pool->head->next;252 if (other_node == pool->head) pool->head = pool->head->next;
258 // Delink the merged node253 // Delink the merged node
@@ -260,10 +255,10 @@ void mpool_free(void* ptr, mpool_t* pool) · 1 unmodified line
260 }255 }
261 256
262 // Check if a node is directly before the freed node257 // 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)
264 {259 {
265 // Increase the merging node's size260 // 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;
267 262
268 if (other_node != pool->head)263 if (other_node != pool->head)
269 {264 {
@@ -298,32 +293,32 @@ void mpool_free(void* ptr, mpool_t* pool) · 28 unmodified lines
298 293
299void leaf_free(void* ptr)294void leaf_free(void* ptr)
300{295{
301 mpool_free(ptr, &leaf_pool.pool);296 mpool_free(ptr, &leaf._mempool);
302}297}
303 298
304size_t mpool_get_size(mpool_t* pool)299size_t mpool_get_size(_tMempool* pool)
305{300{
306 return pool->msize;301 return pool->msize;
307}302}
308 303
309size_t mpool_get_used(mpool_t* pool)304size_t mpool_get_used(_tMempool* pool)
310{305{
311 return pool->usize;306 return pool->usize;
312}307}
313 308
314size_t leaf_pool_get_size(void)309size_t leaf_pool_get_size(void)
315{310{
316 return mpool_get_size(&leaf_pool.pool);311 return mpool_get_size(&leaf._mempool);
317}312}
318 313
319size_t leaf_pool_get_used(void)314size_t leaf_pool_get_used(void)
320{315{
321 return mpool_get_used(&leaf_pool.pool);316 return mpool_get_used(&leaf._mempool);
322}317}
323 318
324void* leaf_pool_get_pool(void)319void* leaf_pool_get_pool(void)
325{320{
326 float* buff = (float*)leaf_pool.pool.mpool;321 float* buff = (float*)leaf._mempool.mpool;
327 322
328 return buff;323 return buff;
329}324}
@@ -338,7 +333,7 @@ static inline size_t mpool_align(size_t size) { · 8 unmodified lines
338static inline mpool_node_t* create_node(void* block_location, mpool_node_t* next, mpool_node_t* prev, size_t size)333static inline mpool_node_t* create_node(void* block_location, mpool_node_t* next, mpool_node_t* prev, size_t size)
339{334{
340 mpool_node_t* node = (mpool_node_t*)block_location;335 mpool_node_t* node = (mpool_node_t*)block_location;
341 node->pool = block_location + header_size;336 node->pool = block_location + leaf.header_size;
342 node->next = next;337 node->next = next;
343 node->prev = prev;338 node->prev = prev;
344 node->size = size;339 node->size = size;
@@ -372,20 +367,20 @@ void leaf_mempool_overrun(void) · 27 unmodified lines
372 367
373void tMempool_init(tMempool* const mp, char* memory, size_t size)368void tMempool_init(tMempool* const mp, char* memory, size_t size)
374{369{
375 tMempool_initToPool(mp, memory, size, &leaf_mempool);370 tMempool_initToPool(mp, memory, size, &leaf.mempool);
376}371}
377 372
378void tMempool_free(tMempool* const mp)373void tMempool_free(tMempool* const mp)
379{374{
380 tMempool_freeFromPool(mp, &leaf_mempool);375 tMempool_freeFromPool(mp, &leaf.mempool);
381}376}
382 377
383void tMempool_initToPool (tMempool* const mp, char* memory, size_t size, tMempool* const mem)378void tMempool_initToPool (tMempool* const mp, char* memory, size_t size, tMempool* const mem)
384{379{
385 _tMempool* mm = *mem;380 _tMempool* mm = *mem;
386 _tMempool* m = *mp = (_tMempool*) mpool_alloc(sizeof(_tMempool), &mm->pool);381 _tMempool* m = *mp = (_tMempool*) mpool_alloc(sizeof(_tMempool), mm);
387 382
388 mpool_create (memory, size, &m->pool);383 mpool_create (memory, size, m);
389}384}
390 385
391void tMempool_freeFromPool (tMempool* const mp, tMempool* const mem)386void tMempool_freeFromPool (tMempool* const mp, tMempool* const mem)
@@ -393,5 +388,5 @@ void tMempool_freeFromPool (tMempool* const mp, tMempool* const mem) · 1 unmodified line
393 _tMempool* mm = *mem;388 _tMempool* mm = *mem;
394 _tMempool* m = *mp;389 _tMempool* m = *mp;
395 390
396 mpool_free(m, &mm->pool);391 mpool_free(m, mm);
397}392}
LEAF/Src/leaf-midi.c+14−14
@@ -42,7 +42,7 @@ void tStack_free(tStack* const stack) · 41 unmodified lines
42void tStack_initToPool (tStack* const stack, tMempool* const mp)42void tStack_initToPool (tStack* const stack, tMempool* const mp)
43{43{
44 _tMempool* m = *mp;44 _tMempool* m = *mp;
45 _tStack* ns = *stack = (_tStack*) mpool_alloc(sizeof(_tStack), &m->pool);45 _tStack* ns = *stack = (_tStack*) mpool_alloc(sizeof(_tStack), m);
46 46
47 ns->ordered = OFALSE;47 ns->ordered = OFALSE;
48 ns->size = 0;48 ns->size = 0;
@@ -57,7 +57,7 @@ void tStack_freeFromPool (tStack* const stack, tMempool* const mp) · 8 unmodified lines
57 _tMempool* m = *mp;57 _tMempool* m = *mp;
58 _tStack* ns = *stack;58 _tStack* ns = *stack;
59 59
60 mpool_free(ns, &m->pool);60 mpool_free(ns, m);
61}61}
62 62
63// If stack contains note, returns index. Else returns -1;63// If stack contains note, returns index. Else returns -1;
@@ -339,7 +339,7 @@ void tPoly_free(tPoly* const polyh) · 275 unmodified lines
339void tPoly_initToPool (tPoly* const polyh, int maxNumVoices, tMempool* const mp)339void tPoly_initToPool (tPoly* const polyh, int maxNumVoices, tMempool* const mp)
340{340{
341 _tMempool* m = *mp;341 _tMempool* m = *mp;
342 _tPoly* poly = *polyh = (_tPoly*) mpool_alloc(sizeof(_tPoly), &m->pool);342 _tPoly* poly = *polyh = (_tPoly*) mpool_alloc(sizeof(_tPoly), m);
343 343
344 poly->numVoices = maxNumVoices;344 poly->numVoices = maxNumVoices;
345 poly->maxNumVoices = maxNumVoices;345 poly->maxNumVoices = maxNumVoices;
@@ -359,14 +359,14 @@ void tPoly_initToPool (tPoly* const polyh, int maxNumVoices, tMemp · 13 unmodified lines
359 359
360 poly->glideTime = 5.0f;360 poly->glideTime = 5.0f;
361 361
362 poly->ramps = (tRamp*) mpool_alloc(sizeof(tRamp) * 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->pool);363 poly->rampVals = (float*) mpool_alloc(sizeof(float) * poly->maxNumVoices, m);
364 poly->firstReceived = (oBool*) mpool_alloc(sizeof(oBool) * poly->maxNumVoices, &m->pool);364 poly->firstReceived = (oBool*) mpool_alloc(sizeof(oBool) * poly->maxNumVoices, m);
365 poly->voices = (int**) mpool_alloc(sizeof(int*) * poly->maxNumVoices, &m->pool);365 poly->voices = (int**) mpool_alloc(sizeof(int*) * poly->maxNumVoices, m);
366 366
367 for (int i = 0; i < poly->maxNumVoices; ++i)367 for (int i = 0; i < poly->maxNumVoices; ++i)
368 {368 {
369 poly->voices[i] = (int*) mpool_alloc(sizeof(int) * 2, &m->pool);369 poly->voices[i] = (int*) mpool_alloc(sizeof(int) * 2, m);
370 poly->voices[i][0] = -1;370 poly->voices[i][0] = -1;
371 poly->firstReceived[i] = OFALSE;371 poly->firstReceived[i] = OFALSE;
372 372
@@ -390,18 +390,18 @@ void tPoly_freeFromPool (tPoly* const polyh, tMempool* const mp) · 17 unmodified lines
390 for (int i = 0; i < poly->maxNumVoices; i++)390 for (int i = 0; i < poly->maxNumVoices; i++)
391 {391 {
392 tRamp_freeFromPool(&poly->ramps[i], mp);392 tRamp_freeFromPool(&poly->ramps[i], mp);
393 mpool_free(poly->voices[i], &m->pool);393 mpool_free(poly->voices[i], m);
394 }394 }
395 tRamp_freeFromPool(&poly->pitchBendRamp, mp);395 tRamp_freeFromPool(&poly->pitchBendRamp, mp);
396 tStack_freeFromPool(&poly->stack, mp);396 tStack_freeFromPool(&poly->stack, mp);
397 tStack_freeFromPool(&poly->orderStack, mp);397 tStack_freeFromPool(&poly->orderStack, mp);
398 398
399 mpool_free(poly->voices, &m->pool);399 mpool_free(poly->voices, m);
400 mpool_free(poly->ramps, &m->pool);400 mpool_free(poly->ramps, m);
401 mpool_free(poly->rampVals, &m->pool);401 mpool_free(poly->rampVals, m);
402 mpool_free(poly->firstReceived, &m->pool);402 mpool_free(poly->firstReceived, m);
403 403
404 mpool_free(poly, &m->pool);404 mpool_free(poly, m);
405}405}
406 406
407void tPoly_tickPitch(tPoly* polyh)407void tPoly_tickPitch(tPoly* polyh)
LEAF/Src/leaf-oscillators.c+88−299
@@ -6,13 +6,11 @@ · 5 unmodified lines
6 6
7#if _WIN32 || _WIN647#if _WIN32 || _WIN64
8 8
9#include "..\Inc\leaf-tables.h"
10#include "..\Inc\leaf-oscillators.h"9#include "..\Inc\leaf-oscillators.h"
11#include "..\leaf.h"10#include "..\leaf.h"
12 11
13#else12#else
14 13
15#include "../Inc/leaf-tables.h"
16#include "../Inc/leaf-oscillators.h"14#include "../Inc/leaf-oscillators.h"
17#include "../leaf.h"15#include "../leaf.h"
18 16
@@ -21,24 +19,18 @@ · 2 unmodified lines
21// Cycle19// Cycle
22void tCycle_init(tCycle* const cy)20void tCycle_init(tCycle* const cy)
23{21{
24 _tCycle* c = *cy = (_tCycle*) leaf_alloc(sizeof(_tCycle));22 tCycle_initToPool(cy, &leaf.mempool);
25
26 c->inc = 0.0f;
27 c->phase = 0.0f;
28
29}23}
30 24
31void tCycle_free(tCycle* const cy)25void tCycle_free(tCycle* const cy)
32{26{
33 _tCycle* c = *cy;27 tCycle_freeFromPool(cy, &leaf.mempool);
34
35 leaf_free(c);
36}28}
37 29
38void tCycle_initToPool (tCycle* const cy, tMempool* const mp)30void tCycle_initToPool (tCycle* const cy, tMempool* const mp)
39{31{
40 _tMempool* m = *mp;32 _tMempool* m = *mp;
41 _tCycle* c = *cy = (_tCycle*) mpool_alloc(sizeof(_tCycle), &m->pool);33 _tCycle* c = *cy = (_tCycle*) mpool_alloc(sizeof(_tCycle), m);
42 34
43 c->inc = 0.0f;35 c->inc = 0.0f;
44 c->phase = 0.0f;36 c->phase = 0.0f;
@@ -50,17 +42,18 @@ void tCycle_freeFromPool (tCycle* const cy, tMempool* const mp) · 5 unmodified lines
50 _tMempool* m = *mp;42 _tMempool* m = *mp;
51 _tCycle* c = *cy;43 _tCycle* c = *cy;
52 44
53 mpool_free(c, &m->pool);45 mpool_free(c, m);
54}46}
55 47
56int tCycle_setFreq(tCycle* const cy, float freq)48void tCycle_setFreq(tCycle* const cy, float freq)
57{49{
58 _tCycle* c = *cy;50 _tCycle* c = *cy;
59 51
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
61 c->inc = freq * leaf.invSampleRate;56 c->inc = freq * leaf.invSampleRate;
62
63 return 0;
64}57}
65 58
66//need to check bounds and wrap table properly to allow through-zero FM59//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
76 // Phasor increment69 // Phasor increment
77 c->phase += c->inc;70 c->phase += c->inc;
78 while (c->phase >= 1.0f) c->phase -= 1.0f;71 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;
80 73
81 // Wavetable synthesis74 // Wavetable synthesis
82 75
83 temp = SINE_TABLE_SIZE * c->phase;76 temp = SINE_TABLE_SIZE * c->phase;
84 intPart = (int)temp;77 intPart = (int)temp;
85 fracPart = temp - (float)intPart;78 fracPart = temp - (float)intPart;
86 samp0 = sinewave[intPart];79 samp0 = __leaf_table_sinewave[intPart];
87 if (++intPart >= SINE_TABLE_SIZE) intPart = 0;80 if (++intPart >= SINE_TABLE_SIZE) intPart = 0;
88 samp1 = sinewave[intPart];81 samp1 = __leaf_table_sinewave[intPart];
89 82
90 return (samp0 + (samp1 - samp0) * fracPart);83 return (samp0 + (samp1 - samp0) * fracPart);
91 84
@@ -102,26 +95,22 @@ void tCycleSampleRateChanged (tCycle* const cy) · 10 unmodified lines
102/* Triangle */95/* Triangle */
103void tTriangle_init(tTriangle* const cy)96void tTriangle_init(tTriangle* const cy)
104{97{
105 _tTriangle* c = *cy = (_tTriangle*) leaf_alloc(sizeof(_tTriangle));98 tTriangle_initToPool(cy, &leaf.mempool);
106
107 c->inc = 0.0f;
108 c->phase = 0.0f;
109}99}
110 100
111void tTriangle_free(tTriangle* const cy)101void tTriangle_free(tTriangle* const cy)
112{102{
113 _tTriangle* c = *cy;103 tTriangle_freeFromPool(cy, &leaf.mempool);
114
115 leaf_free(c);
116}104}
117 105
118void tTriangle_initToPool (tTriangle* const cy, tMempool* const mp)106void tTriangle_initToPool (tTriangle* const cy, tMempool* const mp)
119{107{
120 _tMempool* m = *mp;108 _tMempool* m = *mp;
121 _tTriangle* c = *cy = (_tTriangle*) mpool_alloc(sizeof(_tTriangle), &m->pool);109 _tTriangle* c = *cy = (_tTriangle*) mpool_alloc(sizeof(_tTriangle), m);
122 110
123 c->inc = 0.0f;111 c->inc = 0.0f;
124 c->phase = 0.0f;112 c->phase = 0.0f;
113 tTriangle_setFreq(cy, 220);
125}114}
126 115
127void tTriangle_freeFromPool (tTriangle* const cy, tMempool* const mp)116void tTriangle_freeFromPool (tTriangle* const cy, tMempool* const mp)
@@ -129,19 +118,25 @@ void tTriangle_freeFromPool (tTriangle* const cy, tMempool* const mp) · 1 unmodified line
129 _tMempool* m = *mp;118 _tMempool* m = *mp;
130 _tTriangle* c = *cy;119 _tTriangle* c = *cy;
131 120
132 mpool_free(c, &m->pool);121 mpool_free(c, m);
133}122}
134 123
135int tTriangle_setFreq(tTriangle* const cy, float freq)124void tTriangle_setFreq(tTriangle* const cy, float freq)
136{125{
137 _tTriangle* c = *cy;126 _tTriangle* c = *cy;
138 127
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;
140 131
141 c->freq = freq;132 c->inc = c->freq * leaf.invSampleRate;
142 c->inc = freq * leaf.invSampleRate;
143 133
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;
145}140}
146 141
147 142
@@ -152,72 +147,15 @@ float tTriangle_tick(tTriangle* const cy) · 4 unmodified lines
152 // Phasor increment147 // Phasor increment
153 c->phase += c->inc;148 c->phase += c->inc;
154 while (c->phase >= 1.0f) c->phase -= 1.0f;149 while (c->phase >= 1.0f) c->phase -= 1.0f;
150 while (c->phase < 0.0f) c->phase += 1.0f;
155 151
156 float out = 0.0f;152 float out = 0.0f;
157 float w;
158 153
159 int idx = (int)(c->phase * TRI_TABLE_SIZE);154 int idx = (int)(c->phase * TRI_TABLE_SIZE);
160 155
161 // Wavetable synthesis156 // Wavetable synthesis
162 157 out = __leaf_table_triangle[c->oct+1][idx] +
163 if (c->freq <= 20.0f)158 (__leaf_table_triangle[c->oct][idx] - __leaf_table_triangle[c->oct+1][idx]) * c->w;
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 }
221 159
222 return out;160 return out;
223}161}
@@ -233,26 +171,22 @@ void tTriangleSampleRateChanged (tTriangle* const cy) · 9 unmodified lines
233/* Square */171/* Square */
234void tSquare_init(tSquare* const cy)172void tSquare_init(tSquare* const cy)
235{173{
236 _tSquare* c = *cy = (_tSquare*) leaf_alloc(sizeof(_tSquare));174 tSquare_initToPool(cy, &leaf.mempool);
237
238 c->inc = 0.0f;
239 c->phase = 0.0f;
240}175}
241 176
242void tSquare_free(tSquare* const cy)177void tSquare_free(tSquare* const cy)
243{178{
244 _tSquare* c = *cy;179 tSquare_freeFromPool(cy, &leaf.mempool);
245
246 leaf_free(c);
247}180}
248 181
249void tSquare_initToPool (tSquare* const cy, tMempool* const mp)182void tSquare_initToPool (tSquare* const cy, tMempool* const mp)
250{183{
251 _tMempool* m = *mp;184 _tMempool* m = *mp;
252 _tSquare* c = *cy = (_tSquare*) mpool_alloc(sizeof(_tSquare), &m->pool);185 _tSquare* c = *cy = (_tSquare*) mpool_alloc(sizeof(_tSquare), m);
253 186
254 c->inc = 0.0f;187 c->inc = 0.0f;
255 c->phase = 0.0f;188 c->phase = 0.0f;
189 tSquare_setFreq(cy, 220);
256}190}
257 191
258void tSquare_freeFromPool(tSquare* const cy, tMempool* const mp)192void tSquare_freeFromPool(tSquare* const cy, tMempool* const mp)
@@ -260,19 +194,25 @@ void tSquare_freeFromPool(tSquare* const cy, tMempool* const mp) · 1 unmodified line
260 _tMempool* m = *mp;194 _tMempool* m = *mp;
261 _tSquare* c = *cy;195 _tSquare* c = *cy;
262 196
263 mpool_free(c, &m->pool);197 mpool_free(c, m);
264}198}
265 199
266int tSquare_setFreq(tSquare* const cy, float freq)200void tSquare_setFreq(tSquare* const cy, float freq)
267{201{
268 _tSquare* c = *cy;202 _tSquare* c = *cy;
269 203
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;
271 207
272 c->freq = freq;208 c->inc = c->freq * leaf.invSampleRate;
273 c->inc = freq * leaf.invSampleRate;
274 209
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;
276}216}
277 217
278float tSquare_tick(tSquare* const cy)218float tSquare_tick(tSquare* const cy)
@@ -282,71 +222,15 @@ float tSquare_tick(tSquare* const cy) · 3 unmodified lines
282 // Phasor increment222 // Phasor increment
283 c->phase += c->inc;223 c->phase += c->inc;
284 while (c->phase >= 1.0f) c->phase -= 1.0f;224 while (c->phase >= 1.0f) c->phase -= 1.0f;
225 while (c->phase < 0.0f) c->phase += 1.0f;
285 226
286 float out = 0.0f;227 float out = 0.0f;
287 float w = 0.0f;
288 int idx = (int)(c->phase * TRI_TABLE_SIZE);
289 228
290 // Wavetable synthesis229 int idx = (int)(c->phase * SQR_TABLE_SIZE);
291 230
292 if (c->freq <= 20.0f)231 // Wavetable synthesis
293 {232 out = __leaf_table_squarewave[c->oct+1][idx] +
294 out = squarewave[T20][idx];233 (__leaf_table_squarewave[c->oct][idx] - __leaf_table_squarewave[c->oct+1][idx]) * c->w;
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 }
350 234
351 return out;235 return out;
352}236}
@@ -362,26 +246,22 @@ void tSquareSampleRateChanged (tSquare* const cy) · 9 unmodified lines
362// Sawtooth246// Sawtooth
363void tSawtooth_init(tSawtooth* const cy)247void tSawtooth_init(tSawtooth* const cy)
364{248{
365 _tSawtooth* c = *cy = (_tSawtooth*) leaf_alloc(sizeof(_tSawtooth));249 tSawtooth_initToPool(cy, &leaf.mempool);
366
367 c->inc = 0.0f;
368 c->phase = 0.0f;
369}250}
370 251
371void tSawtooth_free(tSawtooth* const cy)252void tSawtooth_free(tSawtooth* const cy)
372{253{
373 _tSawtooth* c = *cy;254 tSawtooth_freeFromPool(cy, &leaf.mempool);
374
375 leaf_free(c);
376}255}
377 256
378void tSawtooth_initToPool (tSawtooth* const cy, tMempool* const mp)257void tSawtooth_initToPool (tSawtooth* const cy, tMempool* const mp)
379{258{
380 _tMempool* m = *mp;259 _tMempool* m = *mp;
381 _tSawtooth* c = *cy = (_tSawtooth*) mpool_alloc(sizeof(_tSawtooth), &m->pool);260 _tSawtooth* c = *cy = (_tSawtooth*) mpool_alloc(sizeof(_tSawtooth), m);
382 261
383 c->inc = 0.0f;262 c->inc = 0.0f;
384 c->phase = 0.0f;263 c->phase = 0.0f;
264 tSawtooth_setFreq(cy, 220);
385}265}
386 266
387void tSawtooth_freeFromPool (tSawtooth* const cy, tMempool* const mp)267void tSawtooth_freeFromPool (tSawtooth* const cy, tMempool* const mp)
@@ -389,19 +269,25 @@ void tSawtooth_freeFromPool (tSawtooth* const cy, tMempool* const mp) · 1 unmodified line
389 _tMempool* m = *mp;269 _tMempool* m = *mp;
390 _tSawtooth* c = *cy;270 _tSawtooth* c = *cy;
391 271
392 mpool_free(c, &m->pool);272 mpool_free(c, m);
393}273}
394 274
395int tSawtooth_setFreq(tSawtooth* const cy, float freq)275void tSawtooth_setFreq(tSawtooth* const cy, float freq)
396{276{
397 _tSawtooth* c = *cy;277 _tSawtooth* c = *cy;
398 278
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;
400 282
401 c->freq = freq;283 c->inc = c->freq * leaf.invSampleRate;
402 c->inc = freq * leaf.invSampleRate;
403 284
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;
405}291}
406 292
407float tSawtooth_tick(tSawtooth* const cy)293float tSawtooth_tick(tSawtooth* const cy)
@@ -411,72 +297,15 @@ float tSawtooth_tick(tSawtooth* const cy) · 3 unmodified lines
411 // Phasor increment297 // Phasor increment
412 c->phase += c->inc;298 c->phase += c->inc;
413 while (c->phase >= 1.0f) c->phase -= 1.0f;299 while (c->phase >= 1.0f) c->phase -= 1.0f;
300 while (c->phase < 0.0f) c->phase += 1.0f;
414 301
415 float out = 0.0f;302 float out = 0.0f;
416 float w;
417 303
418 int idx = (int)(c->phase * TRI_TABLE_SIZE);304 int idx = (int)(c->phase * SAW_TABLE_SIZE);
419 305
420 // Wavetable synthesis306 // Wavetable synthesis
421 307 out = __leaf_table_sawtooth[c->oct+1][idx] +
422 if (c->freq <= 20.0f)308 (__leaf_table_sawtooth[c->oct][idx] - __leaf_table_sawtooth[c->oct+1][idx]) * c->w;
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 }
480 309
481 return out;310 return out;
482}311}
@@ -499,23 +328,18 @@ void tPhasorSampleRateChanged (tPhasor* const ph) · 16 unmodified lines
499 328
500void tPhasor_init(tPhasor* const ph)329void tPhasor_init(tPhasor* const ph)
501{330{
502 _tPhasor* p = *ph = (_tPhasor*) leaf_alloc(sizeof(_tPhasor));331 tPhasor_initToPool(ph, &leaf.mempool);
503
504 p->phase = 0.0f;
505 p->inc = 0.0f;
506}332}
507 333
508void tPhasor_free(tPhasor* const ph)334void tPhasor_free(tPhasor* const ph)
509{335{
510 _tPhasor* p = *ph;336 tPhasor_freeFromPool(ph, &leaf.mempool);
511
512 leaf_free(p);
513}337}
514 338
515void tPhasor_initToPool (tPhasor* const ph, tMempool* const mp)339void tPhasor_initToPool (tPhasor* const ph, tMempool* const mp)
516{340{
517 _tMempool* m = *mp;341 _tMempool* m = *mp;
518 _tPhasor* p = *ph = (_tPhasor*) mpool_alloc(sizeof(_tPhasor), &m->pool);342 _tPhasor* p = *ph = (_tPhasor*) mpool_alloc(sizeof(_tPhasor), m);
519 343
520 p->phase = 0.0f;344 p->phase = 0.0f;
521 p->inc = 0.0f;345 p->inc = 0.0f;
@@ -526,19 +350,18 @@ void tPhasor_freeFromPool(tPhasor* const ph, tMempool* const mp) · 4 unmodified lines
526 _tMempool* m = *mp;350 _tMempool* m = *mp;
527 _tPhasor* p = *ph;351 _tPhasor* p = *ph;
528 352
529 mpool_free(p, &m->pool);353 mpool_free(p, m);
530}354}
531 355
532int tPhasor_setFreq(tPhasor* const ph, float freq)356void tPhasor_setFreq(tPhasor* const ph, float freq)
533{357{
534 _tPhasor* p = *ph;358 _tPhasor* p = *ph;
535 359
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;
537 363
538 p->freq = freq;
539 p->inc = freq * leaf.invSampleRate;364 p->inc = freq * leaf.invSampleRate;
540
541 return 0;
542}365}
543 366
544float tPhasor_tick(tPhasor* const ph)367float tPhasor_tick(tPhasor* const ph)
@@ -555,23 +378,18 @@ float tPhasor_tick(tPhasor* const ph) · 10 unmodified lines
555/* Noise */378/* Noise */
556void tNoise_init(tNoise* const ns, NoiseType type)379void tNoise_init(tNoise* const ns, NoiseType type)
557{380{
558 _tNoise* n = *ns = (_tNoise*) leaf_alloc(sizeof(_tNoise));381 tNoise_initToPool(ns, type, &leaf.mempool);
559
560 n->type = type;
561 n->rand = leaf.random;
562}382}
563 383
564void tNoise_free(tNoise* const ns)384void tNoise_free(tNoise* const ns)
565{385{
566 _tNoise* n = *ns;386 tNoise_freeFromPool(ns, &leaf.mempool);
567
568 leaf_free(n);
569}387}
570 388
571void tNoise_initToPool (tNoise* const ns, NoiseType type, tMempool* const mp)389void tNoise_initToPool (tNoise* const ns, NoiseType type, tMempool* const mp)
572{390{
573 _tMempool* m = *mp;391 _tMempool* m = *mp;
574 _tNoise* n = *ns = (_tNoise*) mpool_alloc(sizeof(_tNoise), &m->pool);392 _tNoise* n = *ns = (_tNoise*) mpool_alloc(sizeof(_tNoise), m);
575 393
576 n->type = type;394 n->type = type;
577 n->rand = leaf.random;395 n->rand = leaf.random;
@@ -582,7 +400,7 @@ void tNoise_freeFromPool (tNoise* const ns, tMempool* const mp) · 4 unmodified lines
582 _tMempool* m = *mp;400 _tMempool* m = *mp;
583 _tNoise* n = *ns;401 _tNoise* n = *ns;
584 402
585 mpool_free(n, &m->pool);403 mpool_free(n, m);
586}404}
587 405
588float tNoise_tick(tNoise* const ns)406float tNoise_tick(tNoise* const ns)
@@ -616,47 +434,18 @@ void tNeuronSampleRateChanged(tNeuron* nr) · 27 unmodified lines
616 434
617void tNeuron_init(tNeuron* const nr)435void tNeuron_init(tNeuron* const nr)
618{436{
619 _tNeuron* n = *nr = (_tNeuron*) leaf_alloc(sizeof(_tNeuron));437 tNeuron_initToPool(nr, &leaf.mempool);
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;
646}438}
647 439
648void tNeuron_free(tNeuron* const nr)440void tNeuron_free(tNeuron* const nr)
649{441{
650 _tNeuron* n = *nr;442 tNeuron_freeFromPool(nr, &leaf.mempool);
651
652 tPoleZero_free(&n->f);
653 leaf_free(n);
654}443}
655 444
656void tNeuron_initToPool (tNeuron* const nr, tMempool* const mp)445void tNeuron_initToPool (tNeuron* const nr, tMempool* const mp)
657{446{
658 _tMempool* m = *mp;447 _tMempool* m = *mp;
659 _tNeuron* n = *nr = (_tNeuron*) mpool_alloc(sizeof(_tNeuron), &m->pool);448 _tNeuron* n = *nr = (_tNeuron*) mpool_alloc(sizeof(_tNeuron), m);
660 449
661 tPoleZero_initToPool(&n->f, mp);450 tPoleZero_initToPool(&n->f, mp);
662 451
@@ -691,7 +480,7 @@ void tNeuron_freeFromPool(tNeuron* const nr, tMempool* const mp) · 28 unmodified lines
691 _tNeuron* n = *nr;480 _tNeuron* n = *nr;
692 481
693 tPoleZero_free(&n->f);482 tPoleZero_free(&n->f);
694 mpool_free(n, &m->pool);483 mpool_free(n, m);
695}484}
696 485
697void tNeuron_reset(tNeuron* const nr)486void tNeuron_reset(tNeuron* const nr)
LEAF/Src/leaf-physical.c+18−18
@@ -19,18 +19,18 @@ · 18 unmodified lines
19/* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ tPluck ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */19/* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ tPluck ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */
20void tPluck_init (tPluck* const pl, float lowestFrequency)20void tPluck_init (tPluck* const pl, float lowestFrequency)
21{21{
22 tPluck_initToPool(pl, lowestFrequency, &leaf_mempool);22 tPluck_initToPool(pl, lowestFrequency, &leaf.mempool);
23}23}
24 24
25void tPluck_free (tPluck* const pl)25void tPluck_free (tPluck* const pl)
26{26{
27 tPluck_freeFromPool(pl, &leaf_mempool);27 tPluck_freeFromPool(pl, &leaf.mempool);
28}28}
29 29
30void tPluck_initToPool (tPluck* const pl, float lowestFrequency, tMempool* const mp)30void tPluck_initToPool (tPluck* const pl, float lowestFrequency, tMempool* const mp)
31{31{
32 _tMempool* m = *mp;32 _tMempool* m = *mp;
33 _tPluck* p = *pl = (_tPluck*) mpool_alloc(sizeof(_tPluck), &m->pool);33 _tPluck* p = *pl = (_tPluck*) mpool_alloc(sizeof(_tPluck), m);
34 34
35 if ( lowestFrequency <= 0.0f ) lowestFrequency = 10.0f;35 if ( lowestFrequency <= 0.0f ) lowestFrequency = 10.0f;
36 36
@@ -56,7 +56,7 @@ void tPluck_freeFromPool (tPluck* const pl, tMempool* const mp) · 19 unmodified lines
56 tOneZero_freeFromPool(&p->loopFilter, mp);56 tOneZero_freeFromPool(&p->loopFilter, mp);
57 tAllpassDelay_freeFromPool(&p->delayLine, mp);57 tAllpassDelay_freeFromPool(&p->delayLine, mp);
58 58
59 mpool_free(p, &m->pool);59 mpool_free(p, m);
60}60}
61 61
62float tPluck_getLastOut (tPluck* const pl)62float tPluck_getLastOut (tPluck* const pl)
@@ -139,18 +139,18 @@ void tPluckSampleRateChanged(tPluck* const pl) · 76 unmodified lines
139/* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ tKarplusStrong ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */139/* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ tKarplusStrong ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */
140void tKarplusStrong_init (tKarplusStrong* const pl, float lowestFrequency)140void tKarplusStrong_init (tKarplusStrong* const pl, float lowestFrequency)
141{141{
142 tKarplusStrong_initToPool(pl, lowestFrequency, &leaf_mempool);142 tKarplusStrong_initToPool(pl, lowestFrequency, &leaf.mempool);
143}143}
144 144
145void tKarplusStrong_free (tKarplusStrong* const pl)145void tKarplusStrong_free (tKarplusStrong* const pl)
146{146{
147 tKarplusStrong_freeFromPool(pl, &leaf_mempool);147 tKarplusStrong_freeFromPool(pl, &leaf.mempool);
148}148}
149 149
150void tKarplusStrong_initToPool (tKarplusStrong* const pl, float lowestFrequency, tMempool* const mp)150void tKarplusStrong_initToPool (tKarplusStrong* const pl, float lowestFrequency, tMempool* const mp)
151{151{
152 _tMempool* m = *mp;152 _tMempool* m = *mp;
153 _tKarplusStrong* p = *pl = (_tKarplusStrong*) mpool_alloc(sizeof(_tKarplusStrong), &m->pool);153 _tKarplusStrong* p = *pl = (_tKarplusStrong*) mpool_alloc(sizeof(_tKarplusStrong), m);
154 154
155 if ( lowestFrequency <= 0.0f ) lowestFrequency = 8.0f;155 if ( lowestFrequency <= 0.0f ) lowestFrequency = 8.0f;
156 156
@@ -194,7 +194,7 @@ void tKarplusStrong_freeFromPool (tKarplusStrong* const pl, tMempool* const m · 37 unmodified lines
194 tBiQuad_freeFromPool(&p->biquad[i], mp);194 tBiQuad_freeFromPool(&p->biquad[i], mp);
195 }195 }
196 196
197 mpool_free(p, &m->pool);197 mpool_free(p, m);
198}198}
199 199
200float tKarplusStrong_getLastOut (tKarplusStrong* const pl)200float tKarplusStrong_getLastOut (tKarplusStrong* const pl)
@@ -358,12 +358,12 @@ void tSimpleLivingString_init(tSimpleLivingString* const pl, float freq, floa · 157 unmodified lines
358 float decay, float targetLev, float levSmoothFactor,358 float decay, float targetLev, float levSmoothFactor,
359 float levStrength, int levMode)359 float levStrength, int levMode)
360{360{
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);
362}362}
363 363
364void tSimpleLivingString_free(tSimpleLivingString* const pl)364void tSimpleLivingString_free(tSimpleLivingString* const pl)
365{365{
366 tSimpleLivingString_freeFromPool(pl, &leaf_mempool);366 tSimpleLivingString_freeFromPool(pl, &leaf.mempool);
367}367}
368 368
369void tSimpleLivingString_initToPool (tSimpleLivingString* const pl, float freq, float dampFreq,369void tSimpleLivingString_initToPool (tSimpleLivingString* const pl, float freq, float dampFreq,
@@ -371,7 +371,7 @@ void tSimpleLivingString_initToPool (tSimpleLivingString* const pl, float fr · 1 unmodified line
371 float levStrength, int levMode, tMempool* const mp)371 float levStrength, int levMode, tMempool* const mp)
372{372{
373 _tMempool* m = *mp;373 _tMempool* m = *mp;
374 _tSimpleLivingString* p = *pl = (_tSimpleLivingString*) mpool_alloc(sizeof(_tSimpleLivingString), &m->pool);374 _tSimpleLivingString* p = *pl = (_tSimpleLivingString*) mpool_alloc(sizeof(_tSimpleLivingString), m);
375 375
376 p->curr=0.0f;376 p->curr=0.0f;
377 tExpSmooth_initToPool(&p->wlSmooth, leaf.sampleRate/freq, 0.01, mp); // smoother for string wavelength (not freq, to avoid expensive divisions)377 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
396 tHighpass_freeFromPool(&p->DCblocker, mp);396 tHighpass_freeFromPool(&p->DCblocker, mp);
397 tFeedbackLeveler_freeFromPool(&p->fbLev, mp);397 tFeedbackLeveler_freeFromPool(&p->fbLev, mp);
398 398
399 mpool_free(p, &m->pool);399 mpool_free(p, m);
400}400}
401 401
402void tSimpleLivingString_setFreq(tSimpleLivingString* const pl, float freq)402void 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
480 float dampFreq, float decay, float targetLev, float levSmoothFactor,480 float dampFreq, float decay, float targetLev, float levSmoothFactor,
481 float levStrength, int levMode)481 float levStrength, int levMode)
482{482{
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);
484}484}
485 485
486void tLivingString_free(tLivingString* const pl)486void tLivingString_free(tLivingString* const pl)
487{487{
488 tLivingString_freeFromPool(pl, &leaf_mempool);488 tLivingString_freeFromPool(pl, &leaf.mempool);
489}489}
490 490
491void tLivingString_initToPool (tLivingString* const pl, float freq, float pickPos, float prepIndex,491void 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
493 float levStrength, int levMode, tMempool* const mp)493 float levStrength, int levMode, tMempool* const mp)
494{494{
495 _tMempool* m = *mp;495 _tMempool* m = *mp;
496 _tLivingString* p = *pl = (_tLivingString*) mpool_alloc(sizeof(_tLivingString), &m->pool);496 _tLivingString* p = *pl = (_tLivingString*) mpool_alloc(sizeof(_tLivingString), m);
497 497
498 p->curr=0.0f;498 p->curr=0.0f;
499 tExpSmooth_initToPool(&p->wlSmooth, leaf.sampleRate/freq, 0.01, mp); // smoother for string wavelength (not freq, to avoid expensive divisions)499 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
544 tFeedbackLeveler_freeFromPool(&p->fbLevU, mp);544 tFeedbackLeveler_freeFromPool(&p->fbLevU, mp);
545 tFeedbackLeveler_freeFromPool(&p->fbLevL, mp);545 tFeedbackLeveler_freeFromPool(&p->fbLevL, mp);
546 546
547 mpool_free(p, &m->pool);547 mpool_free(p, m);
548}548}
549 549
550void tLivingString_setFreq(tLivingString* const pl, float freq)550void tLivingString_setFreq(tLivingString* const pl, float freq)
@@ -689,7 +689,7 @@ void tReedTable_free (tReedTable* const pm) · 138 unmodified lines
689void tReedTable_initToPool (tReedTable* const pm, float offset, float slope, tMempool* const mp)689void tReedTable_initToPool (tReedTable* const pm, float offset, float slope, tMempool* const mp)
690{690{
691 _tMempool* m = *mp;691 _tMempool* m = *mp;
692 _tReedTable* p = *pm = (_tReedTable*) mpool_alloc(sizeof(_tReedTable), &m->pool);692 _tReedTable* p = *pm = (_tReedTable*) mpool_alloc(sizeof(_tReedTable), m);
693 693
694 p->offset = offset;694 p->offset = offset;
695 p->slope = slope;695 p->slope = slope;
@@ -700,7 +700,7 @@ void tReedTable_freeFromPool (tReedTable* const pm, tMempool* const mp) · 4 unmodified lines
700 _tMempool* m = *mp;700 _tMempool* m = *mp;
701 _tReedTable* p = *pm;701 _tReedTable* p = *pm;
702 702
703 mpool_free(p, &m->pool);703 mpool_free(p, m);
704}704}
705 705
706float tReedTable_tick (tReedTable* const pm, float input)706float 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
68void tPRCReverb_initToPool (tPRCReverb* const rev, float t60, tMempool* const mp)68void tPRCReverb_initToPool (tPRCReverb* const rev, float t60, tMempool* const mp)
69{69{
70 _tMempool* m = *mp;70 _tMempool* m = *mp;
71 _tPRCReverb* r = *rev = (_tPRCReverb*) mpool_alloc(sizeof(_tPRCReverb), &m->pool);71 _tPRCReverb* r = *rev = (_tPRCReverb*) mpool_alloc(sizeof(_tPRCReverb), m);
72 72
73 if (t60 <= 0.0f) t60 = 0.001f;73 if (t60 <= 0.0f) t60 = 0.001f;
74 74
@@ -110,7 +110,7 @@ void tPRCReverb_freeFromPool (tPRCReverb* const rev, tMempool* const mp) · 35 unmodified lines
110 tDelay_freeFromPool(&r->allpassDelays[0], mp);110 tDelay_freeFromPool(&r->allpassDelays[0], mp);
111 tDelay_freeFromPool(&r->allpassDelays[1], mp);111 tDelay_freeFromPool(&r->allpassDelays[1], mp);
112 tDelay_freeFromPool(&r->combDelay, mp);112 tDelay_freeFromPool(&r->combDelay, mp);
113 mpool_free(r, &m->pool);113 mpool_free(r, m);
114}114}
115 115
116void tPRCRevert_clear(tPRCReverb* const rev)116void tPRCRevert_clear(tPRCReverb* const rev)
@@ -243,7 +243,7 @@ void tNReverb_free(tNReverb* const rev) · 126 unmodified lines
243void tNReverb_initToPool (tNReverb* const rev, float t60, tMempool* const mp)243void tNReverb_initToPool (tNReverb* const rev, float t60, tMempool* const mp)
244{244{
245 _tMempool* m = *mp;245 _tMempool* m = *mp;
246 _tNReverb* r = *rev = (_tNReverb*) mpool_alloc(sizeof(_tNReverb), &m->pool);246 _tNReverb* r = *rev = (_tNReverb*) mpool_alloc(sizeof(_tNReverb), m);
247 247
248 if (t60 <= 0.0f) t60 = 0.001f;248 if (t60 <= 0.0f) t60 = 0.001f;
249 249
@@ -296,7 +296,7 @@ void tNReverb_freeFromPool (tNReverb* const rev, tMempool* const mp) · 46 unmodified lines
296 tLinearDelay_freeFromPool(&r->allpassDelays[i], mp);296 tLinearDelay_freeFromPool(&r->allpassDelays[i], mp);
297 }297 }
298 298
299 mpool_free(r, &m->pool);299 mpool_free(r, m);
300}300}
301 301
302void tNReverb_setT60(tNReverb* const rev, float t60)302void 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
457 457
458void tDattorroReverb_init (tDattorroReverb* const rev)458void tDattorroReverb_init (tDattorroReverb* const rev)
459{459{
460 tDattorroReverb_initToPool(rev, &leaf_mempool);460 tDattorroReverb_initToPool(rev, &leaf.mempool);
461}461}
462 462
463void tDattorroReverb_free (tDattorroReverb* const rev)463void tDattorroReverb_free (tDattorroReverb* const rev)
464{464{
465 tDattorroReverb_freeFromPool(rev, &leaf_mempool);465 tDattorroReverb_freeFromPool(rev, &leaf.mempool);
466}466}
467 467
468void tDattorroReverb_initToPool (tDattorroReverb* const rev, tMempool* const mp)468void tDattorroReverb_initToPool (tDattorroReverb* const rev, tMempool* const mp)
469{469{
470 _tMempool* m = *mp;470 _tMempool* m = *mp;
471 _tDattorroReverb* r = *rev = (_tDattorroReverb*) mpool_alloc(sizeof(_tDattorroReverb), &m->pool);471 _tDattorroReverb* r = *rev = (_tDattorroReverb*) mpool_alloc(sizeof(_tDattorroReverb), m);
472 472
473 r->size_max = 2.0f;473 r->size_max = 2.0f;
474 r->size = 1.f;474 r->size = 1.f;
@@ -567,7 +567,7 @@ void tDattorroReverb_freeFromPool (tDattorroReverb* const rev, tMempool* · 92 unmodified lines
567 567
568 tCycle_freeFromPool(&r->f2_lfo, mp);568 tCycle_freeFromPool(&r->f2_lfo, mp);
569 569
570 mpool_free(r, &m->pool);570 mpool_free(r, m);
571}571}
572 572
573void tDattorroReverb_clear (tDattorroReverb* const rev)573void tDattorroReverb_clear (tDattorroReverb* const rev)
LEAF/Src/leaf-sampling.c+14−14
@@ -26,20 +26,20 @@ · 25 unmodified lines
26 26
27void tBuffer_init (tBuffer* const sb, uint32_t length)27void tBuffer_init (tBuffer* const sb, uint32_t length)
28{28{
29 tBuffer_initToPool(sb, length, &leaf_mempool);29 tBuffer_initToPool(sb, length, &leaf.mempool);
30}30}
31 31
32void tBuffer_free (tBuffer* const sb)32void tBuffer_free (tBuffer* const sb)
33{33{
34 tBuffer_freeFromPool(sb, &leaf_mempool);34 tBuffer_freeFromPool(sb, &leaf.mempool);
35}35}
36 36
37void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp)37void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp)
38{38{
39 _tMempool* m = *mp;39 _tMempool* m = *mp;
40 _tBuffer* s = *sb = (_tBuffer*) mpool_alloc(sizeof(_tBuffer), &m->pool);40 _tBuffer* s = *sb = (_tBuffer*) mpool_alloc(sizeof(_tBuffer), m);
41 41
42 s->buff = (float*) mpool_alloc( sizeof(float) * length, &m->pool);42 s->buff = (float*) mpool_alloc( sizeof(float) * length, m);
43 43
44 s->bufferLength = length;44 s->bufferLength = length;
45 s->recordedLength = 0;45 s->recordedLength = 0;
@@ -53,8 +53,8 @@ void tBuffer_freeFromPool (tBuffer* const sb, tMempool* const mp) · 7 unmodified lines
53 _tMempool* m = *mp;53 _tMempool* m = *mp;
54 _tBuffer* s = *sb;54 _tBuffer* s = *sb;
55 55
56 mpool_free(s->buff, &m->pool);56 mpool_free(s->buff, m);
57 mpool_free(s, &m->pool);57 mpool_free(s, m);
58}58}
59 59
60void tBuffer_tick (tBuffer* const sb, float sample)60void tBuffer_tick (tBuffer* const sb, float sample)
@@ -154,18 +154,18 @@ static void attemptStartEndChange(tSampler* const sp); · 93 unmodified lines
154 154
155void tSampler_init(tSampler* const sp, tBuffer* const b)155void tSampler_init(tSampler* const sp, tBuffer* const b)
156{156{
157 tSampler_initToPool(sp, b, &leaf_mempool);157 tSampler_initToPool(sp, b, &leaf.mempool);
158}158}
159 159
160void tSampler_free (tSampler* const sp)160void tSampler_free (tSampler* const sp)
161{161{
162 tSampler_freeFromPool(sp, &leaf_mempool);162 tSampler_freeFromPool(sp, &leaf.mempool);
163}163}
164 164
165void tSampler_initToPool(tSampler* const sp, tBuffer* const b, tMempool* const mp)165void tSampler_initToPool(tSampler* const sp, tBuffer* const b, tMempool* const mp)
166{166{
167 _tMempool* m = *mp;167 _tMempool* m = *mp;
168 _tSampler* p = *sp = (_tSampler*) mpool_alloc(sizeof(_tSampler), &m->pool);168 _tSampler* p = *sp = (_tSampler*) mpool_alloc(sizeof(_tSampler), m);
169 _tBuffer* s = *b;169 _tBuffer* s = *b;
170 170
171 p->samp = s;171 p->samp = s;
@@ -202,7 +202,7 @@ void tSampler_freeFromPool (tSampler* const sp, tMempool* const mp) · 30 unmodified lines
202 _tSampler* p = *sp;202 _tSampler* p = *sp;
203 tRamp_freeFromPool(&p->gain, mp);203 tRamp_freeFromPool(&p->gain, mp);
204 204
205 mpool_free(p, &m->pool);205 mpool_free(p, m);
206}206}
207 207
208void tSampler_setSample (tSampler* const sp, tBuffer* const b)208void tSampler_setSample (tSampler* const sp, tBuffer* const b)
@@ -709,18 +709,18 @@ void tSampler_setRate (tSampler* const sp, float rate) · 500 unmodified lines
709 709
710void tAutoSampler_init (tAutoSampler* const as, tBuffer* const b)710void tAutoSampler_init (tAutoSampler* const as, tBuffer* const b)
711{711{
712 tAutoSampler_initToPool(as, b, &leaf_mempool);712 tAutoSampler_initToPool(as, b, &leaf.mempool);
713}713}
714 714
715void tAutoSampler_free (tAutoSampler* const as)715void tAutoSampler_free (tAutoSampler* const as)
716{716{
717 tAutoSampler_freeFromPool(as, &leaf_mempool);717 tAutoSampler_freeFromPool(as, &leaf.mempool);
718}718}
719 719
720void tAutoSampler_initToPool (tAutoSampler* const as, tBuffer* const b, tMempool* const mp)720void tAutoSampler_initToPool (tAutoSampler* const as, tBuffer* const b, tMempool* const mp)
721{721{
722 _tMempool* m = *mp;722 _tMempool* m = *mp;
723 _tAutoSampler* a = *as = (_tAutoSampler*) mpool_alloc(sizeof(_tAutoSampler), &m->pool);723 _tAutoSampler* a = *as = (_tAutoSampler*) mpool_alloc(sizeof(_tAutoSampler), m);
724 724
725 tBuffer_setRecordMode(b, RecordOneShot);725 tBuffer_setRecordMode(b, RecordOneShot);
726 tSampler_initToPool(&a->sampler, b, mp);726 tSampler_initToPool(&a->sampler, b, mp);
@@ -736,7 +736,7 @@ void tAutoSampler_freeFromPool (tAutoSampler* const as, tMempool* const · 9 unmodified lines
736 tEnvelopeFollower_freeFromPool(&a->ef, mp);736 tEnvelopeFollower_freeFromPool(&a->ef, mp);
737 tSampler_freeFromPool(&a->sampler, mp);737 tSampler_freeFromPool(&a->sampler, mp);
738 738
739 mpool_free(a, &m->pool);739 mpool_free(a, m);
740}740}
741 741
742float tAutoSampler_tick (tAutoSampler* const as, float input)742float tAutoSampler_tick (tAutoSampler* const as, float input)
LEAF/Src/leaf-tables.c+22−22
@@ -14,41 +14,41 @@ · 13 unmodified lines
14 14
15#include "stdlib.h"15#include "stdlib.h"
16 16
17const 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.00106704811502762217const 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
18 18
19};19};
20const 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.000695236984854360720const 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
21};21};
22const 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.000675494916079015722const 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
23};23};
24const 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.004612634942995027624const 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
25};25};
26 26
27const 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.00313581503567554827const 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
28};28};
29const 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.00757301240634527729const 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
30};30};
31 31
32const 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-732const 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
33};33};
34const 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.00000500531669425447534const 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
35};35};
36const 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.0000315178363457769736const 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
37};37};
38const 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.0000401737434438435338const 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
39};39};
40 40
41const 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.0000169572688338815841const 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
42};42};
43const 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.00002291328946713839643const 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
44};44};
45 45
46const float* firCoeffs[COEFFS_SIZE] = { fir2XLow, fir4XLow, fir8XLow, fir16XLow, fir32XLow, fir64XLow, fir2XHigh, fir4XHigh, fir8XHigh, fir16XHigh, fir32XHigh, fir64XHigh46const 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
47};47};
48 48
49const float firNumTaps[COEFFS_SIZE] = { 32, 32, 64, 128, 256, 256, 128, 256, 256, 512, 512, 1024 };49const float __leaf_tablesize_firNumTaps[COEFFS_SIZE] = { 32, 32, 64, 128, 256, 256, 128, 256, 256, 512, 512, 1024 };
50 50
51const 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,51const 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,
520.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,520.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,
530.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,530.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,
540.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,540.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
3326-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,3326-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,
3327-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, };3327-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, };
3328 3328
3329const float sawtooth[11][SAW_TABLE_SIZE] =3329const float __leaf_table_sawtooth[11][SAW_TABLE_SIZE] =
3330{3330{
3331 3331
3332 {3332 {
@@ -3376,7 +3376,7 @@ const float sawtooth[11][SAW_TABLE_SIZE] = · 43 unmodified lines
3376};3376};
3377 3377
3378 3378
3379const float triangle[11][TRI_TABLE_SIZE] =3379const float __leaf_table_triangle[11][TRI_TABLE_SIZE] =
3380{3380{
3381 3381
3382 {3382 {
@@ -3424,7 +3424,7 @@ const float triangle[11][TRI_TABLE_SIZE] = · 41 unmodified lines
3424 }3424 }
3425};3425};
3426 3426
3427const float squarewave[11][SQR_TABLE_SIZE] =3427const float __leaf_table_squarewave[11][SQR_TABLE_SIZE] =
3428{3428{
3429 3429
3430 {3430 {
@@ -3473,7 +3473,7 @@ const float squarewave[11][SQR_TABLE_SIZE] = · 42 unmodified lines
3473 3473
3474};3474};
3475 3475
3476const float exp_decay[EXP_DECAY_TABLE_SIZE] = { 3476const float __leaf_table_exp_decay[EXP_DECAY_TABLE_SIZE] = {
3477 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,3477 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,
34780.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,34780.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,
34790.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,34790.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
67530.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, 67530.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,
6754};6754};
6755 6755
6756const float attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE] = {6756const float __leaf_table_attack_decay_inc[ATTACK_DECAY_INC_TABLE_SIZE] = {
6757 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,6757 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,
6758546.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,6758546.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,
6759273.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,6759273.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
100330.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, 100330.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,
10034};10034};
10035 10035
10036const float filtertan[FILTERTAN_TABLE_SIZE] = { 10036const float __leaf_table_filtertan[FILTERTAN_TABLE_SIZE] = {
10037 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,10037 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,
100380.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,100380.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,
100390.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,100390.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
13936 13936
13937#endif13937#endif
13938 13938
13939const 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,13939const 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,
139400.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,139400.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,
139410.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,139410.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,
139420.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,139420.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