internal Tuning(TuningSet parent, XmlReader xmlReader) : this(parent) { if (null == xmlReader) { throw new ArgumentNullException(nameof(xmlReader)); } using (xmlReader) { if (xmlReader.IsStartElement() && xmlReader.Name == "tuning") { Name = xmlReader.GetAttribute("name"); string notes = xmlReader.GetAttribute("notes"); string[] s = notes.Split(';'); FullNote[] rootNotes = new FullNote[s.Length]; if (rootNotes.Length != Parent.Instrument.NumStrings) { throw new ArgumentOutOfRangeException(); } for (int i = 0; i < rootNotes.Length; i++) { rootNotes[i] = FullNote.Parse(s[i]); } RootNotes = rootNotes; } } UpdateParent = true; }
internal Tuning(TuningSet parent, string name, FullNote[] rootNotes) : this(parent) { Name = name; RootNotes = rootNotes; UpdateParent = true; }
public TuningAlreadyExistsException(TuningSet tuningSet, string longName) : base(tuningSet, longName) { }
public TuningNotFoundException(TuningSet tuningSet, string longName) : base(tuningSet, longName) { }
public TargetTuningException(TuningSet tuningSet, string longName) : base(tuningSet) { LongName = longName; }
public TuningSetException(TuningSet tuningSet) : base() { TuningSet = tuningSet; }
private Instrument(InstrumentSet parent) { ReadOnly = false; _tunings = new TuningSet(this); Parent = parent; }
private Tuning(TuningSet parent) { ReadOnly = false; _parent = parent ?? throw new ArgumentNullException(nameof(parent)); }