Subversion Repositories DIN Is Noise

Rev

Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1528 jag 1
/*
2
* listeners.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 __LISTENERS
9
#define __LISTENERS
10
 
11
#include "curve_listener.h"
12
 
13
struct din;
14
struct ui;
15
struct instrument;
16
 
17
struct wave_listener : curve_listener {
18
  enum {MICROTONAL_KEYBOARD, KEYBOARD_KEYBOARD, DRONE, MONDRIAN};
19
  int which;
20
  wave_listener (int w) : which (w) {}
21
  void edited (curve_editor* ed, int i);
22
};
23
 
24
struct beat2value;
25
struct beat2value_listener : curve_listener {
26
  beat2value* bv;
27
  beat2value_listener ();
28
  void edited (curve_editor* ed, int i);
29
  void set (beat2value* _bv) {bv = _bv;}
30
};
31
 
32
CURVE_LISTENER (drone_mod_lis)
33
CURVE_LISTENER (morse_code_listener)
34
 
35
struct solver;
36
struct delay;
37
struct delay_listener : curve_listener {
38
  delay* dly;
39
  solver* sol;
40
  float* result;
41
  delay_listener () : dly(0), sol (0), result (0) {}
42
  delay_listener& operator() (delay* d, solver* s, float* r) { dly = d; sol = s; result = r; return *this;}
43
  void edited (curve_editor* ed, int i);
44
};
45
 
46
struct attack_listener : curve_listener {
47
  instrument* inst;
48
  void edited (curve_editor* ed, int i);
49
};
50
 
51
struct decay_listener : curve_listener {
52
  instrument* inst;
53
  void edited (curve_editor* ed, int i);
54
};
55
 
56
CURVE_LISTENER (velocity_listener)
57
CURVE_LISTENER (range_wh_lis)
58
CURVE_LISTENER (pitch_vol_lis)
59
CURVE_LISTENER (pomo_lis)
60
CURVE_LISTENER (noise_interp_lis)
61
CURVE_LISTENER (drone_pend_ed_lis)
62
 
63
#endif