QuantizedBeat¶
- class maelzel.scoring.quant.QuantizedBeat(divisions, assignedSlots, notations, beatDuration, beatOffset=Fraction(0, 1), quantizationError=0.0, quantizationInfo='', weight=0)[source]¶
Bases:
object
A QuantizedBeat holds notations inside a beat filling the beat
- Parameters:
divisions (
tuple
[int
,...
]) – The division of this beatassignedSlots (
list
[int
]) – Which slots are assigned to notations in this beatnotations (
list
[Notation
]) – The notations in this beat. They are cropped to fitbeatDuration (
Fraction
) – The duration of the beat in quarter notesbeatOffset (
Fraction
) – The offset of the beat in relation to the measurequantizationError (
float
) – The error calculated during quantization. The higher the error, the less accurate the quantizationquantizationInfo (
str
) – Info collected during quantizationweight (
int
) – The weight of this beat within the measure. 2=strong, 1=weak, 0=no weight
Attributes Summary
Which slots are assigned to notations in this beat
The division of this beat
The duration of the beat in quarter notes
The end of this beat in quarternotes
The notations in this beat.
The offset of the beat in relation to the measure
The error calculated during quantization.
Info collected during quantization
The weight of this beat within the measure.
Methods Summary
asTree
()Returns the notations in this beat as a tree
dump
([indents, indent, stream])Dump this beat
Attributes Documentation
-
assignedSlots:
list
[int
]¶ Which slots are assigned to notations in this beat
-
divisions:
tuple
[int
,...
]¶ The division of this beat
-
duration:
Fraction
¶ The duration of the beat in quarter notes
- end¶
The end of this beat in quarternotes
-
offset:
Fraction
¶ The offset of the beat in relation to the measure
-
quantizationError:
float
¶ The error calculated during quantization. The higher the error, the less accurate the quantization
-
quantizationInfo:
str
¶ Info collected during quantization
-
weight:
int
¶ The weight of this beat within the measure. 2=strong, 1=weak, 0=no weight
Methods Documentation