Get note value? #213
-
Hi, How do you get the note values of all notes (such as whether they are quarter, half, whole notes etc)? I've seen info about it, but I can't work out how to do it. Thanks for your great work! |
Beta Was this translation helpful? Give feedback.
Answered by
melanchall
Aug 20, 2022
Replies: 1 comment 1 reply
-
Hi, To get all notes: var notes = midiFile.GetNotes(); To get a note's length in terms of fraction of whole note: var length = note.LengthAs<MusicalTimeSpan>(tempoMap); Then you can get numerator and denominator of the To get tempo map: var tempoMap = midiFile.GetTempoMap(); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cad12345
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
To get all notes:
To get a note's length in terms of fraction of whole note:
Then you can get numerator and denominator of the
length
.To get tempo map: