public static ChordComposition DecomposeChord(string chord) { ChordComposition comp = new ChordComposition(); comp.Chord = chord; // Split the chord into left hand and right hand if slash notation in used. char[] overToken = { '/' }; string[] chords = chord.Split(overToken); // Find number of chords. int numChords = chords.Count(); // If there is more than two chords then return empty set. if (chords.Count() > 2) return comp; comp.Chords = new ChordDefinition[numChords]; for (int i = 0; i < numChords; i++) { comp.Chords[i] = new ChordDefinition(); comp.Chords[i].Chord = chords[i]; comp.Chords[i].DefineChord(); } return comp; }
public ChordVoicing(ChordComposition composition) { Composition = composition; }