public void SetTuning(TuningType tuningType) { type = tuningType; switch (type) { case TuningType.EQUAL_TEMPERAMENT: tuningStrategy = new EqualTemperament(); break; case TuningType.PYTHAGOREAN_TUNING: tuningStrategy = new PythagoreanTuning(); break; case TuningType.MEANTONE_TEMPERAMENT: throw new System.NotImplementedException(); break; case TuningType.JUST_INTONATION: throw new System.NotImplementedException(); break; default: tuningStrategy = null; break; } }
public void SetTuning <T>() where T : ITuningStrategy, new() { tuningStrategy = new T(); }
public void SetCustomTuning(ITuningStrategy tuning) { tuningStrategy = tuning; }