The goal of our DTS algorithm is to minimize the beat frequencies created from playing multiple notes simultaneously on an electronic instrument.  Our idea, inspired by the just intonation tuning system, was to modify the notes of a specific chord to be from one overtone series, as opposed to optimizing a specific scale.  Beat frequencies are minimized when two notes are related by a close integer ratio, such as 2:3, or 3:5.  Therefore, we describe our general optimization approach to transform a set of N notes to N’ output notes.  To do this specifically, we will disentangle each objective and optimize them separately.

Algorithm Part 1 – Finding a feasible solution:

The goal of our modified optimization problem is to find some fundamental frequency (F), such that every note in the input chord is sufficiently close to a multiple of F.  By limiting our options for F to be equal temperament notes, we can guarantee that our algorithm can find a solution quickly, or return no solution if F would have to be too small to be useful.  The algorithm will then return the multiples of F that map to the input notes.  This guarantees that the chord will now have a period of 1/F.

Algorithm Part 2 – Optimizing within feasibility:

The solution given from Part 1 may have shifted the chord overall sharp or flat.  In unideal conditions, successive chords may then fail to hold their initial relations, as the distance between the chords has changed.  Part 2 rectifies this by calculating the distance the chord has shifted, and shifts the chord appropriately in the opposite direction, either so the overall offset becomes 0, or any note shifts 49 cents in either direction.