-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtesttable.cpp
More file actions
40 lines (35 loc) · 815 Bytes
/
testtable.cpp
File metadata and controls
40 lines (35 loc) · 815 Bytes
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
#include <stdio.h>
#include "CDSPModGammaEnv.h"
int main()
{
vox :: CDSPModGammaEnv env;
const double SampleRate = 44100;
const double Time = 0.050;
const int SteepCount = 10;
const int z = (int) floor( Time * 1.5 * SampleRate );
double tbl[ SteepCount ][ z ];
int i;
int j;
for( j = 0; j < SteepCount; j++ )
{
env.Attack = Time;
env.Release = Time;
env.AttackDelay = 0.25 * j / ( SteepCount - 1 );
env.ReleaseDelay = 0.25 * j / ( SteepCount - 1 );
env.IsInverse = false;
env.init( SampleRate );
env.clear( 0.25 );
for( i = 0; i < z; i++ )
{
tbl[ j ][ i ] = env.process( 1.0 );
}
}
for( i = 0; i < z; i += 1 )
{
for( j = 0; j < SteepCount - 1; j++ )
{
printf( "%f\t", tbl[ j ][ i ]);
}
printf( "%f\n", tbl[ j ][ i ]);
}
}