Table of Contents

Class MidiFileStatistics

Namespace
Celeritas.Core.Midi
Assembly
Celeritas.dll

Summary statistics for a MIDI file.

public sealed record MidiFileStatistics : IEquatable<MidiFileStatistics>
Inheritance
MidiFileStatistics
Implements
Inherited Members

Remarks

A note on the General MIDI percussion channel (channel 10, index 9) is a note of the file and not a pitch, so it is counted in NoteCount and left out of MinNoteNumber and MaxNoteNumber. The range used to take drums in with everything else, so a piano piece with a kick drum under it reported a lowest note of 36 — a bass drum, not a C2.

Properties

Channels

Distinct MIDI channels used, in ascending order.

public IReadOnlyList<int> Channels { get; init; }

Property Value

IReadOnlyList<int>

MaxNoteNumber

Highest MIDI note number among the pitched notes — every note off the percussion channel — or null if there are none.

public int? MaxNoteNumber { get; init; }

Property Value

int?

MinNoteNumber

Lowest MIDI note number among the pitched notes — every note off the percussion channel — or null if there are none.

public int? MinNoteNumber { get; init; }

Property Value

int?

NoteCount

Total number of notes across all tracks, drum hits on the percussion channel included.

public int NoteCount { get; init; }

Property Value

int

TotalDuration

Total duration in whole-note units (one 4/4 measure = 1).

public Rational TotalDuration { get; init; }

Property Value

Rational

TotalTicks

End of the file in absolute MIDI ticks.

public long TotalTicks { get; init; }

Property Value

long

TrackCount

Number of track chunks in the file.

public int TrackCount { get; init; }

Property Value

int