The collection of pitches which we want to optimize mapping for
The scale/chord that we want the pitches to be fitted to
Options to configure how the fitting works
Returns a pitch near to the passed in pitch, but which should fit better with the notes within the container that was optimized against.
Returns a new pitch number.
The pitch which we want to fit to the scale. Can also take pitch names, see the pitch method for more information.
Calling this will invalidate the current fitting and recalculate.
The collection of pitches which we want to optimize mapping for
The scale/chord that we want the pitches to be fitted to
Options to configure how the fitting works
Generated using TypeDoc
This class is designed to allow optimized pitch fitting. Using the regular pitch fitting methods on scale and chord objects often results in different input pitches being mapped to the same output pitch. This takes a collection of pitches which are to be optimized for, as well as a pitch container to check against. It uses a modified version of the stable marriage algorithm to decide where pitches need to be mapped to.