forked from striso/striso-control-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
synth.h
61 lines (51 loc) · 1.5 KB
/
synth.h
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
55
56
57
58
59
60
61
/**
* Copyright (C) 2019 Piers Titus van der Torren
*
* This file is part of Striso Control.
*
* Striso Control is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* Striso Control is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* Striso Control. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SYNTH_H_
#define SYNTH_H_
#include "ch.h"
#include "hal.h"
#include "config.h"
#include "midi.h"
#include "codec.h"
#define VOICECOUNT 6
typedef struct struct_synth_interface {
float* acc_abs;
float* acc_x;
float* acc_y;
float* acc_z;
float* rot_x;
float* rot_y;
float* rot_z;
float* pedal;
float* note[MAX_VOICECOUNT];
float* pres[MAX_VOICECOUNT];
float* vpres[MAX_VOICECOUNT];
float* but_x[MAX_VOICECOUNT];
float* but_y[MAX_VOICECOUNT];
} synth_interface_t;
#ifdef USE_INTERNAL_SYNTH
extern synth_interface_t synth_interface;
void start_synth_thread(void);
#endif
int synth_message(int size, int* msg);
void synth_tick(void);
void midi_config(void);
void synth_control_init(void);
void clear_dead_notes(void);
extern float volume;
#endif /* SYNTH_H_ */