Search Results for

    Show / Hide Table of Contents

    Class QuantizerUtilities

    Provides utilities to quantize objects of different types. More info in the Quantizer article.
    Inheritance
    object
    QuantizerUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Tools
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public static class QuantizerUtilities

    Methods

    QuantizeObjects(MidiFile, ObjectType, IGrid, QuantizingSettings, ObjectDetectionSettings)

    Quantizes objects within a MidiFile using the specified grid and default quantizer.
    Declaration
    public static void QuantizeObjects(this MidiFile midiFile, ObjectType objectType, IGrid grid, QuantizingSettings quantizerSettings = null, ObjectDetectionSettings objectDetectionSettings = null)
    Parameters
    Type Name Description
    MidiFile midiFile MidiFile to quantize objects within.
    ObjectType objectType The type of objects to quantize.
    IGrid grid Grid to use for quantization.
    QuantizingSettings quantizerSettings Settings according to which objects should be quantized.
    ObjectDetectionSettings objectDetectionSettings Settings according to which objects should be detected and built.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • midiFile is null.
    • grid is null.

    QuantizeObjects(MidiFile, Quantizer, ObjectType, IGrid, QuantizingSettings, ObjectDetectionSettings)

    Quantizes objects within a MidiFile using the specified grid and custom quantizer (see Quantizer: Custom quantizing article).
    Declaration
    public static void QuantizeObjects(this MidiFile midiFile, Quantizer quantizer, ObjectType objectType, IGrid grid, QuantizingSettings quantizerSettings = null, ObjectDetectionSettings objectDetectionSettings = null)
    Parameters
    Type Name Description
    MidiFile midiFile MidiFile to quantize objects within.
    Quantizer quantizer Quantizer to quantize objects with.
    ObjectType objectType The type of objects to quantize.
    IGrid grid Grid to use for quantization.
    QuantizingSettings quantizerSettings Settings according to which objects should be quantized.
    ObjectDetectionSettings objectDetectionSettings Settings according to which objects should be detected and built.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • midiFile is null.
    • quantizer is null.
    • grid is null.

    QuantizeObjects(TrackChunk, ObjectType, IGrid, TempoMap, QuantizingSettings, ObjectDetectionSettings)

    Quantizes objects within a TrackChunk using the specified grid and default quantizer.
    Declaration
    public static void QuantizeObjects(this TrackChunk trackChunk, ObjectType objectType, IGrid grid, TempoMap tempoMap, QuantizingSettings quantizerSettings = null, ObjectDetectionSettings objectDetectionSettings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to quantize objects within.
    ObjectType objectType The type of objects to quantize.
    IGrid grid Grid to use for quantization.
    TempoMap tempoMap Tempo map used to perform time and length conversions.
    QuantizingSettings quantizerSettings Settings according to which objects should be quantized.
    ObjectDetectionSettings objectDetectionSettings Settings according to which objects should be detected and built.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • grid is null.
    • tempoMap is null.

    QuantizeObjects(TrackChunk, Quantizer, ObjectType, IGrid, TempoMap, QuantizingSettings, ObjectDetectionSettings)

    Quantizes objects within a TrackChunk using the specified grid and custom quantizer (see Quantizer: Custom quantizing article).
    Declaration
    public static void QuantizeObjects(this TrackChunk trackChunk, Quantizer quantizer, ObjectType objectType, IGrid grid, TempoMap tempoMap, QuantizingSettings quantizerSettings = null, ObjectDetectionSettings objectDetectionSettings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to quantize objects within.
    Quantizer quantizer Quantizer to quantize objects with.
    ObjectType objectType The type of objects to quantize.
    IGrid grid Grid to use for quantization.
    TempoMap tempoMap Tempo map used to perform time and length conversions.
    QuantizingSettings quantizerSettings Settings according to which objects should be quantized.
    ObjectDetectionSettings objectDetectionSettings Settings according to which objects should be detected and built.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • quantizer is null.
    • grid is null.
    • tempoMap is null.

    QuantizeObjects(IEnumerable<TrackChunk>, ObjectType, IGrid, TempoMap, QuantizingSettings, ObjectDetectionSettings)

    Quantizes objects within a collection of TrackChunk using the specified grid and default quantizer.
    Declaration
    public static void QuantizeObjects(this IEnumerable<TrackChunk> trackChunks, ObjectType objectType, IGrid grid, TempoMap tempoMap, QuantizingSettings quantizerSettings = null, ObjectDetectionSettings objectDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to quantize objects within.
    ObjectType objectType The type of objects to quantize.
    IGrid grid Grid to use for quantization.
    TempoMap tempoMap Tempo map used to perform time and length conversions.
    QuantizingSettings quantizerSettings Settings according to which objects should be quantized.
    ObjectDetectionSettings objectDetectionSettings Settings according to which objects should be detected and built.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • grid is null.
    • tempoMap is null.

    QuantizeObjects(IEnumerable<TrackChunk>, Quantizer, ObjectType, IGrid, TempoMap, QuantizingSettings, ObjectDetectionSettings)

    Quantizes objects within a collection of TrackChunk using the specified grid and custom quantizer (see Quantizer: Custom quantizing article).
    Declaration
    public static void QuantizeObjects(this IEnumerable<TrackChunk> trackChunks, Quantizer quantizer, ObjectType objectType, IGrid grid, TempoMap tempoMap, QuantizingSettings quantizerSettings = null, ObjectDetectionSettings objectDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to quantize objects within.
    Quantizer quantizer Quantizer to quantize objects with.
    ObjectType objectType The type of objects to quantize.
    IGrid grid Grid to use for quantization.
    TempoMap tempoMap Tempo map used to perform time and length conversions.
    QuantizingSettings quantizerSettings Settings according to which objects should be quantized.
    ObjectDetectionSettings objectDetectionSettings Settings according to which objects should be detected and built.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • quantizer is null.
    • grid is null.
    • tempoMap is null.

    See Also

    Quantizer
    In this article
    Back to top 2024 / Generated by DocFX