-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSynth.h
More file actions
54 lines (45 loc) · 1.12 KB
/
Synth.h
File metadata and controls
54 lines (45 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Main Synth class
*
* Description: Puts all together. Oscillators, mixer, filter.
*
* Author: Pavel Husa
*/
#ifndef SYNTH_ENGINE
#define SYNTH_ENGINE
#include <Arduino.h>
#include "Oscillator.h"
#include "OscillatorTypes.h"
class Synth {
//triangleOscillator syn_osc1;
//sawOscillator syn_osc1;
//invSawOscillator syn_osc1;
//pulseOscillator syn_osc1;
sineOscillator syn_osc1;
//squareOscillator syn_osc1;
//pulseOscillator syn_osc1;
//noiseGenerator syn_osc1;
sineOscillator syn_osc2;
//triangleOscillator syn_osc2;
//sawOscillator syn_osc2;
//invSawOscillator syn_osc2;
//pulseOscillator syn_osc2;
//squareOscillator syn_osc2;
squareOscillator sub_osc;
uint16_t mix();
void synthInit();
char syn_state;
unsigned char syn_channel;
unsigned char syn_note;
unsigned char syn_velocity;
public:
Synth();
uint16_t play();
//sineOscillator test_osc;
//void pitchBend(byte channel, int bend);
void controlChange(byte channel, byte number, byte value);
void noteOn(byte ch, byte n, byte v);
void noteOff(byte ch, byte n, byte v);
void updateControl();
};
#endif