-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathreverb.h
57 lines (44 loc) · 1.67 KB
/
reverb.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// -*-c++-*-
#ifndef _REVERB_H
#define _REVERB_H
#include <cstring>
class Mustang;
class ReverbCC {
protected:
Mustang * amp;
unsigned char model[2];
unsigned char slot;
int continuous_control( int parm5, int parm6, int parm7, int value, unsigned char *cmd );
public:
ReverbCC( Mustang * theAmp, const unsigned char *model, const unsigned char theSlot ) :
amp(theAmp),
slot(theSlot)
{
memcpy( this->model, model, 2 );
}
int dispatch( int cc, int value, unsigned char *cmd );
const unsigned char *getModel( void ) { return model;}
const unsigned char getSlot( void ) { return slot;}
private:
// Level
int cc59( int value, unsigned char *cmd ) { return continuous_control( 0x00, 0x00, 0x0b, value, cmd );}
// Decay
int cc60( int value, unsigned char *cmd ) { return continuous_control( 0x01, 0x01, 0x0b, value, cmd );}
// Dwell
int cc61( int value, unsigned char *cmd ) { return continuous_control( 0x02, 0x02, 0x0b, value, cmd );}
// Diffusion
int cc62( int value, unsigned char *cmd ) { return continuous_control( 0x03, 0x03, 0x0b, value, cmd );}
// Tone
int cc63( int value, unsigned char *cmd ) { return continuous_control( 0x04, 0x04, 0x0b, value, cmd );}
};
class NullReverbCC : public ReverbCC {
public:
NullReverbCC( Mustang * theAmp, const unsigned char *model, const unsigned char theSlot ) : ReverbCC(theAmp,model,theSlot) {}
private:
int cc59( int value, unsigned char *cmd ) { return -1;}
int cc60( int value, unsigned char *cmd ) { return -1;}
int cc61( int value, unsigned char *cmd ) { return -1;}
int cc62( int value, unsigned char *cmd ) { return -1;}
int cc63( int value, unsigned char *cmd ) { return -1;}
};
#endif