public override double concordance(Vector av) { MeanToneVector v = (MeanToneVector)av; int df = fifth - v.fifth; if (df < 0) { df = -df; } int c1t = (4 * df) / 17; int c2t = c1t + 1; int c1f = df - 4 * c1t; int c2f = df - 4 * c2t; int s1 = c1t * c1t + c1f * c1f; int s2 = c2t * c2t + c2f * c2f; if (s1 < s2) { return(3.0 * (double)s1); } return(3.0 * (double)s2); }
public override bool same(Vector av) { MeanToneVector v = (MeanToneVector)av; if (octave == v.octave && fifth == v.fifth) { return(true); } return(false); }
public override bool same_interval(Vector v, Vector w1, Vector w2) { MeanToneVector vc = (MeanToneVector)v; MeanToneVector w1c = (MeanToneVector)w1; MeanToneVector w2c = (MeanToneVector)w2; if (octave - vc.octave != w1c.octave - w2c.octave) { return(false); } if (fifth - vc.fifth != w1c.fifth - w2c.fifth) { return(false); } return(true); }
public override bool octave_equivalent(Vector av) { MeanToneVector v = (MeanToneVector)av; return(fifth == v.fifth); }