-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommonDefs.h
66 lines (52 loc) · 1.28 KB
/
commonDefs.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
62
63
64
65
66
/**
* @file dspReverbModel.h
* @author Nahum Budin
* @date 25_Jan-2021
* @version 1.1
* 1. Code refactoring and notaion.
*
* @History 30-Oct-2019 1.0
*
* @brief Common definitions
*
*/
#ifndef _COMMON_DEFS
#define _COMMON_DEFS
#include <unistd.h> // sleep
#include "libAdjHeartModSynth_2.h"
// Control sub samplig rate divider
#define _CONTROL_SUB_SAMPLING 16
#define _OSC_MAX_FREQUENCY 12543.8539514160f // MIDI G11
#define _OSC_MIN_FREQUENCY 0.1f // LFO 8.1757989156f // MIDI C1
// Must be no more than 8
#define _MAX_STAGE_NUM 8
#if (_MAX_STAGE_NUM > 8)
Error : Must be no more than 8
#endif
#define _AUDIO_STAGE_0 0
#define _AUDIO_STAGE_1 1
#define _AUDIO_STAGE_2 2
#define _AUDIO_STAGE_3 3
#define _AUDIO_STAGE_4 4
#define _AUDIO_STAGE_5 5
#define _AUDIO_STAGE_6 6
#define _AUDIO_STAGE_7 7
#define _MAX_NUM_OF_MIDI_CONNECTIONS 8
#if (_MAX_NUM_OF_MIDI_CONNECTIONS > _MAX_NUM_OF_MIDI_DEVICES)
error max num of midi connections cannot be higher than max num off midi devices
#endif
typedef struct voice_resource
{
voice_resource()
: id(-1)
, used(false)
, pending(false)
, note(-1)
, timestamp(0) {}
int id;
bool used;
bool pending;
int note;
uint64_t timestamp;
} voice_resource_t;
#endif