Implementiere USB-MIDI-Controller für Arduino Pro Micro mit Hardware- und Software-Architektur, einschließlich Button- und LED-Steuerung, Multiplexer-Integration und MIDI-Kommunikation.

This commit is contained in:
2025-07-19 15:46:14 +02:00
parent f6cbffe217
commit e64048e99b
13 changed files with 820 additions and 11 deletions

23
include/midi_handler.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef MIDI_HANDLER_H
#define MIDI_HANDLER_H
#include <Arduino.h>
#include <MIDIUSB.h>
class MIDIHandler {
private:
static void noteOn(byte channel, byte pitch, byte velocity);
static void noteOff(byte channel, byte pitch, byte velocity);
static void controlChange(byte channel, byte control, byte value);
public:
static void init();
static void sendNoteOn(uint8_t note, uint8_t velocity);
static void sendNoteOff(uint8_t note, uint8_t velocity);
static void sendControlChange(uint8_t controller, uint8_t value);
static void processIncomingMIDI();
static void (*onNoteOnCallback)(uint8_t note, uint8_t velocity);
static void (*onNoteOffCallback)(uint8_t note, uint8_t velocity);
};
#endif