Search Results for

    Show / Hide Table of Contents

    Class GeneralMidiUtilities

    Provides utilities for General MIDI Level 1.
    Inheritance
    object
    GeneralMidiUtilities
    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 GeneralMidiUtilities

    Methods

    AsSevenBitNumber(GeneralMidiPercussion)

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

    AsSevenBitNumber(GeneralMidiProgram)

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

    GetNoteOffEvent(GeneralMidiPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOffEvent corresponding to the specified General MIDI Level 1 percussion.
    Declaration
    public static NoteOffEvent GetNoteOffEvent(this GeneralMidiPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidiPercussion percussion GeneralMidiPercussion 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(GeneralMidiPercussion, SevenBitNumber, FourBitNumber)

    Gets an instance of the NoteOnEvent corresponding to the specified General MIDI Level 1 percussion.
    Declaration
    public static NoteOnEvent GetNoteOnEvent(this GeneralMidiPercussion percussion, SevenBitNumber velocity, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidiPercussion percussion GeneralMidiPercussion 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.

    GetProgramEvent(GeneralMidiProgram, FourBitNumber)

    Gets an instance of the ProgramChangeEvent corresponding to the specified General MIDI Level 1 program.
    Declaration
    public static MidiEvent GetProgramEvent(this GeneralMidiProgram program, FourBitNumber channel)
    Parameters
    Type Name Description
    GeneralMidiProgram program GeneralMidiProgram to get an event for.
    FourBitNumber channel Channel an event should be created for.
    Returns
    Type Description
    MidiEvent An instance of the ProgramChangeEvent corresponding to the program.
    Exceptions
    Type Condition
    InvalidEnumArgumentException program specified an invalid value.
    In this article
    Back to top 2024 / Generated by DocFX