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
25 (* zyn_component_get_float_parameter
)(
26 zyn_addsynth_component component
,
27 unsigned int parameter
);
30 (* zyn_component_set_float_parameter
)(
32 unsigned int parameter
,
36 (* zyn_component_get_int_parameter
)(
38 unsigned int parameter
);
41 (* zyn_component_set_int_parameter
)(
43 unsigned int parameter
,
47 (* zyn_component_get_bool_parameter
)(
49 unsigned int parameter
);
52 (* zyn_component_set_bool_parameter
)(
54 unsigned int parameter
,
57 struct zyn_component_descriptor
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;
82 } /* Adjust editor indent */
87 zyn_addsynth_component_init_amp_globals(
88 struct zyn_component_descriptor
* component_ptr
,
89 struct zyn_addsynth
* zyn_addsynth_ptr
);
92 zyn_addsynth_component_init_amp_envelope(
93 struct zyn_component_descriptor
* component_ptr
,
94 EnvelopeParams
* envelope_params_ptr
);
97 zyn_addsynth_component_init_lfo(
98 struct zyn_component_descriptor
* component_ptr
,
99 struct zyn_lfo_parameters
* lfo_params_ptr
);
102 zyn_addsynth_component_init_filter_globals(
103 struct zyn_component_descriptor
* component_ptr
,
104 struct zyn_addsynth
* zyn_addsynth_ptr
);
107 zyn_addsynth_component_init_filter_analog(
108 struct zyn_component_descriptor
* component_ptr
,
109 struct zyn_addsynth
* zyn_addsynth_ptr
);
112 zyn_addsynth_component_init_filter_formant(
113 struct zyn_component_descriptor
* component_ptr
,
114 struct zyn_addsynth
* zyn_addsynth_ptr
);
117 zyn_addsynth_component_init_filter_sv(
118 struct zyn_component_descriptor
* component_ptr
,
119 zyn_filter_sv_handle filter
);
122 zyn_addsynth_component_init_filter_envelope(
123 struct zyn_component_descriptor
* component_ptr
,
124 EnvelopeParams
* envelope_params_ptr
);
127 zyn_addsynth_component_init_frequency_globals(
128 struct zyn_component_descriptor
* component_ptr
);
131 zyn_addsynth_component_init_detune(
132 struct zyn_component_descriptor
* component_ptr
,
133 struct zyn_detune
* detune_ptr
);
136 zyn_addsynth_component_init_fixed_detune(
137 struct zyn_component_descriptor
* component_ptr
,
138 struct zyn_fixed_detune
* fixed_detune_ptr
);
141 zyn_addsynth_component_init_frequency_envelope(
142 struct zyn_component_descriptor
* component_ptr
,
143 EnvelopeParams
* envelope_params_ptr
);
146 zyn_addsynth_component_init_voice_globals(
147 struct zyn_component_descriptor
* component_ptr
,
148 struct zyn_addnote_voice_parameters
* voice_params_ptr
);
152 zyn_addsynth_component_init_portamento(
153 struct zyn_component_descriptor
* component_ptr
,
154 struct zyn_portamento
* portamento_ptr
);
157 zyn_addsynth_component_init_oscillator(
158 struct zyn_component_descriptor
* component_ptr
,
159 struct zyn_oscillator
* oscillator_ptr
);
162 { /* Adjust editor indent */
168 #endif /* #ifndef ADDSYNTH_COMPONENT_H__19086C9D_82A0_42E0_87E4_8CA309CB382C__INCLUDED */