-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathreverb.cpp
48 lines (42 loc) · 826 Bytes
/
reverb.cpp
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
#include "reverb.h"
#include "magic.h"
int
ReverbCC::continuous_control( int parm5, int parm6, int parm7, int value, unsigned char *cmd ) {
cmd[2] = 0x06;
memcpy( cmd + 3, model, 2 );
cmd[5] = parm5;
cmd[6] = parm6;
cmd[7] = parm7;
unsigned short magic = magic_values[value];
cmd[9] = magic & 0xff;
cmd[10] = (magic >> 8) & 0xff;
return 0;
}
int
ReverbCC::dispatch( int cc, int value, unsigned char *cmd ) {
switch ( cc ) {
case 59:
// Level
return cc59( value, cmd );
break;
case 60:
// Decay
return cc60( value, cmd );
break;
case 61:
// Dwell
return cc61( value, cmd );
break;
case 62:
// Diffusion
return cc62( value, cmd );
break;
case 63:
// Tone
return cc63( value, cmd );
break;
default:
return 0;
break;
}
}