Skip to content

Input port callback not working #602

Answered by r1yk
gary-1959 asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like your callback function probably needs to be updated to take a single argument for the message it will receive each time it's called. From the docstring for mido.open_input:

callback=None
    A callback function to be called when a new message arrives.
    The function should take one argument (the message).
    Raises IOError if not supported by the backend.

You could quickly test with something like:

def input_callback(msg):
   print("MESSAGE RECEIVED", msg)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rdoursenaud
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #601 on November 03, 2024 11:34.