#ifndef CONFIG_H #define CONFIG_H // Hardware-Konfiguration #define NUM_POTIS 8 #define NUM_SLIDERS 4 #define NUM_BUTTONS 20 #define NUM_LEDS 20 #define NUM_ANALOG_CONTROLS (NUM_POTIS + NUM_SLIDERS) // MCP23017 I2C Adressen #define MCP1_ADDRESS 0x20 // Erste MCP23017 (Buttons 0-15 & LEDs 0-15) #define MCP2_ADDRESS 0x21 // Zweite MCP23017 (Buttons 16-19 & LEDs 16-19) // CD74HC4067 Multiplexer Pins #define MUX_S0 2 #define MUX_S1 3 #define MUX_S2 4 #define MUX_S3 5 #define MUX_ANALOG_PIN A0 // MIDI-Konfiguration #define MIDI_CHANNEL 1 // CC-Mapping für analoge Regler (12 Regler total) const uint8_t ANALOG_CC_MAP[NUM_ANALOG_CONTROLS] = { 1, 2, 3, 4, 5, 6, 7, 8, // Potis (CC1-CC8) 9, 10, 11, 12 // Schieberegler (CC9-CC12) }; // Note-Mapping für Buttons (20 Buttons) const uint8_t BUTTON_NOTE_MAP[NUM_BUTTONS] = { 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, // Buttons 0-9 (C2-A2) 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 // Buttons 10-19 (A#2-G3) }; // Debounce-Konfiguration #define DEBOUNCE_TIME 50 // ms #define ANALOG_THRESHOLD 4 // Mindeständerung für MIDI-CC #endif