Class QuantizerUtilities
Provides utilities to quantize objects of different types. More info in the
Quantizer article.
Inherited Members
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|