[LAD] Quantise MIDI note/frequency to musical scale: algorithm?