Skip to content

Can't get input with pylibremidi #190

@Maboroshy

Description

@Maboroshy

I'm trying to get pylibremidi working. My basic input handler:

import time
import pylibremidi as lm


PORT_NAME = 'LPX MIDI'

config = lm.InputConfiguration()
config.ignore_sysex = False
config.on_message = print
config.on_raw_data = print
config.on_error = print
config.on_warning = print

lm_port = lm.MidiIn(config)
inputs = {port.port_name: port for port in lm.Observer().get_input_ports()}
lm_port.open_port(inputs[PORT_NAME])

print(lm_port.is_port_open())
print(lm_port.is_port_connected())

while True:
    time.sleep(1)

It prints True for .is_port_open() and .is_port_connected(), but nothing more. Other MIDI lib prints the input, so the hardware works.

What am I missing here?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions