I also made a python version:
# Author: yingshaoxo
# Python: 3.5
# midi usb protocol: 1.0 ; There has no need to upgrade to 2.0
device_name = "/dev/midi1" # "/dev/dmmidi1" # "/dev/snd/midiC1D0"
while True:
with open(device_name, "rb") as f:
bytes_list = [None] * 3
for...
// Linux MIDI input driver, protocol 1.0, there is no need to upgrade to protocol 2.0
// Author: yingshaoxo
// Run it in root shell
// gcc main.c -o main.run
// ./main.run
#include <sys/soundcard.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#define...