quantize_midinote
- pitchtools.quantize_midinote(midinote, divisions_per_semitone, method='round')[source]
Quantize midinote to the next semitone division
- Parameters:
midinote (
float
) – the midinote to rounddivisions_per_semitone – resolution of the pitch grid (1, 2 or 4)
method – “round” to quantize to the nearest value in grid, “floor” to take the next lesser value
- Return type:
float
- Returns:
the quantized midinote
See also