     public class func kind(forPitchSpellingDyad pitchSpellingDyad: PitchSpellingDyad)
         -> EnumKind
     {
-        //let family = intervalFamily(withAmountOfSteps: pitchSpellingDyad.steps)
-        //return family.kind(forPitchSpellingDyad: pitchSpellingDyad)
-        return .majorSixth
+        let family = intervalFamily(withAmountOfSteps: pitchSpellingDyad.steps)
+        return family.kind(forPitchSpellingDyad: pitchSpellingDyad)
     }
     
     internal func intervalQualityKinds(withIntervalClass intervalClass: IntervalClass)

//        }
    }
    
    /// Second interval family.
    public class Second: EnumFamily, ImperfectIntervalQualityType {
        
        public static let diminished: EnumKind = .diminishedSecond
        
        /// minor Second interval.
        public static let minor: EnumKind = .minorSecond
        
        /// major Second interval.
        public static let major: EnumKind = .majorSecond
        
        /// augmented Second interval.
        public static let augmented: EnumKind = .augmentedSecond
        
        public override class var members: [EnumKind] { return [minor, major, augmented] }
        
        public override class func kind(forPitchSpellingDyad pitchSpellingDyad: PitchSpellingDyad)
            -> EnumKind
        {
            return major
        }
        
//        public override class func kind(
//            coarseAdjustmentLower: PitchSpelling.CoarseAdjustment,
//            _ coarseAdjustmentHigher: PitchSpelling.CoarseAdjustment
//        ) -> EnumKind
//        {
//            // refactor
//            if coarseAdjustmentLower.direction == coarseAdjustmentHigher.direction {
//                return major
//            } else if coarseAdjustmentLower.direction.rawValue > coarseAdjustmentHigher.direction.rawValue {
//                return minor
//            } else {
//                return augmented
//            }
//        }
    }
    
    /// Third interval family.
    public class Third: EnumFamily, ImperfectIntervalQualityType {
        
        /// diminished Third interval.
        public static let diminished: EnumKind = .diminishedThird
        
        /// minor Third interval.
        public static let minor: EnumKind = .minorThird
        
        /// major Third interval.
        public static let major: EnumKind = .majorThird
        
        /// augmented Third interval.
        public static let augmented: EnumKind = .augmentedThird
        
        public override class var members: [EnumKind] {
            return [diminished, minor, major, augmented]
        }
        
        public override class func kind(forPitchSpellingDyad pitchSpellingDyad: PitchSpellingDyad)
            -> EnumKind
        {
            return major
        }
        
//        public override class func kind(
//            coarseAdjustmentLower: PitchSpelling.CoarseAdjustment,
//            _ coarseAdjustmentHigher: PitchSpelling.CoarseAdjustment
//        ) -> EnumKind
//        {
//            let diff = coarseAdjustmentHigher.direction.rawValue - coarseAdjustmentLower.direction.rawValue
//            switch diff {
//            case -2: return diminished
//            case -1: return minor
//            case 0: return major
//            case 2: return augmented
//            default: fatalError() // impossible?
//            }
//        }
    }
    
    /// Fourth interval family.
    public class Fourth: EnumFamily, PerfectIntervalQuatlityType {
        
        /// diminished Fourth interval.
        public static let diminished: EnumKind = .diminishedFourth
        
        /// perfect Fourth interval.
        public static let perfect: EnumKind = .perfectFourth
        
        /// augmented Fouth interval.
        public static let augmented: EnumKind = .augmentedFourth
        
        public override class var members: [EnumKind] {
            return [diminished, perfect, augmented]
        }
        
        public override class func kind(forPitchSpellingDyad pitchSpellingDyad: PitchSpellingDyad)
            -> EnumKind
        {
            return perfect
        }

//        public override class func kind(
//            coarseAdjustmentLower: PitchSpelling.CoarseAdjustment,
//            _ coarseAdjustmentHigher: PitchSpelling.CoarseAdjustment
//        ) -> EnumKind
//        {
//            // refactor
//            if coarseAdjustmentLower.direction == coarseAdjustmentHigher.direction {
//                return perfect
//            } else if coarseAdjustmentLower.direction.rawValue > coarseAdjustmentHigher.direction.rawValue {
//                return diminished
//            } else {
//                return augmented
//            }
//        }
    }
    
    /// Fifth interval family.
    public class Fifth: EnumFamily, PerfectIntervalQuatlityType {
        


private protocol PerfectIntervalQuatlityType: IntervalQualityType {
    static var perfect: IntervalQuality.EnumKind { get }
    static var perfectMembers: [IntervalQuality.EnumKind] { get }
}

extension PerfectIntervalQuatlityType {
    static var perfectMembers: [IntervalQuality.EnumKind] {
        return [perfect, diminished, augmented]
    }
}

private protocol ImperfectIntervalQualityType: IntervalQualityType {
    static var major: IntervalQuality.EnumKind { get }
    static var minor: IntervalQuality.EnumKind { get }
    static var imperfectMembers: [IntervalQuality.EnumKind] { get }
}

extension ImperfectIntervalQualityType {
    static var imperfectMembers: [IntervalQuality.EnumKind] {
        return [major, minor, diminished, augmented]
    }
}

/**
 Quality of Interval between two `SpelledPitch` objects.
