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
DataMidiPatchThe Patch itself.
NamestringThe name of the patch.
IsDrumboolIndicates 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
BankMSB
public int BankMSB { get; }
Property Value
Data
The Patch itself.
public MidiPatch Data { get; init; }
Property Value
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
IsGMGSDrum
public bool IsGMGSDrum { get; }
Property Value
IsXGDrum
Checks if the given patch is an XG/GM2 drum patch.
public bool IsXGDrum { get; }
Property Value
Name
The name of the patch.
public string Name { get; init; }
Property Value
Program
public int Program { get; }
Property Value
Methods
From(ReadOnlySpan<char>)
Gets a named MIDI patch from a string.
public static MidiPatch.Full From(ReadOnlySpan<char> midiString)
Parameters
midiStringReadOnlySpan<char>
Returns
Exceptions
ToFullMidiString()
Converts a given MIDIPatchFullto string.
The format is:
[MIDIPatch string] D [name]forisDrumset totrue.[MIDIPatch string] M [name]forisDrumset tofalse.
public string ToFullMidiString()