NOW LOADING

MidiSequenceNote


A note with both ends already paired
Namespace Windows.Devices.Midi2.Utilities.Sequencing
Type Name MidiSequenceNote
Type WinRT Struct
IDL MidiSequenceNote.idl

MidiSequenceNote is a note with its start and end already matched up, so you don’t have to pair note ons with note offs yourself.

This is a struct, not a class, because a display asks for every note it can see on every frame, and a file can hold hundreds of millions of them. As a struct, a whole window of notes can be copied to your app in one call.

Struct Fields

Field Description
StartTick Where the note begins
EndTick Where the note ends
TrackIndex The track the note is on
ChannelIndex The channel index, starting at zero
NoteNumber The MIDI note number
Velocity The note on velocity

Remarks

Get these by calling MidiSequence.FillNotesInTickRange with an array you own. Use GetNoteCountInTickRange to know how big to make it.

Notes are sorted by where they start, so a note that began before your window can still be sounding inside it. Subtract the sequence’s LongestNoteTicks from the start of your window to catch those.

Didn't find what you were looking for?

Windows MIDI Services is an open source project with all source available on GitHub. We have a great community on Discord as well. Between GitHub and Discord, you should find the information you are looking for.