Expose voice detune parameter of the lv2 plugin
[zyn.git] / resonance.h
blob3c2e02d4381950d8282e56b5b5bcfbf9fae481e4
1 /*
2 ZynAddSubFX - a software synthesizer
4 Resonance.h - Resonance
5 Copyright (C) 2002-2005 Nasca Octavian Paul
6 Author: Nasca Octavian Paul
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of version 2 of the GNU General Public License
10 as published by the Free Software Foundation.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License (version 2) for more details.
17 You should have received a copy of the GNU General Public License (version 2)
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef RESONANCE_H
23 #define RESONANCE_H
25 #define N_RES_POINTS 256
27 struct zyn_resonance
29 bool enabled; // whether resonance is enabled
30 unsigned char points[N_RES_POINTS]; // how many points define the resonance function
31 unsigned char maxdB; // how many dB the signal may be amplified
32 unsigned char centerfreq; // the center frequency of the res. func.
33 unsigned char octavesfreq; // and the number of octaves
34 unsigned char protectthefundamental; // the fundamental (1-st harmonic) is not damped, even it resonance function is low
36 float center; // center frequency(relative)
37 float bw; // bandwidth(relative)
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 #if 0
44 } /* Adjust editor indent */
45 #endif
47 void
48 zyn_resonance_init(
49 struct zyn_resonance * resonance_ptr);
51 void
52 zyn_resonance_apply(
53 struct zyn_resonance * resonance_ptr,
54 int n,
55 struct zyn_fft_freqs * fftdata_ptr,
56 float freq);
58 #if 0
59 { /* Adjust editor indent */
60 #endif
61 #ifdef __cplusplus
62 } /* extern "C" */
63 #endif
65 #if 0
66 void setpoint(int n,unsigned char p);
67 void smooth();
68 void interpolatepeaks(int type);
69 void randomize(int type);
72 REALTYPE getfreqpos(REALTYPE freq);
73 REALTYPE getfreqx(REALTYPE x);
74 REALTYPE getfreqresponse(REALTYPE freq);
75 REALTYPE getcenterfreq();
76 REALTYPE getoctavesfreq();
78 void set_center(float center);
79 void set_badnwidth(float bandwidth);
80 #endif
82 #endif