Struct MidiPatch.Full

Namespace
SpessaSharp.MIDI
Assembly
SpessaSharp.dll
public readonly record struct MidiPatch.Full : IEquatable<MidiPatch.Full>
Implements
Inherited Members

Constructors

Full(MidiPatch, string, bool)

public Full(MidiPatch Data, string Name, bool IsDrum)

Parameters

Data MidiPatch

The Patch itself.

Name string

The name of the patch.

IsDrum bool

Indicates if this patch is a drum patch. This is the recommended way of determining if this is a drum preset.
If IsDrum is true, then this is a GM/GS drum preset.
If IsDrum is false, then this is a GM2/XG drum preset.

Properties

BankLSB

public int BankLSB { get; }

Property Value

int

BankMSB

public int BankMSB { get; }

Property Value

int

Data

The Patch itself.

public MidiPatch Data { get; init; }

Property Value

MidiPatch

IsDrum

Indicates if this patch is a drum patch. This is the recommended way of determining if this is a drum preset.
If IsDrum is true, then this is a GM/GS drum preset.
If IsDrum is false, then this is a GM2/XG drum preset.

public bool IsDrum { get; init; }

Property Value

bool

IsGMGSDrum

public bool IsGMGSDrum { get; }

Property Value

bool

IsXGDrum

Checks if the given patch is an XG/GM2 drum patch.

public bool IsXGDrum { get; }

Property Value

bool

Name

The name of the patch.

public string Name { get; init; }

Property Value

string

Program

public int Program { get; }

Property Value

int

Methods

From(ReadOnlySpan<char>)

Gets a named MIDI patch from a string.

public static MidiPatch.Full From(ReadOnlySpan<char> midiString)

Parameters

midiString ReadOnlySpan<char>

Returns

MidiPatch.Full

Exceptions

Exception

ToFullMidiString()

Converts a given MIDIPatchFullto string. The format is:

  • [MIDIPatch string] D [name] for isDrum set to true.
  • [MIDIPatch string] M [name] for isDrum set to false.
public string ToFullMidiString()

Returns

string