Search Results for

    Show / Hide Table of Contents

    Class GeneralMidi2Utilities

    Provides utilities for General MIDI Level 2.
    Inheritance
    object
    GeneralMidi2Utilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Standards
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public static class GeneralMidi2Utilities

    Methods

    AsSevenBitNumber(GeneralMidi2AnalogPercussion)

    Converts GeneralMidi2AnalogPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2AnalogPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2AnalogPercussion percussion GeneralMidi2AnalogPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2BrushPercussion)

    Converts GeneralMidi2BrushPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2BrushPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2BrushPercussion percussion GeneralMidi2BrushPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2ElectronicPercussion)

    Converts GeneralMidi2ElectronicPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2ElectronicPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2ElectronicPercussion percussion GeneralMidi2ElectronicPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2JazzPercussion)

    Converts GeneralMidi2JazzPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2JazzPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2JazzPercussion percussion GeneralMidi2JazzPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2OrchestraPercussion)

    Converts GeneralMidi2OrchestraPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2OrchestraPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2OrchestraPercussion percussion GeneralMidi2OrchestraPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2PercussionSet)

    Converts GeneralMidi2PercussionSet to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2PercussionSet percussionSet)
    Parameters
    Type Name Description
    GeneralMidi2PercussionSet percussionSet GeneralMidi2PercussionSet to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussionSet.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussionSet specified an invalid value.

    AsSevenBitNumber(GeneralMidi2PowerPercussion)

    Converts GeneralMidi2PowerPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2PowerPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2PowerPercussion percussion GeneralMidi2PowerPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2RoomPercussion)

    Converts GeneralMidi2RoomPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2RoomPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2RoomPercussion percussion GeneralMidi2RoomPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2SfxPercussion)

    Converts GeneralMidi2SfxPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2SfxPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2SfxPercussion percussion GeneralMidi2SfxPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    AsSevenBitNumber(GeneralMidi2StandardPercussion)

    Converts GeneralMidi2StandardPercussion to the corresponding value of the SevenBitNumber type.
    Declaration
    public static SevenBitNumber AsSevenBitNumber(this GeneralMidi2StandardPercussion percussion)
    Parameters
    Type Name Description
    GeneralMidi2StandardPercussion percussion GeneralMidi2StandardPercussion to convert to SevenBitNumber.
    Returns
    Type Description
    SevenBitNumber SevenBitNumber representing the percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2AnalogPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Analog' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2AnalogPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2AnalogPercussion percussion GeneralMidi2AnalogPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2BrushPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Brush' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2BrushPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2BrushPercussion percussion GeneralMidi2BrushPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2ElectronicPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Electronic' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2ElectronicPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2ElectronicPercussion percussion GeneralMidi2ElectronicPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2JazzPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Jazz' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2JazzPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2JazzPercussion percussion GeneralMidi2JazzPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2OrchestraPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Orchestra' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2OrchestraPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2OrchestraPercussion percussion GeneralMidi2OrchestraPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2PowerPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Power' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2PowerPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2PowerPercussion percussion GeneralMidi2PowerPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2RoomPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Room' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2RoomPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2RoomPercussion percussion GeneralMidi2RoomPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2SfxPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'SFX' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2SfxPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2SfxPercussion percussion GeneralMidi2SfxPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOffEvent(GeneralMidi2StandardPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 2 'Standard' percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidi2StandardPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2StandardPercussion percussion GeneralMidi2StandardPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOffEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOffEvent An instance of the NoteOffEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2AnalogPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Analog' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2AnalogPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2AnalogPercussion percussion GeneralMidi2AnalogPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2BrushPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Brush' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2BrushPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2BrushPercussion percussion GeneralMidi2BrushPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2ElectronicPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Electronic' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2ElectronicPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2ElectronicPercussion percussion GeneralMidi2ElectronicPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2JazzPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Jazz' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2JazzPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2JazzPercussion percussion GeneralMidi2JazzPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2OrchestraPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Orchestra' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2OrchestraPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2OrchestraPercussion percussion GeneralMidi2OrchestraPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2PowerPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Power' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2PowerPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2PowerPercussion percussion GeneralMidi2PowerPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2RoomPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Room' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2RoomPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2RoomPercussion percussion GeneralMidi2RoomPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2SfxPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'SFX' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2SfxPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2SfxPercussion percussion GeneralMidi2SfxPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetNoteOnEvent(GeneralMidi2StandardPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 2 'Standard' percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidi2StandardPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2StandardPercussion percussion GeneralMidi2StandardPercussion to get an event for.
    SevenBitNumber velocity Velocity of the NoteOnEvent.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    NoteOnEvent An instance of the NoteOnEvent corresponding to the specified percussion.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussion specified an invalid value.

    GetPercussionSetEvents(GeneralMidi2PercussionSet, FourBitNumber)

    Gets MIDI events sequence to switch to the specified General MIDI Level 2 percussion set.
    Declaration
    public static IEnumerable<MidiEvent> GetPercussionSetEvents(this GeneralMidi2PercussionSet percussionSet, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2PercussionSet percussionSet GeneralMidi2PercussionSet to get events for.
    FourBitNumber channel Channel events should be created for.
    Returns
    Type Description
    IEnumerable<MidiEvent> MIDI events sequence to switch to the percussionSet.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussionSet specified an invalid value.

    GetProgramEvent(GeneralMidi2PercussionSet, FourBitNumber)

    Gets Program Change event corresponding to the specified General MIDI Level 2 percussion set.
    Declaration
    public static MidiEvent GetProgramEvent(this GeneralMidi2PercussionSet percussionSet, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2PercussionSet percussionSet GeneralMidi2PercussionSet to get event for.
    FourBitNumber channel Channel event should be created for.
    Returns
    Type Description
    MidiEvent Program Change event corresponding to the percussionSet.
    Exceptions
    Type Condition
    InvalidEnumArgumentException percussionSet specified an invalid value.

    GetProgramEvents(GeneralMidi2Program, FourBitNumber)

    Gets MIDI events sequence to switch to the specified General MIDI Level 2 program.
    Declaration
    public static IEnumerable<MidiEvent> GetProgramEvents(this GeneralMidi2Program program, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidi2Program program GeneralMidi2Program to get events for.
    FourBitNumber channel Channel events should be created for.
    Returns
    Type Description
    IEnumerable<MidiEvent> MIDI events sequence to switch to the program.
    Exceptions
    Type Condition
    InvalidEnumArgumentException program specified an invalid value.
    In this article
    Back to top 2024 / Generated by DocFX