Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1528 | jag | 1 | /* |
2 | * rose_milker.h |
||
2302 | jag | 3 | * DIN Is Noise is copyright (c) 2006-2025 Jagannathan Sampath |
1528 | jag | 4 | * For more information, please visit https://dinisnoise.org/ |
5 | */ |
||
6 | |||
7 | #ifndef __ROSE_MILKER |
||
8 | #define __ROSE_MILKER |
||
9 | |||
10 | #include "spinner.h" |
||
11 | #include "plugin.h" |
||
12 | #include "point.h" |
||
13 | #include "curve_editor.h" |
||
14 | #include "curve_library.h" |
||
15 | #include "funktion.h" |
||
16 | #include "constant_radius.h" |
||
17 | #include "sine.h" |
||
18 | #include "cosine.h" |
||
19 | #include "custom_periodic.h" |
||
20 | #include "ui_sin_cos_radius.h" |
||
21 | |||
22 | #include <vector> |
||
23 | |||
24 | struct rose_milker : plugin, curve_listener, ui_sin_cos_radius_listener { |
||
25 | // |
||
26 | // turns rose curve into waveform |
||
27 | // |
||
28 | // R = sin (K * theta) |
||
29 | // |
||
30 | // K = N / D |
||
31 | // |
||
32 | // |
||
33 | |||
1540 | jag | 34 | // for dealing with custom/standard sin, cos, radius (ignored) |
1528 | jag | 35 | ui_sin_cos_radius scr; |
36 | void sin_cos_radius_optioned (); |
||
37 | void sin_cos_radius_edited (); |
||
38 | |||
39 | point<float> center; |
||
40 | int N; |
||
41 | int D; |
||
42 | float K; |
||
43 | int num_points; |
||
1540 | jag | 44 | struct { |
45 | float start, end; |
||
46 | } angle; |
||
1528 | jag | 47 | |
48 | float theta; |
||
49 | float dtheta; |
||
50 | |||
1540 | jag | 51 | struct spinners { |
52 | spinner<int> N; |
||
53 | spinner<int> D; |
||
54 | spinner<int> num_points; |
||
55 | struct { |
||
56 | spinner<float> start; |
||
57 | spinner<float> end; |
||
58 | } angle; |
||
59 | } sp; |
||
1528 | jag | 60 | |
61 | rose_milker (); |
||
62 | ~rose_milker (); |
||
63 | void load_params (); |
||
64 | void save_params (); |
||
65 | |||
66 | void setup (); |
||
67 | void render (); |
||
68 | |||
69 | }; |
||
70 | |||
71 | extern rose_milker rosemilker; |
||
72 | |||
73 | #endif |
||
74 | |||
75 | |||
76 |