Table of Contents

Class MIDIInfoEventArgs

Namespace
VisioForge.Core.Types.Events
Assembly
VisioForge.Core.dll

Provides data for MIDI file information events. This event is raised when MIDI file metadata is read or updated during playback.

public class MIDIInfoEventArgs : EventArgs

Inheritance

Inherited Members

Examples

// Example of handling MIDI file information event
player.OnMIDIFileInfo += (sender, e) =>
{
    Console.WriteLine($"MIDI Title: {e.Info.Title}");
    Console.WriteLine($"Author: {e.Info.AuthorName}");
    Console.WriteLine($"Copyright: {e.Info.Copyright}");

    if (!string.IsNullOrEmpty(e.Info.Description))
    {
        Console.WriteLine($"Description: {e.Info.Description}");
    }

    // Display in UI
    UpdateMusicInfoDisplay(e.Info);
};

// Example of using MIDI info for playlist management
private void UpdateMusicInfoDisplay(MIDIInfo info)
{
    titleLabel.Text = info.Title ?? "Unknown Title";
    artistLabel.Text = info.AuthorName ?? "Unknown Artist";

    // Update rating display if available
    if (!string.IsNullOrEmpty(info.Rating))
    {
        ratingControl.Value = ParseRating(info.Rating);
    }
}

Remarks

This event args class is used to provide detailed information about MIDI files including metadata such as title, author, copyright, and other embedded information. MIDI files can contain various metadata fields that describe the composition.

Constructors

MIDIInfoEventArgs(MIDIInfo)

Initializes a new instance of the VisioForge.Core.Types.Events.MIDIInfoEventArgs class.

public MIDIInfoEventArgs(MIDIInfo info)

Parameters

info MIDIInfo

MIDI info.

Properties

Info

Gets the MIDI file information.

public MIDIInfo Info { get; }

Property Value

MIDIInfo