forked from marcel-licence/esp32_basic_synth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
77 lines (59 loc) · 1.54 KB
/
config.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
67
68
69
70
71
72
73
74
75
76
77
/*
* config.h
*
* Put all your project settings here (defines, numbers, etc.)
* configurations which are requiring knowledge of types etc.
* shall be placed in z_config.ino (will be included at the end)
*
* Created on: 12.05.2021
* Author: Marcel Licence
*/
#define SAMPLE_BUFFER_SIZE 1
#ifndef CONFIG_H_
#define CONFIG_H_
// #define ESP32_AUDIO_KIT
#ifdef ESP32_AUDIO_KIT
/* on board led */
#define LED_PIN 19 // IO19 -> D5
#define ADC_INPUTS 8
#define ADC_MUL_S0_PIN 23
#define ADC_MUL_S1_PIN 18
#define ADC_MUL_S2_PIN 14
#define ADC_MUL_S3_PIN 5 /* <- not used, this has not been tested */
#define ADC_MUL_SIG_PIN 12
#else /* ESP32_AUDIO_KIT */
// Not the audio-kit
/* on board led */
#define LED_PIN 2
/*
* Define and connect your PINS to DAC here
*/
#ifdef I2S_NODAC
#define I2S_NODAC_OUT_PIN 22 /* noisy sound without DAC, add capacitor in series! */
#else
/*
* pins to connect a real DAC like PCM5102
*/
#define I2S_BCLK_PIN 25
#define I2S_WCLK_PIN 27
#define I2S_DOUT_PIN 26
#endif
// #define ADC_INPUTS 8
// #define ADC_MUL_S0_PIN 33
// #define ADC_MUL_S1_PIN 32
// #define ADC_MUL_S2_PIN 13
// #define ADC_MUL_SIG_PIN 12
#endif /* ESP32_AUDIO_KIT */
/*
* You can modify the sample rate as you want
*/
#ifdef ESP32_AUDIO_KIT
#define SAMPLE_RATE 44100
#define SAMPLE_SIZE_16BIT
#else
#define SAMPLE_RATE 48000
#define SAMPLE_SIZE_32BIT
#endif
// #define ADC_TO_MIDI_ENABLED /* this will enable the adc module */
// #define ADC_TO_MIDI_LOOKUP_SIZE 8 /* should match ADC_INPUTS */
#endif /* CONFIG_H_ */