Skip to content

Get track events/notes. #124

Answered by melanchall
ar065 asked this question in Q&A
Jun 15, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi,

Of course. Sample code below shows how to get both events and notes count for each track chunk of a MIDI file:

foreach (var trackChunk in midiFile.GetTrackChunks())
{
    var eventsCount = trackChunk.Events.Count;
    var notesCount = trackChunk.GetNotes().Count;
}

Replies: 1 comment 1 reply

Comment options

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

Answer selected by ar065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
2 participants