Rev 1808 | Rev 1858 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1808 | Rev 1823 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | * For more information, please visit https://dinisnoise.org/
|
5 | * For more information, please visit https://dinisnoise.org/
|
6 | */
|
6 | */
|
7 | #ifndef __modulator__
|
7 | #ifndef __modulator__
|
8 | #define __modulator__
|
8 | #define __modulator__
|
9 | 9 | ||
10 | #include "beat2value.h"
|
- | |
11 | #include "chrono.h"
|
10 | #include "chrono.h"
|
- | 11 | #include "mod_params.h"
|
|
12 | 12 | ||
13 | #include <fstream>
|
13 | #include <fstream>
|
14 | #include <string>
|
14 | #include <string>
|
15 | 15 | ||
16 | struct multi_curve; |
16 | struct multi_curve; |
17 | struct drone; |
- | |
18 | - | ||
19 | struct mod_params { |
- | |
20 | - | ||
21 | float depth; |
- | |
22 | beat2value bv; // rate |
- | |
23 | - | ||
24 | float result; |
- | |
25 | - | ||
26 | // drone modulation direction
|
- | |
27 | //
|
- | |
28 | enum {VERTICAL, HORIZONTAL, VELOCITY, ACCELERATION}; // possible modulation directions |
- | |
29 | int id; |
- | |
30 | static point<float> vertical, horizontal; // constant directions |
- | |
31 | float *dirx, *diry; // current modulation direction |
- | |
32 | - | ||
33 | void setdir (int i, float* x, float* y) { |
- | |
34 | id = i; |
- | |
35 | dirx = x; |
- | |
36 | diry = y; |
- | |
37 | }
|
- | |
38 | - | ||
39 | void calcdir (drone& d); |
- | |
40 | - | ||
41 | float initial; // for microtonal range modulation |
- | |
42 | - | ||
43 | mod_params (multi_curve* c, int d, point<float>& p, const std::string& n = "noname"); |
- | |
44 | void calc (double dt); |
- | |
45 | void clear (); |
- | |
46 | - | ||
47 | }; |
- | |
48 | 17 | ||
49 | struct modulator { |
18 | struct modulator { |
50 | 19 | ||
51 | enum {AM, FM}; |
20 | enum {AM, FM}; |
52 | 21 |