Expose all 8 voices
[zyn.git] / zynadd_dynparam_forest_map_top.c
blob3ece974e706456d08d354511dce4805eae8a5637
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * Copyright (C) 2006,2007,2008,2009 Nedko Arnaudov <nedko@arnaudov.name>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *****************************************************************************/
21 #include <stdbool.h>
22 #include <assert.h>
23 #include <lv2.h>
25 #include "common.h"
26 #include "list.h"
27 #include "addsynth.h"
28 #include "lv2dynparam/lv2dynparam.h"
29 #include "lv2dynparam/plugin.h"
30 #include "zynadd_internal.h"
32 #define LOG_LEVEL LOG_LEVEL_ERROR
33 #include "log.h"
35 #define LV2DYNPARAM_PARAMETER_STEREO 0
36 #define LV2DYNPARAM_PARAMETER_RANDOM_GROUPING 1
37 #define LV2DYNPARAM_PARAMETER_VOLUME 2
38 #define LV2DYNPARAM_PARAMETER_VELOCITY_SENSING 3
39 #define LV2DYNPARAM_PARAMETER_RANDOM_PANORAMA 4
40 #define LV2DYNPARAM_PARAMETER_PANORAMA 5
41 #define LV2DYNPARAM_PARAMETER_PUNCH_STRENGTH 6
42 #define LV2DYNPARAM_PARAMETER_PUNCH_TIME 7
43 #define LV2DYNPARAM_PARAMETER_PUNCH_STRETCH 8
44 #define LV2DYNPARAM_PARAMETER_PUNCH_VELOCITY_SENSING 9
46 #define LV2DYNPARAM_PARAMETER_AMP_ENV_ATTACK 10
47 #define LV2DYNPARAM_PARAMETER_AMP_ENV_DECAY 11
48 #define LV2DYNPARAM_PARAMETER_AMP_ENV_SUSTAIN 12
49 #define LV2DYNPARAM_PARAMETER_AMP_ENV_RELEASE 13
50 #define LV2DYNPARAM_PARAMETER_AMP_ENV_STRETCH 14
51 #define LV2DYNPARAM_PARAMETER_AMP_ENV_FORCED_RELEASE 15
52 #define LV2DYNPARAM_PARAMETER_AMP_ENV_LINEAR 16
54 #define LV2DYNPARAM_PARAMETER_AMP_LFO_SHAPE 17
55 #define LV2DYNPARAM_PARAMETER_AMP_LFO_FREQUENCY 18
56 #define LV2DYNPARAM_PARAMETER_AMP_LFO_DEPTH 19
57 #define LV2DYNPARAM_PARAMETER_AMP_LFO_RANDOM_START_PHASE 20
58 #define LV2DYNPARAM_PARAMETER_AMP_LFO_START_PHASE 21
59 #define LV2DYNPARAM_PARAMETER_AMP_LFO_DELAY 22
60 #define LV2DYNPARAM_PARAMETER_AMP_LFO_STRETCH 23
61 #define LV2DYNPARAM_PARAMETER_AMP_LFO_RANDOM_DEPTH 24
62 #define LV2DYNPARAM_PARAMETER_AMP_LFO_DEPTH_RANDOMNESS 25
63 #define LV2DYNPARAM_PARAMETER_AMP_LFO_RANDOM_FREQUENCY 26
64 #define LV2DYNPARAM_PARAMETER_AMP_LFO_FREQUENCY_RANDOMNESS 27
66 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_ATTACK_VALUE 28
67 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_ATTACK_DURATION 29
68 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_DECAY_VALUE 30
69 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_DECAY_DURATION 31
70 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_RELEASE_VALUE 32
71 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_RELEASE_DURATION 33
72 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_STRETCH 34
73 #define LV2DYNPARAM_PARAMETER_FILTER_ENV_FORCED_RELEASE 35
75 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_SHAPE 36
76 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_FREQUENCY 37
77 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_DEPTH 38
78 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_RANDOM_START_PHASE 39
79 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_START_PHASE 40
80 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_DELAY 41
81 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_STRETCH 42
82 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_RANDOM_DEPTH 43
83 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_DEPTH_RANDOMNESS 44
84 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_RANDOM_FREQUENCY 45
85 #define LV2DYNPARAM_PARAMETER_FILTER_LFO_FREQUENCY_RANDOMNESS 46
87 #define LV2DYNPARAM_PARAMETER_FREQUENCY_ENV_ATTACK_VALUE 47
88 #define LV2DYNPARAM_PARAMETER_FREQUENCY_ENV_ATTACK_DURATION 48
89 #define LV2DYNPARAM_PARAMETER_FREQUENCY_ENV_RELEASE_DURATION 49
90 #define LV2DYNPARAM_PARAMETER_FREQUENCY_ENV_RELEASE_VALUE 50
91 #define LV2DYNPARAM_PARAMETER_FREQUENCY_ENV_STRETCH 51
92 #define LV2DYNPARAM_PARAMETER_FREQUENCY_ENV_FORCED_RELEASE 52
94 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_SHAPE 53
95 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_FREQUENCY 54
96 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_DEPTH 55
97 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_RANDOM_START_PHASE 56
98 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_START_PHASE 57
99 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_DELAY 58
100 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_STRETCH 59
101 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_RANDOM_DEPTH 60
102 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_DEPTH_RANDOMNESS 61
103 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_RANDOM_FREQUENCY 62
104 #define LV2DYNPARAM_PARAMETER_FREQUENCY_LFO_FREQUENCY_RANDOMNESS 63
106 #define LV2DYNPARAM_PARAMETER_GLOBAL_FILTER_TYPE 64
107 #define LV2DYNPARAM_PARAMETER_GLOBAL_FILTER_VELOCITY_SENSING_AMOUNT 65
108 #define LV2DYNPARAM_PARAMETER_GLOBAL_FILTER_VELOCITY_SENSING_FUNCTION 66
110 #define LV2DYNPARAM_PARAMETER_GLOBAL_ANALOG_FILTER_TYPE 67
111 #define LV2DYNPARAM_PARAMETER_GLOBAL_ANALOG_FILTER_FREQUENCY 68
112 #define LV2DYNPARAM_PARAMETER_GLOBAL_ANALOG_FILTER_Q_FACTOR 69
113 #define LV2DYNPARAM_PARAMETER_GLOBAL_ANALOG_FILTER_FREQUENCY_TRACKING 70
114 #define LV2DYNPARAM_PARAMETER_GLOBAL_ANALOG_FILTER_GAIN 71
115 #define LV2DYNPARAM_PARAMETER_GLOBAL_ANALOG_FILTER_STAGES 72
117 #define LV2DYNPARAM_PARAMETER_PORTAMENTO_ENABLED 73
118 #define LV2DYNPARAM_PARAMETER_PORTAMENTO_TIME 74
119 #define LV2DYNPARAM_PARAMETER_PORTAMENTO_TIME_STRETCH 75
120 #define LV2DYNPARAM_PARAMETER_PORTAMENTO_PITCH_THRESHOLD 76
121 #define LV2DYNPARAM_PARAMETER_PORTAMENTO_PITCH_THRESHOLD_ABOVE 77
123 #define LV2DYNPARAM_PARAMETER_PITCH_BEND_RANGE 78
124 #define LV2DYNPARAM_PARAMETER_PITCH_BEND 79
126 #define LV2DYNPARAM_PARAMETER_GLOBAL_SV_FILTER_TYPE 80
127 #define LV2DYNPARAM_PARAMETER_GLOBAL_SV_FILTER_FREQUENCY 81
128 #define LV2DYNPARAM_PARAMETER_GLOBAL_SV_FILTER_Q_FACTOR 82
129 #define LV2DYNPARAM_PARAMETER_GLOBAL_SV_FILTER_FREQUENCY_TRACKING 83
130 #define LV2DYNPARAM_PARAMETER_GLOBAL_SV_FILTER_GAIN 84
131 #define LV2DYNPARAM_PARAMETER_GLOBAL_SV_FILTER_STAGES 85
133 #define LV2DYNPARAM_PARAMETERS_COUNT 86
135 #define LV2DYNPARAM_GROUP_AMP 0
136 #define LV2DYNPARAM_GROUP_FILTER 1
137 #define LV2DYNPARAM_GROUP_FREQUENCY 2
138 #define LV2DYNPARAM_GROUP_PORTAMENTO 3
139 #define LV2DYNPARAM_GROUP_PITCH_BEND 4
140 #define LV2DYNPARAM_GROUP_VOICES 5
142 #define LV2DYNPARAM_GROUP_AMP_PANORAMA 6
143 #define LV2DYNPARAM_GROUP_AMP_PUNCH 7
144 #define LV2DYNPARAM_GROUP_AMP_ENV 8
145 #define LV2DYNPARAM_GROUP_AMP_LFO 9
146 #define LV2DYNPARAM_GROUP_AMP_LFO_START_PHASE 10
147 #define LV2DYNPARAM_GROUP_AMP_LFO_DEPTH_RANDOMNESS 11
148 #define LV2DYNPARAM_GROUP_AMP_LFO_FREQUENCY_RANDOMNESS 12
150 #define LV2DYNPARAM_GROUP_FILTER_FILTERS 13
151 #define LV2DYNPARAM_GROUP_FILTER_ANALOG 14
152 #define LV2DYNPARAM_GROUP_FILTER_FORMANT 15
153 #define LV2DYNPARAM_GROUP_FILTER_SV 16
154 #define LV2DYNPARAM_GROUP_FILTER_ENV 17
155 #define LV2DYNPARAM_GROUP_FILTER_LFO 18
156 #define LV2DYNPARAM_GROUP_FILTER_LFO_START_PHASE 19
157 #define LV2DYNPARAM_GROUP_FILTER_LFO_DEPTH_RANDOMNESS 20
158 #define LV2DYNPARAM_GROUP_FILTER_LFO_FREQUENCY_RANDOMNESS 21
160 #define LV2DYNPARAM_GROUP_FREQUENCY_ENV 22
161 #define LV2DYNPARAM_GROUP_FREQUENCY_LFO 23
162 #define LV2DYNPARAM_GROUP_FREQUENCY_LFO_START_PHASE 24
163 #define LV2DYNPARAM_GROUP_FREQUENCY_LFO_DEPTH_RANDOMNESS 25
164 #define LV2DYNPARAM_GROUP_FREQUENCY_LFO_FREQUENCY_RANDOMNESS 26
166 #define LV2DYNPARAM_GROUPS_COUNT 27
168 struct group_descriptor g_top_forest_map_groups[LV2DYNPARAM_GROUPS_COUNT];
169 struct parameter_descriptor g_top_forest_map_parameters[LV2DYNPARAM_PARAMETERS_COUNT];
170 struct zyn_forest_map g_top_forest_map;
171 int g_top_forest_map_voices_group_index;
172 #define map_ptr (&g_top_forest_map)
174 void zynadd_init_top_forest_map() __attribute__((constructor));
175 void zynadd_init_top_forest_map()
177 LV2DYNPARAM_FOREST_MAP_BEGIN(LV2DYNPARAM_GROUPS_COUNT, LV2DYNPARAM_PARAMETERS_COUNT, g_top_forest_map_groups, g_top_forest_map_parameters);
179 LOG_DEBUG("zynadd_init_top_forest_map() called");
181 LV2DYNPARAM_GROUP_INIT(ROOT, AMP, "Amplitude", NULL);
183 LV2DYNPARAM_PARAMETER_INIT_BOOL(AMP, STEREO, AMP_GLOBALS, STEREO, "Stereo", ALWAYS, NULL);
184 LV2DYNPARAM_PARAMETER_INIT_BOOL(AMP, RANDOM_GROUPING, AMP_GLOBALS, RANDOM_GROUPING, "Random Grouping", ALWAYS, NULL);
185 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP, VOLUME, AMP_GLOBALS, VOLUME, "Master Volume", 0, 100, ALWAYS, NULL);
186 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP, VELOCITY_SENSING, AMP_GLOBALS, VELOCITY_SENSING, "Velocity sensing", 0, 100, ALWAYS, NULL);
188 LV2DYNPARAM_GROUP_INIT(AMP, AMP_PANORAMA, "Random:Panorama", HINT_TOGGLE_FLOAT, NULL, NULL);
190 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(AMP_PANORAMA, RANDOM_PANORAMA, AMP_GLOBALS, RANDOM_PANORAMA, "Random", HIDE, PANORAMA, NULL);
191 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_PANORAMA, PANORAMA, AMP_GLOBALS, PANORAMA, "Panorama", -1, 1, SEMI, NULL);
194 LV2DYNPARAM_GROUP_INIT(AMP, AMP_PUNCH, "Punch", NULL);
196 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_PUNCH, PUNCH_STRENGTH, AMP_GLOBALS, PUNCH_STRENGTH, "Strength", 0, 100, ALWAYS, NULL);
197 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_PUNCH, PUNCH_TIME, AMP_GLOBALS, PUNCH_TIME, "Time", 0, 100, ALWAYS, NULL);
198 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_PUNCH, PUNCH_STRETCH, AMP_GLOBALS, PUNCH_STRETCH, "Stretch", 0, 100, ALWAYS, NULL);
199 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_PUNCH, PUNCH_VELOCITY_SENSING, AMP_GLOBALS, PUNCH_VELOCITY_SENSING, "Velocity sensing", 0, 100, ALWAYS, NULL);
202 LV2DYNPARAM_GROUP_INIT(AMP, AMP_ENV, "Envelope", NULL);
204 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_ENV, AMP_ENV_ATTACK, AMP_ENV, ENV_ATTACK_DURATION, "Attack", 0, 100, ALWAYS, NULL);
205 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_ENV, AMP_ENV_DECAY, AMP_ENV, ENV_DECAY_DURATION, "Decay", 0, 100, ALWAYS, NULL);
206 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_ENV, AMP_ENV_SUSTAIN, AMP_ENV, ENV_SUSTAIN_VALUE, "Sustain", 0, 100, ALWAYS, NULL);
207 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_ENV, AMP_ENV_RELEASE, AMP_ENV, ENV_RELEASE_DURATION, "Release", 0, 100, ALWAYS, NULL);
208 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_ENV, AMP_ENV_STRETCH, AMP_ENV, ENV_STRETCH, "Stretch", 0, 200, ALWAYS, NULL);
209 LV2DYNPARAM_PARAMETER_INIT_BOOL(AMP_ENV, AMP_ENV_FORCED_RELEASE, AMP_ENV, ENV_FORCED_RELEASE, "Forced release", ALWAYS, NULL);
210 LV2DYNPARAM_PARAMETER_INIT_BOOL(AMP_ENV, AMP_ENV_LINEAR, AMP_ENV, ENV_LINEAR, "Linear", ALWAYS, NULL);
213 LV2DYNPARAM_GROUP_INIT(AMP, AMP_LFO, "LFO", NULL);
215 LV2DYNPARAM_PARAMETER_INIT_ENUM(AMP_LFO, AMP_LFO_SHAPE, AMP_LFO, LFO_SHAPE, "Shape", g_shape_names, ZYN_LFO_SHAPES_COUNT, ALWAYS, NULL);
216 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO, AMP_LFO_FREQUENCY, AMP_LFO, LFO_FREQUENCY, "Frequency", 0, 1, ALWAYS, NULL);
217 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO, AMP_LFO_DEPTH, AMP_LFO, LFO_DEPTH, "Depth", 0, 100, ALWAYS, NULL);
219 LV2DYNPARAM_GROUP_INIT(AMP_LFO, AMP_LFO_START_PHASE, "Random:Start phase", HINT_TOGGLE_FLOAT, NULL, NULL);
221 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(AMP_LFO_START_PHASE, AMP_LFO_RANDOM_START_PHASE, AMP_LFO, LFO_RANDOM_START_PHASE, "Random", HIDE, AMP_LFO_START_PHASE, NULL);
222 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO_START_PHASE, AMP_LFO_START_PHASE, AMP_LFO, LFO_START_PHASE, "Start phase", 0, 1, SEMI, NULL);
225 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO, AMP_LFO_DELAY, AMP_LFO, LFO_DELAY, "Delay", 0, 4, ALWAYS, NULL);
226 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO, AMP_LFO_STRETCH, AMP_LFO, LFO_STRETCH, "Stretch", -1, 1, ALWAYS, NULL);
228 LV2DYNPARAM_GROUP_INIT(AMP_LFO, AMP_LFO_DEPTH_RANDOMNESS, "Random depth:Randomness", HINT_TOGGLE_FLOAT, NULL, NULL);
230 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(AMP_LFO_DEPTH_RANDOMNESS, AMP_LFO_RANDOM_DEPTH, AMP_LFO, LFO_RANDOM_DEPTH, "Random depth", SHOW, AMP_LFO_DEPTH_RANDOMNESS, NULL);
231 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO_DEPTH_RANDOMNESS, AMP_LFO_DEPTH_RANDOMNESS, AMP_LFO, LFO_DEPTH_RANDOMNESS, "Randomness", 0, 100, SEMI, NULL);
234 LV2DYNPARAM_GROUP_INIT(AMP_LFO, AMP_LFO_FREQUENCY_RANDOMNESS, "Random frequency:Randomness", HINT_TOGGLE_FLOAT, NULL, NULL);
236 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(AMP_LFO_FREQUENCY_RANDOMNESS, AMP_LFO_RANDOM_FREQUENCY, AMP_LFO, LFO_RANDOM_FREQUENCY, "Random frequency", SHOW, AMP_LFO_FREQUENCY_RANDOMNESS, NULL);
237 LV2DYNPARAM_PARAMETER_INIT_FLOAT(AMP_LFO_FREQUENCY_RANDOMNESS, AMP_LFO_FREQUENCY_RANDOMNESS, AMP_LFO, LFO_FREQUENCY_RANDOMNESS, "Randomness", 0, 100, SEMI, NULL);
242 LV2DYNPARAM_GROUP_INIT(ROOT, FILTER, "Filter", NULL);
244 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER, GLOBAL_FILTER_VELOCITY_SENSING_AMOUNT, FILTER_GLOBALS, VELOCITY_SENSING_AMOUNT, "Velocity sensing amount", 0, 1, ALWAYS, NULL);
245 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER, GLOBAL_FILTER_VELOCITY_SENSING_FUNCTION, FILTER_GLOBALS, VELOCITY_SENSING_FUNCTION, "Velocity sensing function", -1, 1, ALWAYS, NULL);
247 LV2DYNPARAM_GROUP_INIT(FILTER, FILTER_FILTERS, "Filter parameters", HINT_ONE_SUBGROUP, NULL, NULL);
249 LV2DYNPARAM_PARAMETER_INIT_ENUM(FILTER_FILTERS, GLOBAL_FILTER_TYPE, FILTER_GLOBALS, FILTER_CATEGORY, "Filter category", g_filter_type_names, ZYN_FILTER_TYPES_COUNT, ALWAYS, NULL);
251 LV2DYNPARAM_GROUP_INIT(FILTER_FILTERS, FILTER_ANALOG, "Analog", NULL);
253 LV2DYNPARAM_PARAMETER_INIT_ENUM(FILTER_ANALOG, GLOBAL_ANALOG_FILTER_TYPE, FILTER_ANALOG, FILTER_TYPE, "Filter type", g_analog_filter_type_names, ZYN_FILTER_ANALOG_TYPES_COUNT, ALWAYS, NULL);
255 LV2DYNPARAM_PARAMETER_INIT_INT(FILTER_ANALOG, GLOBAL_ANALOG_FILTER_STAGES, FILTER_ANALOG, STAGES, "Stages", 1, 5, ALWAYS, NULL);
257 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ANALOG, GLOBAL_ANALOG_FILTER_FREQUENCY, FILTER_ANALOG, FREQUNECY, "Frequency", 0, 1, ALWAYS, NULL);
258 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ANALOG, GLOBAL_ANALOG_FILTER_Q_FACTOR, FILTER_ANALOG, Q_FACTOR, "Q (resonance)", 0, 1, ALWAYS, NULL);
259 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ANALOG, GLOBAL_ANALOG_FILTER_FREQUENCY_TRACKING, FILTER_ANALOG, FREQUENCY_TRACKING, "Frequency tracking", -1, 1, ALWAYS, NULL);
260 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ANALOG, GLOBAL_ANALOG_FILTER_GAIN, FILTER_ANALOG, VOLUME, "Gain", -30, 30, ALWAYS, NULL);
263 LV2DYNPARAM_GROUP_INIT(FILTER_FILTERS, FILTER_FORMANT, "Formant", NULL);
267 LV2DYNPARAM_GROUP_INIT(FILTER_FILTERS, FILTER_SV, "State variable", NULL);
269 LV2DYNPARAM_PARAMETER_INIT_ENUM(FILTER_SV, GLOBAL_SV_FILTER_TYPE, FILTER_SV, FILTER_TYPE, "Filter type", g_sv_filter_type_names, ZYN_FILTER_SV_TYPES_COUNT, ALWAYS, NULL);
271 LV2DYNPARAM_PARAMETER_INIT_INT(FILTER_SV, GLOBAL_SV_FILTER_STAGES, FILTER_SV, STAGES, "Stages", 1, 5, ALWAYS, NULL);
273 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_SV, GLOBAL_SV_FILTER_FREQUENCY, FILTER_SV, FREQUNECY, "Frequency", -5, 5, ALWAYS, NULL);
274 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_SV, GLOBAL_SV_FILTER_Q_FACTOR, FILTER_SV, Q_FACTOR, "Q (resonance)", 0, 1, ALWAYS, NULL);
275 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_SV, GLOBAL_SV_FILTER_FREQUENCY_TRACKING, FILTER_SV, FREQUENCY_TRACKING, "Frequency tracking", -1, 1, ALWAYS, NULL);
276 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_SV, GLOBAL_SV_FILTER_GAIN, FILTER_SV, VOLUME, "Gain", -30, 30, ALWAYS, NULL);
280 LV2DYNPARAM_GROUP_INIT(FILTER, FILTER_ENV, "Envelope", NULL);
282 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_ATTACK_VALUE, FILTER_ENV, ENV_ATTACK_VALUE, "Attack value", 0, 100, ALWAYS, NULL);
283 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_ATTACK_DURATION, FILTER_ENV, ENV_ATTACK_DURATION, "Attack duration", 0, 100, ALWAYS, NULL);
284 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_DECAY_VALUE, FILTER_ENV, ENV_DECAY_VALUE, "Decay value", 0, 100, ALWAYS, NULL);
285 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_DECAY_DURATION, FILTER_ENV, ENV_DECAY_DURATION, "Decay duration", 0, 100, ALWAYS, NULL);
286 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_RELEASE_VALUE, FILTER_ENV, ENV_RELEASE_VALUE, "Release value", 0, 100, ALWAYS, NULL);
287 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_RELEASE_DURATION, FILTER_ENV, ENV_RELEASE_DURATION, "Release duration", 0, 100, ALWAYS, NULL);
288 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_ENV, FILTER_ENV_STRETCH, FILTER_ENV, ENV_STRETCH, "Stretch", 0, 200, ALWAYS, NULL);
289 LV2DYNPARAM_PARAMETER_INIT_BOOL(FILTER_ENV, FILTER_ENV_FORCED_RELEASE, FILTER_ENV, ENV_FORCED_RELEASE, "Forced release", ALWAYS, NULL);
292 LV2DYNPARAM_GROUP_INIT(FILTER, FILTER_LFO, "LFO", NULL);
294 LV2DYNPARAM_PARAMETER_INIT_ENUM(FILTER_LFO, FILTER_LFO_SHAPE, FILTER_LFO, LFO_SHAPE, "Shape", g_shape_names, ZYN_LFO_SHAPES_COUNT, ALWAYS, NULL);
295 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO, FILTER_LFO_FREQUENCY, FILTER_LFO, LFO_FREQUENCY, "Frequency", 0, 1, ALWAYS, NULL);
296 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO, FILTER_LFO_DEPTH, FILTER_LFO, LFO_DEPTH, "Depth", 0, 100, ALWAYS, NULL);
298 LV2DYNPARAM_GROUP_INIT(FILTER_LFO, FILTER_LFO_START_PHASE, "Random:Start phase", HINT_TOGGLE_FLOAT, NULL, NULL);
300 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(FILTER_LFO_START_PHASE, FILTER_LFO_RANDOM_START_PHASE, FILTER_LFO, LFO_RANDOM_START_PHASE, "Random", HIDE, FILTER_LFO_START_PHASE, NULL);
301 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO_START_PHASE, FILTER_LFO_START_PHASE, FILTER_LFO, LFO_START_PHASE, "Start phase", 0, 1, SEMI, NULL);
304 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO, FILTER_LFO_DELAY, FILTER_LFO, LFO_DELAY, "Delay", 0, 4, ALWAYS, NULL);
305 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO, FILTER_LFO_STRETCH, FILTER_LFO, LFO_STRETCH, "Stretch", -1, 1, ALWAYS, NULL);
307 LV2DYNPARAM_GROUP_INIT(FILTER_LFO, FILTER_LFO_DEPTH_RANDOMNESS, "Random depth:Randomness", HINT_TOGGLE_FLOAT, NULL, NULL);
309 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(FILTER_LFO_DEPTH_RANDOMNESS, FILTER_LFO_RANDOM_DEPTH, FILTER_LFO, LFO_RANDOM_DEPTH, "Random depth", SHOW, FILTER_LFO_DEPTH_RANDOMNESS, NULL);
310 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO_DEPTH_RANDOMNESS, FILTER_LFO_DEPTH_RANDOMNESS, FILTER_LFO, LFO_DEPTH_RANDOMNESS, "Randomness", 0, 100, SEMI, NULL);
313 LV2DYNPARAM_GROUP_INIT(FILTER_LFO, FILTER_LFO_FREQUENCY_RANDOMNESS, "Random frequency:Randomness", HINT_TOGGLE_FLOAT, NULL, NULL);
315 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(FILTER_LFO_FREQUENCY_RANDOMNESS, FILTER_LFO_RANDOM_FREQUENCY, FILTER_LFO, LFO_RANDOM_FREQUENCY, "Random frequency", SHOW, FILTER_LFO_FREQUENCY_RANDOMNESS, NULL);
316 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FILTER_LFO_FREQUENCY_RANDOMNESS, FILTER_LFO_FREQUENCY_RANDOMNESS, FILTER_LFO, LFO_FREQUENCY_RANDOMNESS, "Randomness", 0, 100, SEMI, NULL);
321 LV2DYNPARAM_GROUP_INIT(ROOT, FREQUENCY, "Frequency", NULL);
323 LV2DYNPARAM_GROUP_INIT(FREQUENCY, FREQUENCY_ENV, "Envelope", NULL);
325 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_ENV, FREQUENCY_ENV_ATTACK_VALUE, FREQUENCY_ENV, ENV_ATTACK_VALUE, "Attack value", 0, 100, ALWAYS, NULL);
326 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_ENV, FREQUENCY_ENV_ATTACK_DURATION, FREQUENCY_ENV, ENV_ATTACK_DURATION, "Attack duration", 0, 100, ALWAYS, NULL);
327 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_ENV, FREQUENCY_ENV_RELEASE_VALUE, FREQUENCY_ENV, ENV_RELEASE_VALUE, "Release value", 0, 100, ALWAYS, NULL);
328 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_ENV, FREQUENCY_ENV_RELEASE_DURATION, FREQUENCY_ENV, ENV_RELEASE_DURATION, "Release duration", 0, 100, ALWAYS, NULL);
329 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_ENV, FREQUENCY_ENV_STRETCH, FREQUENCY_ENV, ENV_STRETCH, "Stretch", 0, 200, ALWAYS, NULL);
330 LV2DYNPARAM_PARAMETER_INIT_BOOL(FREQUENCY_ENV, FREQUENCY_ENV_FORCED_RELEASE, FREQUENCY_ENV, ENV_FORCED_RELEASE, "Forced release", ALWAYS, NULL);
333 LV2DYNPARAM_GROUP_INIT(FREQUENCY, FREQUENCY_LFO, "LFO", NULL);
335 LV2DYNPARAM_PARAMETER_INIT_ENUM(FREQUENCY_LFO, FREQUENCY_LFO_SHAPE, FREQUENCY_LFO, LFO_SHAPE, "Shape", g_shape_names, ZYN_LFO_SHAPES_COUNT, ALWAYS, NULL);
336 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO, FREQUENCY_LFO_FREQUENCY, FREQUENCY_LFO, LFO_FREQUENCY, "Frequency", 0, 1, ALWAYS, NULL);
337 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO, FREQUENCY_LFO_DEPTH, FREQUENCY_LFO, LFO_DEPTH, "Depth", 0, 100, ALWAYS, NULL);
339 LV2DYNPARAM_GROUP_INIT(FREQUENCY_LFO, FREQUENCY_LFO_START_PHASE, "Random:Start phase", HINT_TOGGLE_FLOAT, NULL, NULL);
341 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(FREQUENCY_LFO_START_PHASE, FREQUENCY_LFO_RANDOM_START_PHASE, FREQUENCY_LFO, LFO_RANDOM_START_PHASE, "Random", HIDE, FREQUENCY_LFO_START_PHASE, NULL);
342 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO_START_PHASE, FREQUENCY_LFO_START_PHASE, FREQUENCY_LFO, LFO_START_PHASE, "Start phase", 0, 1, SEMI, NULL);
345 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO, FREQUENCY_LFO_DELAY, FREQUENCY_LFO, LFO_DELAY, "Delay", 0, 4, ALWAYS, NULL);
346 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO, FREQUENCY_LFO_STRETCH, FREQUENCY_LFO, LFO_STRETCH, "Stretch", -1, 1, ALWAYS, NULL);
348 LV2DYNPARAM_GROUP_INIT(FREQUENCY_LFO, FREQUENCY_LFO_DEPTH_RANDOMNESS, "Random depth:Randomness", HINT_TOGGLE_FLOAT, NULL, NULL);
350 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(FREQUENCY_LFO_DEPTH_RANDOMNESS, FREQUENCY_LFO_RANDOM_DEPTH, FREQUENCY_LFO, LFO_RANDOM_DEPTH, "Random depth", SHOW, FREQUENCY_LFO_DEPTH_RANDOMNESS, NULL);
351 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO_DEPTH_RANDOMNESS, FREQUENCY_LFO_DEPTH_RANDOMNESS, FREQUENCY_LFO, LFO_DEPTH_RANDOMNESS, "Randomness", 0, 100, SEMI, NULL);
354 LV2DYNPARAM_GROUP_INIT(FREQUENCY_LFO, FREQUENCY_LFO_FREQUENCY_RANDOMNESS, "Random frequency:Randomness", HINT_TOGGLE_FLOAT, NULL, NULL);
356 LV2DYNPARAM_PARAMETER_INIT_BOOL_SEMI(FREQUENCY_LFO_FREQUENCY_RANDOMNESS, FREQUENCY_LFO_RANDOM_FREQUENCY, FREQUENCY_LFO, LFO_RANDOM_FREQUENCY, "Random frequency", SHOW, FREQUENCY_LFO_FREQUENCY_RANDOMNESS, NULL);
357 LV2DYNPARAM_PARAMETER_INIT_FLOAT(FREQUENCY_LFO_FREQUENCY_RANDOMNESS, FREQUENCY_LFO_FREQUENCY_RANDOMNESS, FREQUENCY_LFO, LFO_FREQUENCY_RANDOMNESS, "Randomness", 0, 100, SEMI, NULL);
362 LV2DYNPARAM_GROUP_INIT(ROOT, PORTAMENTO, "Portamento", NULL);
364 LV2DYNPARAM_PARAMETER_INIT_BOOL(PORTAMENTO, PORTAMENTO_ENABLED, PORTAMENTO, PORTAMENTO_ENABLED, "Enabled", ALWAYS, NULL);
365 LV2DYNPARAM_PARAMETER_INIT_FLOAT(PORTAMENTO, PORTAMENTO_TIME, PORTAMENTO, PORTAMENTO_TIME, "Time", 0, 1, ALWAYS, NULL);
366 LV2DYNPARAM_PARAMETER_INIT_FLOAT(PORTAMENTO, PORTAMENTO_TIME_STRETCH, PORTAMENTO, PORTAMENTO_TIME_STRETCH, "Time stretch", -1, 1, ALWAYS, NULL);
367 LV2DYNPARAM_PARAMETER_INIT_INT(PORTAMENTO, PORTAMENTO_PITCH_THRESHOLD, PORTAMENTO, PORTAMENTO_PITCH_THRESHOLD, "Threshold", 0, 127, ALWAYS, NULL);
368 LV2DYNPARAM_PARAMETER_INIT_BOOL(PORTAMENTO, PORTAMENTO_PITCH_THRESHOLD_ABOVE, PORTAMENTO, PORTAMENTO_PITCH_THRESHOLD_ABOVE, "Threshold above", ALWAYS, NULL);
371 LV2DYNPARAM_GROUP_INIT(ROOT, PITCH_BEND, "Pitch bend", NULL);
373 LV2DYNPARAM_PARAMETER_INIT_FLOAT(PITCH_BEND, PITCH_BEND_RANGE, AMP_GLOBALS, PITCH_BEND_RANGE, "Range", -6400.0, 6400.0, ALWAYS, NULL);
374 LV2DYNPARAM_PARAMETER_INIT_FLOAT(PITCH_BEND, PITCH_BEND, AMP_GLOBALS, PITCH_BEND, "Bend", -1.0, 1.0, ALWAYS, NULL);
377 g_top_forest_map_voices_group_index = group_index;
378 LV2DYNPARAM_GROUP_INIT(ROOT, VOICES, "Voices", NULL);
382 LV2DYNPARAM_FOREST_MAP_END;
385 unsigned int
386 zynadd_top_forest_map_get_voices_group()
388 return g_top_forest_map_voices_group_index;