Open3

X-TOUCH MINIを使い倒す

karaage0703karaage0703

Pythonで情報取得

import pygame.midi

pygame.init()
pygame.midi.init()

if __name__ == '__main__':
    for i in range(pygame.midi.get_count()):
        interf, name, input_dev, output_dev, opened = pygame.midi.get_device_info(i)
        if input_dev and b'X-TOUCH MINI' in name:
            print('X-TOUCH MINI is found, midi id=' + str(i))
            midi_input = pygame.midi.Input(i)

    while True:
        if midi_input.poll():
            midi_events = midi_input.read(10)
            print("full midi_events:" + str(midi_events))