-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEffects.h
77 lines (69 loc) · 1.46 KB
/
Effects.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
#ifndef __Effects__
#define __Effects__
#include "Track.h"
class Effect
{
protected :
double start_;
double duration_;
double power_;
public :
Effect();
Effect( const double &start,
const double &duration,
const double &power);
~Effect();
void setStart(const double &value);
void setDuration(const double &value);
void setPower(const double &value);
void setAll( const double &start_value,
const double &duration_value,
const double &power_value);
double getStart() const;
double getDuration() const;
double getPower() const;
virtual void applyEffect(Track &sample) const = 0;
};
class Echo : public Effect
{
double delay_;
public :
Echo( const double &start,
const double &duration,
const double &power,
const double &delay);
void applyEffect(Track &sample) const;
};
class Tremolo : public Effect
{
double frequency_;
public :
Tremolo(const double &start,
const double &duration,
const double &power,
const double &frequency);
void applyEffect(Track &sample) const;
};
class Flanger : public Effect
{
double frequency_;
double delay_;
public :
Flanger(const double &start,
const double &duration,
const double &power,
const double &frequency,
const double &delay);
void applyEffect(Track &sample) const;
};
class Distortion : public Effect
{
double level_;
public :
Distortion( const double &start,
const double &duration,
const double &power,
const double &level);
void applyEffect(Track &sample) const;
};
#endif