quantizePart

maelzel.scoring.quant.quantizePart(part, struct, quantprofile, fillStructure=False)[source]

Quantizes a sequence of non-overlapping events (a “part”)

Quantize to the score structure defined in struct, according to the strategies defined in preset

Parameters:
  • struct (ScoreStruct) – the ScoreStruct to use

  • part (UnquantizedPart) – the events to quantize. Event within a part should not overlap

  • fillStructure – if True and struct is not endless, the generated UnquantizedPart will have as many measures as are defined in the struct. Otherwisem only as many measures as needed to hold the given events will be created

  • quantprofile (str | QuantizationProfile) – the QuantizationProfile used

Return type:

QuantizedPart

Returns:

a QuantizedPart