Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gsloscillator.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __GSL_OSCILLATOR_H__
3 #define __GSL_OSCILLATOR_H__
4 
5 #include <bse/gsldefs.hh>
6 #include <bse/gslosctable.hh>
7 
8 
9 /* --- structures --- */
10 typedef struct
11 {
12  GslOscTable *table;
13  guint exponential_fm : 1;
14  gfloat fm_strength; /* linear: 0..1, exponential: n_octaves */
15  gfloat self_fm_strength; /* 0..1 */
16  gfloat phase; /* -0.5..+0.5 */
17  gfloat cfreq; /* for ifreq == NULL */
18  gfloat pulse_width; /* 0..1 */
19  gfloat pulse_mod_strength; /* 0..0.5 */
20  double transpose_factor; /* -132..0..+132 */
21  gint fine_tune; /* -100..+100 */
22 } GslOscConfig;
23 typedef struct
24 {
25  GslOscConfig config;
26  guint last_mode;
27  guint32 cur_pos, last_pos;
28  gfloat last_sync_level;
29  gdouble last_freq_level;
30  gfloat last_pwm_level;
31  GslOscWave wave;
32  /* pwm */
33  guint32 pwm_offset;
34  gfloat pwm_max, pwm_center;
35 } GslOscData;
36 
37 
38 /* --- Oscillator --- */
39 void gsl_osc_config (GslOscData *osc,
40  GslOscConfig *config);
41 void gsl_osc_reset (GslOscData *osc);
42 void gsl_osc_process (GslOscData *osc,
43  guint n_values,
44  const gfloat *ifreq,
45  const gfloat *imod,
46  const gfloat *isync,
47  gfloat *mono_out,
48  gfloat *sync_out);
49 void gsl_osc_process_pulse (GslOscData *osc,
50  guint n_values,
51  const gfloat *ifreq,
52  const gfloat *imod,
53  const gfloat *isync,
54  const gfloat *ipwm,
55  gfloat *mono_out,
56  gfloat *sync_out);
57 
58 
59 
60 
61 #endif /* __GSL_OSCILLATOR_H__ */
Definition: gslosctable.hh:31
Definition: gsloscillator.hh:23
Definition: gsloscillator.hh:10
Definition: gslosctable.hh:24