Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a Chord.
 /// </summary>
 /// <param name="root">The root of the chord. So for a C major, it would be C. For a F# minor in third inversion with A as bass, it would be F#. Ignores octave.</param>
 /// <param name="type">The type of the chord. Might be called colour. Diminished/minor/major/augmented.</param>
 /// <param name="bassNote">The bass note of the chord. Defaults to the root, but can be anything. Ignores octave, but the octave can always be retrieved at a later date.</param>
 /// <param name="inversion">The inversion of the chord.</param>
 public Chord(Tone root, ChordType type, Tone bassNote = null, int inversion = 1)
 {
     Root      = root;
     BassNote  = bassNote ?? root;
     Type      = type;
     Inversion = inversion;
 }
Ejemplo n.º 2
0
 public Scale(XElement element, IReadOnlyDictionary <string, ChordType> chordTypes)
 {
     Name          = element.ElementValue("name");
     RootChordType = chordTypes[element.ElementValue("rootChordType")];
     new int[] { 0 }.Union(element.Elements("step").Select(e => int.Parse(e.Value))).ToArray();
 }
Ejemplo n.º 3
0
 public Scale(string name, ChordType rootChordType, params int[] steps)
 {
     Name          = name;
     Steps         = steps.OrderBy(i => i).ToArray();
     RootChordType = rootChordType;
 }