         transpositionTone: Tone,
         octaveRange: OctaveRange
     ) -> [Note] {
-        let tuningBase = equalBase(pitch: pitch, transpositionTone: transpositionTone)
-        var notes = [Note]()
-        octaveRange.forEach { octave in
-            let harmoniesInThisOctave = tune(octave: octave, tuningBase: tuningBase)
-            notes.append(contentsOf: harmoniesInThisOctave)
-        }
-        return notes
+        let base = equalBase(pitch: pitch, transpositionTone: transpositionTone)
+        return expandTuning(base: base, octaveRange: octaveRange)
     }
 
     // "Base" means C1, D1, ... in:
     // => http://ja.wikipedia.org/wiki/%E9%9F%B3%E5%90%8D%E3%83%BB%E9%9A%8E%E5%90%8D%E8%A1%A8%E8%A8%98
-    static func equalBase(pitch: Float, transpositionTone: Tone) -> [Tone: Float] {
+    static func equalBase(pitch: Float, transpositionTone: Tone) -> Tuning {
         // Frequencies when transpositionTone == C
         var baseFrequencies: [Float] = [
             frequency(pitch: pitch, order: 3.0)  / 16.0,  // C


public struct HarmonyKit {
    public typealias OctaveRange = Range<Int>

    /// Generate frequencies for each tones.
    public static func tune(configuration: Configuration) -> [Note] {
        switch configuration.temperament {
        case .equal:

        }
        return arrangedTones
    }
}
