Expose all 8 voices
[zyn.git] / zynadd_dynparam_forest_map_voice.c
blobd0091335eb89f6b05ab973b01ae798d1b7379456
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * Copyright (C) 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_RESONANCE 0
36 #define LV2DYNPARAM_PARAMETER_WHITE_NOISE 1
37 #define LV2DYNPARAM_PARAMETER_OSCILLATOR_BASE_FUNCTION 2
38 #define LV2DYNPARAM_PARAMETER_OSCILLATOR_WAVESHAPE_TYPE 3
39 #define LV2DYNPARAM_PARAMETER_OSCILLATOR_WAVESHAPE_DRIVE 4
40 #define LV2DYNPARAM_PARAMETER_OSCILLATOR_BASE_FUNCTION_ADJUST 5
41 #define LV2DYNPARAM_PARAMETER_OSCILLATOR_SPECTRUM_ADJUST_TYPE 6
42 #define LV2DYNPARAM_PARAMETER_OSCILLATOR_SPECTRUM_ADJUST 7
44 #define LV2DYNPARAM_PARAMETERS_COUNT 8
46 #define LV2DYNPARAM_GROUP_VOICEX 0
48 #define LV2DYNPARAM_GROUPS_COUNT 1
50 struct group_descriptor g_voice_forest_map_groups[LV2DYNPARAM_GROUPS_COUNT];
51 struct parameter_descriptor g_voice_forest_map_parameters[LV2DYNPARAM_PARAMETERS_COUNT];
52 struct zyn_forest_map g_voice_forest_map;
53 #define map_ptr (&g_voice_forest_map)
55 void zynadd_init_voice_forest_map() __attribute__((constructor));
56 void zynadd_init_voice_forest_map()
58 LV2DYNPARAM_FOREST_MAP_BEGIN(LV2DYNPARAM_GROUPS_COUNT, LV2DYNPARAM_PARAMETERS_COUNT, g_voice_forest_map_groups, g_voice_forest_map_parameters);
60 LOG_DEBUG("zynadd_init_voice_forest_map() called");
62 LV2DYNPARAM_GROUP_INIT(ROOT, VOICEX, "Voice X", NULL);
64 LV2DYNPARAM_PARAMETER_INIT_BOOL(VOICEX, RESONANCE, VOICE_GLOBALS, RESONANCE, "Resonance", ALWAYS, NULL);
65 LV2DYNPARAM_PARAMETER_INIT_BOOL(VOICEX, WHITE_NOISE, VOICE_GLOBALS, WHITE_NOISE, "White Noise", ALWAYS, NULL);
67 LV2DYNPARAM_PARAMETER_INIT_ENUM(VOICEX, OSCILLATOR_BASE_FUNCTION, VOICE_OSCILLATOR, OSCILLATOR_BASE_FUNCTION, "Base function", g_oscillator_base_function_names, ZYN_OSCILLATOR_BASE_FUNCTIONS_COUNT, ALWAYS, NULL);
68 LV2DYNPARAM_PARAMETER_INIT_FLOAT(VOICEX, OSCILLATOR_BASE_FUNCTION_ADJUST, VOICE_OSCILLATOR, OSCILLATOR_BASE_FUNCTION_ADJUST, "Base function adjust", 0, 1, ALWAYS, NULL);
70 LV2DYNPARAM_PARAMETER_INIT_ENUM(VOICEX, OSCILLATOR_WAVESHAPE_TYPE, VOICE_OSCILLATOR, OSCILLATOR_WAVESHAPE_TYPE, "Waveshape type", g_oscillator_waveshape_type_names, ZYN_OSCILLATOR_WAVESHAPE_TYPES_COUNT, ALWAYS, NULL);
71 LV2DYNPARAM_PARAMETER_INIT_FLOAT(VOICEX, OSCILLATOR_WAVESHAPE_DRIVE, VOICE_OSCILLATOR, OSCILLATOR_WAVESHAPE_DRIVE, "Waveshape drive", 0, 100, ALWAYS, NULL);
73 LV2DYNPARAM_PARAMETER_INIT_ENUM(VOICEX, OSCILLATOR_SPECTRUM_ADJUST_TYPE, VOICE_OSCILLATOR, OSCILLATOR_SPECTRUM_ADJUST_TYPE, "Spectrum adjust type", g_oscillator_spectrum_adjust_type_names, ZYN_OSCILLATOR_SPECTRUM_ADJUST_TYPES_COUNT, ALWAYS, NULL);
74 LV2DYNPARAM_PARAMETER_INIT_FLOAT(VOICEX, OSCILLATOR_SPECTRUM_ADJUST, VOICE_OSCILLATOR, OSCILLATOR_SPECTRUM_ADJUST, "Spectrum adjust", 0, 100, ALWAYS, NULL);
77 LV2DYNPARAM_FOREST_MAP_END;