2 ZynAddSubFX - a software synthesizer
4 FormantFilter.h - formant filter
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
23 #ifndef FORMANT_FILTER_H
24 #define FORMANT_FILTER_H
33 class FormantFilter
: public Filter_
39 void init(float sample_rate
, FilterParams
*pars
);
40 void filterout(float *smp
);
41 void setfreq(float frequency
);
42 void setfreq_and_q(float frequency
,float q_
);
47 AnalogFilter m_formants
[FF_MAX_FORMANTS
];
48 float m_inbuffer
[SOUND_BUFFER_SIZE
];
49 float m_tmpbuf
[SOUND_BUFFER_SIZE
];
51 struct zyn_formant m_formantpar
[FF_MAX_VOWELS
][FF_MAX_FORMANTS
];
52 struct zyn_formant m_currentformants
[FF_MAX_FORMANTS
];
56 } m_sequence
[FF_MAX_SEQUENCE
];
58 float m_oldformantamp
[FF_MAX_FORMANTS
];
66 float m_formantslowness
;
68 float m_vowelclearness
;
69 float m_sequencestretch
;
71 void setpos(float input
);