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:
23
include/midi_handler.h
Normal file
23
include/midi_handler.h
Normal 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
|
Reference in New Issue
Block a user