AeKeymap.c++
2.15 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*****************************************************************************
* File: AEKeymap.c++
*
* AEKeymap Class Implementations
*
****************************************************************************/
#include <assert.h>
#include "AeAsset.h"
AeKeymap::AeKeymap(const char * name,
int velMin, int velMax,
int keyMin, int keyMax, int keyBase,
int detune) : AeAsset (name, kKeymapType);
{
fVelocityMin = velMin;
fVelocityMax = velMax;
fKeyMin = keyMin;
fKeyMax = keyMax;
fKeyBase = keyBase;
fDetune = detune;
}
AeKeymap::~AeKeymap(void)
{
}
void
AeKeymap::SetVelMinProc(AeAsset * asset, int vel)
{
assert (asset != NULL);
((AeKeymapAsset *)asset)->SetVelMin (vel);
}
void
AeKeymap::SetVelMaxProc(AeAsset * asset, int vel)
{
assert (asset != NULL);
((AeKeymapAsset *)asset)->SetVelMin (vel);
}
void
AeKeymap::SetKeyMinProc(AeAsset * asset, int key)
{
assert (asset != NULL);
((AeKeymapAsset *)asset)->SetKeyMin (key);
}
void
AeKeymap::SetKeyMaxProc(AeAsset * asset, int key)
{
assert (asset != NULL);
((AeKeymapAsset *)asset)->SetKeyMax (key);
}
void
AeKeymap::SetKeyBaseProc(AeAsset * asset, int key)
{
assert (asset != NULL);
((AeKeymapAsset *)asset)->SetKeyBase (key);
}
void
AeKeymap::SetDetuneProc(AeAsset * asset, int detune)
{
assert (asset != NULL);
((AeKeymapAsset *)asset)->SetDetune (detune);
}
int
AeKeymap::GetVelMinProc(AeAsset * asset)
{
assert (asset != NULL);
return ((AeKeymapAsset *)asset)->GetVelMin ();
}
int
AeKeymap::GetVelMaxProc(AeAsset * asset)
{
assert (asset != NULL);
return ((AeKeymapAsset *)asset)->GetVelMax ();
}
int
AeKeymap::GetKeyMinProc(AeAsset * asset)
{
assert (asset != NULL);
return ((AeKeymapAsset *)asset)->GetKeyMin ();
}
int
AeKeymap::GetKeyMaxProc(AeAsset * asset)
{
assert (asset != NULL);
return ((AeKeymapAsset *)asset)->GetKeyMin ();
}
int
AeKeymap::GetKeyBaseProc(AeAsset * asset)
{
assert (asset != NULL);
return ((AeKeymapAsset *)asset)->GetKeyMax ();
}
int
AeKeymap::GetDetuneProc(AeAsset * asset)
{
assert (asset != NULL);
return ((AeKeymapAsset *)asset)->GetDetune ();
}