0
mirror of https://github.com/torvalds/GuitarPedal.git synced 2026-06-06 04:51:54 +00:00
Files
torvalds-GuitarPedal/Software/usb-sync.h
Linus Torvalds c35a62ea73 Switch USB HID protocol to use MIDI over USB instead
The HID protocol was a mistake - I blame the fact that I have all the
musical ability of a snail on drugs.  The obviously correct answer is to
use MIDI, so that we could use an actual standard interface both on a
computer and even using things like external stomp switches.

As always, the USB code is written by Antigravity.  I think that's the
proper distribution of roles: Ricky has been doing any actual _musical_
effects, I've been doing the hardware interfaces, and Antigravity deals
with the tinyusb integration.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-05-29 13:14:36 -07:00

24 lines
589 B
C

#ifndef _USB_SYNC_H
#define _USB_SYNC_H
#include <stdint.h>
// MIDI Control Change (CC) constants
#define MIDI_CC_POT_START 10 // CC 10-19 map to pots 0-9
#define MIDI_CC_GLOBAL_ENABLE 20
#define MIDI_CC_EFFECT_ENABLE 21
#define MIDI_CC_ACTIVE_POT 22
#define MIDI_CC_EFFECT_INTENSE 30
#define MIDI_CC_AUDIO_CLIPPING 31
#define MIDI_CC_CPU_LATENCY 32
// MIDI Program Change maps to effect_idx directly (0-N)
extern void send_midi_cc(uint8_t cc, uint8_t val);
extern void send_midi_pc(uint8_t pc);
extern int current_midi_effect_idx;
#endif // _USB_SYNC_H