Beat-Based Rhythm Quantization of MIDI Performances