Rev 2157 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1528 | jag | 1 | /* |
2 | * delay.h |
||
2302 | jag | 3 | * DIN Is Noise is copyright (c) 2006-2025 Jagannathan Sampath |
1713 | jag | 4 | * DIN Is Noise is released under GNU Public License 2.0 |
1528 | jag | 5 | * For more information, please visit https://dinisnoise.org/ |
6 | */ |
||
7 | |||
8 | #ifndef __delay |
||
9 | #define __delay |
||
10 | |||
11 | #include "multi_curve.h" |
||
12 | #include "solver.h" |
||
13 | #include "listeners.h" |
||
14 | |||
15 | struct delay { // 1 channel delay |
||
16 | |||
17 | int nsamples; |
||
2157 | jag | 18 | float* samples; |
19 | int id; |
||
1528 | jag | 20 | |
21 | float* fbk; |
||
22 | float* vol; |
||
23 | |||
24 | float msecs; // delay time |
||
25 | |||
26 | // feedback and volume are beziers solved into fbk and vol |
||
27 | std::string fbk_fname, vol_fname; |
||
28 | multi_curve fbk_crv, vol_crv; |
||
29 | delay_listener fbk_lis, vol_lis; |
||
30 | solver fbk_sol, vol_sol; |
||
31 | |||
32 | delay (float t, const std::string& fn, const std::string& vn); |
||
33 | ~delay (); |
||
34 | void zero (); |
||
35 | void prep_buffer (); |
||
36 | void operator() (float* out, int nz, float fdr); |
||
37 | void set (float t); |
||
38 | void get (float& t); |
||
39 | void setup (); |
||
40 | |||
41 | }; |
||
42 | |||
43 | extern delay left_delay, right_delay; |
||
44 | #endif |
||
45 | |||
46 | |||
47 |