LEXverb.h
2.96 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#pragma once
#ifndef __LEXVERB_H
#define __LEXVERB_H
#include <stdio.h>
#define NUM_OF_AP_SECTS 10
#define NUM_OF_DELAY_SECTS 2
#define NUM_OF_SECTS NUM_OF_AP_SECTS+NUM_OF_DELAY_SECTS
#define SAMPLE_RATE 44100
#define SAMPLES_PER_MILLISEC SAMPLE_RATE/1000
#define ms *SAMPLES_PER_MILLISEC
#define BUFF_SIZE 512
/*-------------------------------------------------------------------------------
|\ dry_gain
left in>--------------------------------------------------------| >------|
| |/ /---\
| | + |--> left out
| ----- ----- /---\ ----- ----- ----- |\ \---/
|----|AP0|---|AP1|---| + |---|AP2|---|AP3|---|AP4|-----| >------|
----- ----- \---/ ----- ----- ----- | |/ wet_gain
\ lrgain/| ------ |
\ /---< |---|dly0|--------|
\/ \| ------
/\ /| ------
/ \---< |---|dly1|--------|
/ rlgain\| ------ |
----- ----- /---\ ----- ----- ----- | |\ wet_gain
|----|AP5|---|AP6|---| + |---|AP7|---|AP8|---|AP9|-----| >------|
| ----- ----- \---/ ----- ----- ----- |/ /---\
| | + |--> right out
| |\ \---/
right in>--------------------------------------------------------| >------|
|/ dry_gain
---------------------------------------------------------------------------------*/
const struct {int length; float coef; } LEX_REVERB_PARMS[ NUM_OF_SECTS ] = {
#if 1
{ 50.00 ms,0.750 }, /* AP0 */
{ 44.50 ms,0.720 }, /* AP1 */
{ 37.37 ms,0.691 }, /* AP2 */
{ 24.85 ms,0.649 }, /* AP3 */
{ 19.31 ms,0.662 }, /* AP4 */
{ 49.60 ms,0.750 }, /* AP5 */
{ 45.13 ms,0.720 }, /* AP6 */
{ 35.25 ms,0.691 }, /* AP7 */
{ 28.17 ms,0.649 }, /* AP8 */
{ 15.59 ms,0.646 }, /* AP9 */
{ 8.71 ms,0.646 }, /* left into right delay, lrgain */
{ 12.05 ms,0.666 } }; /* right into left delay, rlgain */
#else
{ 1,0.5 }, /* AP0 */
{ 1,0.5 }, /* AP1 */
{ 1,0.5 }, /* AP2 */
{ 1,0.5 }, /* AP3 */
{ 1,0.5 }, /* AP4 */
{ 1,0.5 }, /* AP5 */
{ 1,0.5 }, /* AP6 */
{ 1,0.5 }, /* AP7 */
{ 1,0.5 }, /* AP8 */
{ 1,0.5 }, /* AP9 */
{ 1,0.5 }, /* left into right delay, lrgain */
{ 1,0.5 } }; /* right into left delay, rlgain */
#endif
/******* exported prototypes *********/
int do_reverb(FILE *in_file, FILE *out_file, float *wet, float *dry, int stereo);
#endif