tune
tune copied to clipboard
Add adaptive tuning
Retune played notes in real time s.t. their frequency ratios get as close to JI as possible.
Usage: The user provides a list of (pure) intervals some of which can be left empty.
Example: x, 9/8, 6/5, ... means minor seconds have no preference, major seconds prefer to become 9/8, minor seconds prefer to become 6/5, etc.
Idea: Optimize two energies
- The sum over all intervals of the squared difference between the actual interval and the just interval
- The sum over all pitches of the squared difference between the actual pitch and the original pitch
Enhancements: Provide a weight for each ratio.