-
Notifications
You must be signed in to change notification settings - Fork 18
/
formant_corrector.h
42 lines (36 loc) · 938 Bytes
/
formant_corrector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef TALENTENEDHACK_FORMANT_CORRECTOR_H
#define TALENTENEDHACK_FORMANT_CORRECTOR_H
#include <math.h>
#include <stdlib.h>
#include "circular_buffer.h"
// VARIABLES FOR FORMANT CORRECTOR
typedef struct {
float k;
float b;
float c;
float rb;
float rc;
float sig;
float smooth;
float* buff;
} FormantLevel;
typedef struct {
int* p_Fcorr;
float* p_Fwarp;
int ford;
float falph;
float flamb;
float frlamb;
FormantLevel* flevels;
float fhp;
float flp;
float flpa;
float fmute;
float fmutealph;
} FormantCorrector;
void FormantCorrectorInit(FormantCorrector * fcorrector, unsigned long SampleRate, int cbsize);
void RemoveFormants(FormantCorrector * fcorrector, CircularBuffer* buffer, float tf);
void UpdateFormantWarp(FormantCorrector* fcorrector);
float AddFormants(FormantCorrector * fcorrector, float in, long int writepoint);
void CleanupFormantCorrector(FormantCorrector * fcorrector);
#endif