-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnvelopeParameter.java
More file actions
44 lines (34 loc) · 950 Bytes
/
EnvelopeParameter.java
File metadata and controls
44 lines (34 loc) · 950 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
41
42
43
44
/**
Enum that represents the parameters (attack, decay, sustain, release)
and their minimum and maximum values
**/
public enum EnvelopeParameter {
ATTACK (0.0, 10.0), // Time (Seconds)
DECAY (0.0, 10.0), // Time (Seconds)
SUSTAIN (0.0, 100.0),// Relative amplitude
RELEASE (0.0, 10.0); // Time (Seconds)
private final double maxValue;
private final double minValue;
/**
Constructor for a parameter
@param minValue Minimum value that the parameter is allowed have
@param maxValue Maximum value that the parameter is allowed have
**/
EnvelopeParameter(double minValue, double maxValue) {
this.maxValue = maxValue;
this.minValue = minValue;
}
// Getters
/**
@return The maximum value that the parameter is allowed have
**/
public double getMaxValue() {
return this.maxValue;
}
/**
@return The minimum value that the parameter is allowed have
**/
public double getMinValue() {
return this.minValue;
}
}