Skip to content

How Do I Retreive Meta Message Values? #575

Answered by rdoursenaud
JeffRocchio asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, and thank you for using mido!

All the attributes are docummented.
For the time_signature object you'll find the attributes:

  • numerator
  • denominator
  • clocks_per_click
  • notated_32nd_notes_per_beat

You simply have to read them from the object:

if msg.type == 'time_signature':
    print(f"Numerator: {msg.numerator}")
    print(f"Denominator: {msg.denominator}")
    ...

Let me know if you need further clarification.

Replies: 2 comments 1 reply

Comment options

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

You must be logged in to vote
1 reply
@rdoursenaud
Comment options

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