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 COMMON_H__B9D0FFDE_1F2E_4378_9040_C1B0802DDC9E__INCLUDED
22 #define COMMON_H__B9D0FFDE_1F2E_4378_9040_C1B0802DDC9E__INCLUDED
26 /* What float type I use for internal sampledata */
27 #define zyn_sample_type float
28 #define REALTYPE float /* legacy */
31 * The size of a sound buffer (or the granularity)
32 * All internal transfer of sound data use buffer of this size
33 * All parameters are constant during this period of time, exception
34 * some parameters(like amplitudes) which are linear interpolated.
35 * If you increase this you'll ecounter big latencies, but if you
36 * decrease this the CPU requirements gets high.
38 #define SOUND_BUFFER_SIZE 128
41 * How is applied the velocity sensing
43 #define VELOCITY_MAX_SCALE 8.0
45 #define ZYN_LFO_SHAPE_TYPE_SINE 0
46 #define ZYN_LFO_SHAPE_TYPE_TRIANGLE 1
47 #define ZYN_LFO_SHAPE_TYPE_SQUARE 2
48 #define ZYN_LFO_SHAPE_TYPE_RAMP_UP 3
49 #define ZYN_LFO_SHAPE_TYPE_RAMP_DOWN 4
50 #define ZYN_LFO_SHAPE_TYPE_EXP_DOWN_1 5
51 #define ZYN_LFO_SHAPE_TYPE_EXP_DOWN_2 6
52 #define ZYN_LFO_SHAPES_COUNT 7
54 #define ZYN_FILTER_TYPE_ANALOG 0
55 #define ZYN_FILTER_TYPE_FORMANT 1
56 #define ZYN_FILTER_TYPE_STATE_VARIABLE 2
57 #define ZYN_FILTER_TYPES_COUNT 3
59 #define ZYN_FILTER_ANALOG_TYPE_LPF1 0 /* LPF 1 pole */
60 #define ZYN_FILTER_ANALOG_TYPE_HPF1 1 /* HPF 1 pole */
61 #define ZYN_FILTER_ANALOG_TYPE_LPF2 2 /* LPF 2 poles */
62 #define ZYN_FILTER_ANALOG_TYPE_HPF2 3 /* HPF 2 poles */
63 #define ZYN_FILTER_ANALOG_TYPE_BPF2 4 /* BPF 2 poles */
64 #define ZYN_FILTER_ANALOG_TYPE_NF2 5 /* NOTCH 2 poles */
65 #define ZYN_FILTER_ANALOG_TYPE_PKF2 6 /* PEAK (2 poles) */
66 #define ZYN_FILTER_ANALOG_TYPE_LSH2 7 /* Low Shelf - 2 poles */
67 #define ZYN_FILTER_ANALOG_TYPE_HSH2 8 /* High Shelf - 2 poles */
68 #define ZYN_FILTER_ANALOG_TYPES_COUNT 9
70 #define ZYN_FILTER_SV_TYPE_LOWPASS 0
71 #define ZYN_FILTER_SV_TYPE_HIGHPASS 1
72 #define ZYN_FILTER_SV_TYPE_BANDPASS 2
73 #define ZYN_FILTER_SV_TYPE_NOTCH 3
74 #define ZYN_FILTER_SV_TYPES_COUNT 4
76 #define ZYN_OSCILLATOR_BASE_FUNCTION_SINE 0
77 #define ZYN_OSCILLATOR_BASE_FUNCTION_TRIANGLE 1
78 #define ZYN_OSCILLATOR_BASE_FUNCTION_PULSE 2
79 #define ZYN_OSCILLATOR_BASE_FUNCTION_SAW 3
80 #define ZYN_OSCILLATOR_BASE_FUNCTION_POWER 4
81 #define ZYN_OSCILLATOR_BASE_FUNCTION_GAUSS 5
82 #define ZYN_OSCILLATOR_BASE_FUNCTION_DIODE 6
83 #define ZYN_OSCILLATOR_BASE_FUNCTION_ABS_SINE 7
84 #define ZYN_OSCILLATOR_BASE_FUNCTION_PULSE_SINE 8
85 #define ZYN_OSCILLATOR_BASE_FUNCTION_STRETCH_SINE 9
86 #define ZYN_OSCILLATOR_BASE_FUNCTION_CHIRP 10
87 #define ZYN_OSCILLATOR_BASE_FUNCTION_ABS_STRETCH_SINE 11
88 #define ZYN_OSCILLATOR_BASE_FUNCTION_CHEBYSHEV 12
89 #define ZYN_OSCILLATOR_BASE_FUNCTION_SQRT 13
90 #define ZYN_OSCILLATOR_BASE_FUNCTIONS_COUNT 14
92 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_NONE 0
93 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_ATAN 1
94 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_ASYM1 2
95 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_POW 3
96 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_SINE 4
97 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_QUANTISIZE 5
98 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_ZIGZAG 6
99 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_LIMITER 7
100 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_UPPER_LIMITER 8
101 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_LOWER_LIMITER 9
102 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_INVERSE_LIMITER 10
103 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_CLIP 11
104 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_ASYM2 12
105 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_POW2 13
106 #define ZYN_OSCILLATOR_WAVESHAPE_TYPE_SIGMOID 14
107 #define ZYN_OSCILLATOR_WAVESHAPE_TYPES_COUNT 15
109 #define ZYN_OSCILLATOR_SPECTRUM_ADJUST_TYPE_NONE 0
110 #define ZYN_OSCILLATOR_SPECTRUM_ADJUST_TYPE_POW 1
111 #define ZYN_OSCILLATOR_SPECTRUM_ADJUST_TYPE_THERSHOLD_DOWN 2
112 #define ZYN_OSCILLATOR_SPECTRUM_ADJUST_TYPE_THERSHOLD_UP 3
113 #define ZYN_OSCILLATOR_SPECTRUM_ADJUST_TYPES_COUNT 4
119 } /* Adjust editor indent */
123 { /* Adjust editor indent */
129 #endif /* #ifndef COMMON_H__B9D0FFDE_1F2E_4378_9040_C1B0802DDC9E__INCLUDED */