AEKeymap.c++
1.66 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
/*****************************************************************************
* File: AEKeymap.c++
*
* AEKeymap Class Implementations
*
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "Assets.h"
#include "Mgrs.h"
/*****************************************************************************
*
* Initialization Routines
*
****************************************************************************/
AEKeymap::AEKeymap()
{
classType = AL_KEYMAP_CLASS;
velocityMin = 0;
velocityMax = 127;
keyMin = 0;
keyMax = 127;
keyBase = 60; // middle C
detune = 0;
assert(theU64Dev->AllocHdwr(this,AL_KEYMAP_CLASS) == 0);
}
AEKeymap::~AEKeymap()
{
theU64Dev->DeallocHdwr(this);
}
/*****************************************************************************
*
* Asset's Methods
*
****************************************************************************/
void AEKeymap::SetVelMin(int vel)
{
velocityMin = vel;
}
void AEKeymap::SetVelMax(int vel)
{
velocityMax = vel;
}
void AEKeymap::SetKeyMin(int key)
{
keyMin = key;
}
void AEKeymap::SetKeyMax(int key)
{
keyMax = key;
}
void AEKeymap::SetKeyBase(int key)
{
keyBase = key;
}
void AEKeymap::SetDetune(int d)
{
detune = d;
}
int AEKeymap::GetVelMin(void)
{
return velocityMin;
}
int AEKeymap::GetVelMax(void)
{
return velocityMax;
}
int AEKeymap::GetKeyMin(void)
{
return keyMin;
}
int AEKeymap::GetKeyMax(void)
{
return keyMax;
}
int AEKeymap::GetKeyBase(void)
{
return keyBase;
}
int AEKeymap::GetDetune(void)
{
return detune;
}