Expose voice detune parameter of the lv2 plugin
[zyn.git] / addsynth_component.h
blob3397f62c528cfa19d9142d774012aff9e8c7fb27
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 #ifndef ADDSYNTH_COMPONENT_H__19086C9D_82A0_42E0_87E4_8CA309CB382C__INCLUDED
22 #define ADDSYNTH_COMPONENT_H__19086C9D_82A0_42E0_87E4_8CA309CB382C__INCLUDED
24 typedef float
25 (* zyn_component_get_float_parameter)(
26 zyn_addsynth_component component,
27 unsigned int parameter);
29 typedef void
30 (* zyn_component_set_float_parameter)(
31 void * context,
32 unsigned int parameter,
33 float value);
35 typedef signed int
36 (* zyn_component_get_int_parameter)(
37 void * context,
38 unsigned int parameter);
40 typedef void
41 (* zyn_component_set_int_parameter)(
42 void * context,
43 unsigned int parameter,
44 signed int value);
46 typedef bool
47 (* zyn_component_get_bool_parameter)(
48 void * context,
49 unsigned int parameter);
51 typedef void
52 (* zyn_component_set_bool_parameter)(
53 void * context,
54 unsigned int parameter,
55 bool value);
57 struct zyn_component_descriptor
59 void * context;
61 zyn_component_get_float_parameter get_float;
62 zyn_component_set_float_parameter set_float;
63 zyn_component_get_int_parameter get_int;
64 zyn_component_set_int_parameter set_int;
65 zyn_component_get_bool_parameter get_bool;
66 zyn_component_set_bool_parameter set_bool;
69 #define ZYN_INIT_COMPONENT(component_ptr, context_param, prefix) \
70 (component_ptr)->context = context_param; \
71 (component_ptr)->get_float = prefix ## get_float; \
72 (component_ptr)->set_float = prefix ## set_float; \
73 (component_ptr)->get_int = prefix ## get_int; \
74 (component_ptr)->set_int = prefix ## set_int; \
75 (component_ptr)->get_bool = prefix ## get_bool; \
76 (component_ptr)->set_bool = prefix ## set_bool;
78 #ifdef __cplusplus
79 extern "C" {
80 #endif
81 #if 0
82 } /* Adjust editor indent */
83 #endif
85 #ifdef __cplusplus
86 void
87 zyn_addsynth_component_init_amp_globals(
88 struct zyn_component_descriptor * component_ptr,
89 struct zyn_addsynth * zyn_addsynth_ptr);
91 void
92 zyn_addsynth_component_init_amp_envelope(
93 struct zyn_component_descriptor * component_ptr,
94 EnvelopeParams * envelope_params_ptr);
96 void
97 zyn_addsynth_component_init_lfo(
98 struct zyn_component_descriptor * component_ptr,
99 struct zyn_lfo_parameters * lfo_params_ptr);
101 void
102 zyn_addsynth_component_init_filter_globals(
103 struct zyn_component_descriptor * component_ptr,
104 struct zyn_addsynth * zyn_addsynth_ptr);
106 void
107 zyn_addsynth_component_init_filter_analog(
108 struct zyn_component_descriptor * component_ptr,
109 struct zyn_addsynth * zyn_addsynth_ptr);
111 void
112 zyn_addsynth_component_init_filter_formant(
113 struct zyn_component_descriptor * component_ptr,
114 struct zyn_addsynth * zyn_addsynth_ptr);
116 void
117 zyn_addsynth_component_init_filter_sv(
118 struct zyn_component_descriptor * component_ptr,
119 zyn_filter_sv_handle filter);
121 void
122 zyn_addsynth_component_init_filter_envelope(
123 struct zyn_component_descriptor * component_ptr,
124 EnvelopeParams * envelope_params_ptr);
126 void
127 zyn_addsynth_component_init_frequency_globals(
128 struct zyn_component_descriptor * component_ptr);
130 void
131 zyn_addsynth_component_init_detune(
132 struct zyn_component_descriptor * component_ptr,
133 struct zyn_detune * detune_ptr);
135 void
136 zyn_addsynth_component_init_fixed_detune(
137 struct zyn_component_descriptor * component_ptr,
138 struct zyn_fixed_detune * fixed_detune_ptr);
140 void
141 zyn_addsynth_component_init_frequency_envelope(
142 struct zyn_component_descriptor * component_ptr,
143 EnvelopeParams * envelope_params_ptr);
145 void
146 zyn_addsynth_component_init_voice_globals(
147 struct zyn_component_descriptor * component_ptr,
148 struct zyn_addnote_voice_parameters * voice_params_ptr);
149 #endif
151 void
152 zyn_addsynth_component_init_portamento(
153 struct zyn_component_descriptor * component_ptr,
154 struct zyn_portamento * portamento_ptr);
156 void
157 zyn_addsynth_component_init_oscillator(
158 struct zyn_component_descriptor * component_ptr,
159 struct zyn_oscillator * oscillator_ptr);
161 #if 0
162 { /* Adjust editor indent */
163 #endif
164 #ifdef __cplusplus
165 } /* extern "C" */
166 #endif
168 #endif /* #ifndef ADDSYNTH_COMPONENT_H__19086C9D_82A0_42E0_87E4_8CA309CB382C__INCLUDED */