Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Chord"/> class.
 /// </summary>
 /// <param name="newKey">Desired Key</param>
 /// <param name="newType">Desired Scale Type</param>
 public Chord(note newKey, chordType newType)
 {
     Key       = newKey;
     Name      = newKey.ToString() + " " + type.ToString();
     Intervals = ChordSpellings.intervalsIn[type];
     Notes     = GenerateNotes(newKey, Intervals);
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new <see cref="Tetrachord"/>.
 /// </summary>
 /// <param name="_chord">Desired Chord Type.</param>
 /// <param name="_offset">Desired offset if upper.</param>
 public Tetrachord(chordType desiredChordType, interval desiredOffset)
 {
     Name             = desiredChordType.ToString();
     currentChordType = desiredChordType;
     offset           = desiredOffset;
     Intervals        = ChordSpellings.intervalsIn[currentChordType];
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new major <see cref="Tetrachord"/>.
 /// </summary>
 public Tetrachord()
 {
     Name             = chordType.majorTetra.ToString();
     currentChordType = chordType.majorTetra;
     offset           = interval.maj2nd;
     Intervals        = ChordSpellings.intervalsIn[currentChordType];
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Tetrachord"/> class.
 /// </summary>
 /// <param name="desiredChordType">Desired chord type.</param>
 public Tetrachord(chordType desiredChordType)
 {
     //Debug.Log ("Lower Tetra ininialized");
     offset           = interval.root;
     currentChordType = desiredChordType;
     //upper or lower
     Intervals = ChordSpellings.intervalsIn[desiredChordType];
 }
Beispiel #5
0
 /// <summary>
 /// Builds a chord from intervals.
 /// </summary>
 /// <param name="newKey">Desired Key</param>
 /// <param name="newIntervals">Predefined intervals</param>
 public Chord(note newKey, interval[] newIntervals)
 {
     foreach (KeyValuePair <chordType, interval[]> kvp in ChordSpellings.intervalsIn)
     {
         if (Enumerable.SequenceEqual(kvp.Value, newIntervals))
         {
             type = kvp.Key;
             break;
         }
     }
     Intervals = newIntervals;
     Key       = newKey;
     Notes     = GenerateNotes(Key, Intervals);
 }