Find the nearest MIDI pitch whose pitch class is in the scale.
The search expands symmetrically outward from pitch. On a tie (equal distance above and below) the lower pitch is returned.
pitch
MIDI pitch to snap.
The key/scale to snap to.
The nearest in-scale MIDI pitch.
Find the nearest MIDI pitch whose pitch class is in the scale.
The search expands symmetrically outward from
pitch. On a tie (equal distance above and below) the lower pitch is returned.