So equal temperament is a compromise to allow songs to be played without without having to retune them on the fly, to match the more consonant sounding just intonation intervals.
However, in a world where MIDI-based soft synthesizers with customizable tuning exist, it could be practical to optimise the tuning system to the played song, as the instrument can be tuned on a note-by-note basis.
I was thinking this could be algorithmically computed by shifting tuning towards just intonation based on if the note is used in multiple intervals or not. If it is not used in another context it would be completely tuned to its just intonation interval. e.g. the intro to Scar Tissue
An example of how it would work:
- MIDI file read into program to analyse things like song key, most frequent intervals, most played chords, etc.
- Program algorithmically computes tuning
- Program outputs tuning
- Tuning and song played back by synthesizer
Is there a known way to do this? Is just intonation the right 'ideal' to aim for? How do I ensure that the pitch does not drift?