-
Notifications
You must be signed in to change notification settings - Fork 22
/
VoiceTransient.h
49 lines (27 loc) · 1.03 KB
/
VoiceTransient.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
/*****************************************************************************
VoiceTransient.h
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "dsp/Ramp.h"
#include <cstddef>
class VoiceTransient
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
public:
VoiceTransient () = default;
~VoiceTransient () = default;
void trigger ();
void stop ();
void set_speed (float step_spl);
template <typename T>
float process (const T & sample_1, const T & sample_2, float mix);
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
private:
bool _active_flag = false;
float _pos = 0.f;
float _step_spl = 1.f;
dsp::Ramp <256>
_ramp = {1.f};
};
#include "VoiceTransient.hpp"