-
Notifications
You must be signed in to change notification settings - Fork 1
/
TGEffectGrace.h
100 lines (77 loc) · 1.91 KB
/
TGEffectGrace.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
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
#ifndef TG_EFFECT_GRACE_H
#define TG_EFFECT_GRACE_H
#include "TGFactory.h"
#include "TGDuration.h"
#include "TGVelocities.h"
#define TGEffectGrace_TRANSITION_NONE 0
#define TGEffectGrace_TRANSITION_SLIDE 1
#define TGEffectGrace_TRANSITION_BEND 2
#define TGEffectGrace_TRANSITION_HAMMER 3
class TGEffectGrace {
protected:
int fret;
int duration;
int dynamic;
int transition;
bool onBeat;
bool dead;
public:
TGEffectGrace() {
fret = 0;
duration = 1;
dynamic = TGVelocities_DEFAULT;
transition = TGEffectGrace_TRANSITION_NONE;
onBeat = false;
dead = false;
}
bool isDead() {
return dead;
}
void setDead(bool aDead) {
dead = aDead;
}
int getDuration() {
return duration;
}
void setDuration(int aDuration) {
duration = aDuration;
}
int getDynamic() {
return dynamic;
}
void setDynamic(int aDynamic) {
dynamic = aDynamic;
}
int getFret() {
return fret;
}
void setFret(int aFret) {
fret = aFret;
}
bool isOnBeat() {
return onBeat;
}
void setOnBeat(bool aOnBeat) {
onBeat = aOnBeat;
}
int getTransition() {
return transition;
}
void setTransition(int aTransition) {
transition = aTransition;
}
int getDurationTime(){
return (int)((TGDuration_QUARTER_TIME / 16.00 ) * getDuration());
}
TGEffectGrace *clone(TGFactory *factory){
TGEffectGrace *effect = factory->newEffectGrace();
effect->setFret(getFret());
effect->setDuration(getDuration());
effect->setDynamic(getDynamic());
effect->setTransition(getTransition());
effect->setOnBeat(isOnBeat());
effect->setDead(isDead());
return effect;
}
};
#endif