示例#1
0
        public ChordType GetFirstChordType()
        {
            ChordType type = ChordType.Major;

            switch (Type)
            {
            case ScaleType.Major:
            case ScaleType.Lydian:
            case ScaleType.Mixolydian:
                type = ChordType.Major;
                break;

            case ScaleType.Minor:
            case ScaleType.Dorian:
            case ScaleType.Phyrigian:
                type = ChordType.Minor;
                break;

            case ScaleType.Locrian:
                type = ChordType.Diminished;
                break;
            }

            return(type);
        }
示例#2
0
        public SongStyle(SongComposer composer, Song song, MusicalScale musicalScale, float minimumNoteLength)
        {
            Composer = composer;
            Song     = song;

            RunningTime = 0;

            MusicalScale      = musicalScale;
            MinimumNoteLength = minimumNoteLength;

            ChordsTicksToHold = new int[4];
            BassMelodicStyles = new BassMelodicStyle[4];
            MelodicStyles     = new MelodicStyle[4];
            FirstDegrees      = new int[4];
            BassTimbres       = new NoteTimbre[4];
            ChordTimbres      = new NoteTimbre[4];
            MelodyTimbres     = new NoteTimbre[4];
            ChordTypes        = new ChordType[4];

            for (int i = 0; i < 4; i++)
            {
                ChordsTicksToHold[i] = -1;
                BassMelodicStyles[i] = BassMelodicStyle.None;
                MelodicStyles[i]     = MelodicStyle.None;
                FirstDegrees[i]      = -1;
                BassTimbres[i]       = NoteTimbre.None;
                ChordTimbres[i]      = NoteTimbre.None;
                MelodyTimbres[i]     = NoteTimbre.None;
                ChordTypes[i]        = ChordType.None;
            }

            LoadChords();
        }
示例#3
0
 public MidiChord(MidiNotes root, ChordType type)
 {
     rootNote  = root;
     chordType = type;
     interval  = GenerateInterval(type);
     //    nextFifth = generateNextFifth(this);
 }
        private Chord BuildRandomChord()
        {
            ChordType chordType = this.BuildRandomChordType();
            NoteType  noteType  = this.BuildNoteType();

            return(new Chord(chordType, noteType));
        }
示例#5
0
 protected ChordBase(Pitch root, ChordType chordType)
 {
     pitches = new List<Pitch>() { root };
     switch (chordType)
     {
         case ChordType.Maj53:
             break;
         case ChordType.Min53:
             break;
         case ChordType.Aug53:
             break;
         case ChordType.Dim53:
             break;
         case ChordType.dominant7:
             break;
         case ChordType.dim7:
             break;
         case ChordType.m7flat5:
             break;
         case ChordType.min7:
             break;
         case ChordType.minMaj7:
             break;
     }
         
     
 }
示例#6
0
 public bool Is(ChordType rhs)
 {
     if (ct.Equals(rhs))
     {
         return(true);
     }
     return(false);
 }
示例#7
0
 /// <summary>
 /// Constructs a new instance of the StyleEntry class.
 /// </summary>
 /// <param name="Arrange">The arrangement</param>
 /// <param name="Part">The style part</param>
 /// <param name="Instrument">The instrument</param>
 /// <param name="ChordType">The chord family</param>
 /// <param name="Message">The message</param>
 public StyleEntry(Arrangement Arrange, StylePart Part, Instrument Instrument, ChordType ChordType, MidiMessage Message)
 {
     this.arrangement = Arrange;
     this.part        = Part;
     this.instrument  = Instrument;
     this.chordType   = ChordType;
     this.message     = Message;
 }
示例#8
0
 private void OnChordChanged(ChordType t)
 {
     this.chord = t;
     if (this.ChordFamilyChanged != null)
     {
         this.ChordFamilyChanged(this, new ChordTypeEventArgs(t));
     }
 }
示例#9
0
            public void ShowChordResults(WebView webView, NameValueCollection parameters)
            {
                string page;
                var    model = new ShowChordModel
                {
                    Root                = _currentRoot,
                    ChordType           = _currentChordType,
                    conv                = _currentSettings.conv,
                    ShowBasicChordTypes = _currentSettings.ShowBasicChordTypes
                };

                model.Populate(parameters);

                Chord chord;
                var   id          = string.Format("{0}{1}", model.Root, model.ChordType.ToDescription());
                var   resultModel = new ShowChordResultModel
                {
                    conv          = _currentSettings.conv,
                    AllowPartial  = _allowPartial,
                    AllRoots      = _allRoots,
                    AllChordTypes = _allChordTypes
                };

                if (!string.IsNullOrEmpty(id))
                {
                    resultModel.Populate(parameters);

                    if (!Chord.TryParse(id, NamingConvention.English, out chord))
                    {
                        resultModel.Error = $"{id} is not a valid chord in {_currentSettings.conv} naming convention";
                    }
                    else
                    {
                        _currentRoot               = chord.Root;
                        _currentChordType          = chord.ChordType;
                        _allowPartial              = resultModel.AllowPartial;
                        resultModel.Root           = _currentRoot;
                        resultModel.ChordType      = _currentChordType.ToDescription();
                        resultModel.ChordDecorator = new ChordDecorator(chord, _currentSettings.conv);
                    }
                    var template = new ShowChordResultView {
                        Model = resultModel
                    };

                    page = template.GenerateString();
                }
                else
                {
                    var template = new ShowChordView {
                        Model = model
                    };

                    page = template.GenerateString();
                }

                webView.LoadDataWithBaseURL("file:///android_asset/?page=ShowChordResults", page, "text/html", "UTF-8", null);
            }
示例#10
0
 public Chord(
     int _intervalFromBaseNote,
     int _octave,
     ChordType _chordType = ChordType.MAJOR
     )
 {
     intervalFromBaseNote = _intervalFromBaseNote;
     octave    = _octave;
     chordType = _chordType;
 }
示例#11
0
        /// <summary>
        /// If available, gets the address of the style part in the given chord family
        /// </summary>
        /// <param name="Type"></param>
        /// <returns></returns>
        public int this[ChordType Type] {
            get {
                if (this.IsAvailable(Type))
                {
                    return(this.GetAddress(Type));
                }

                throw new StylePartNotFoundException();
            }
        }
示例#12
0
        public void Test(string token, ChordType expectedChordType)
        {
            // Arrange
            ChordTypeParser chordTypeParser = new ChordTypeParser();

            // Act
            ChordType actualChordType = chordTypeParser.Parse(token);

            // Assert
            Assert.Equal(expectedChordType, actualChordType);
        }
示例#13
0
        public override int GetHashCode()
        {
            unchecked
            {
                var result = Root.GetHashCode();

                result = (result * 397) ^ ChordType.GetHashCode();

                return(result);
            }
        }
示例#14
0
 public HarmonyNode(NoteData key, int degree, int[] scale)
 {
     this.degree      = degree;
     this.meanNote    = new NoteData(key.Index + GetSum(scale, 0, degree));;
     this.thirdNote   = new NoteData(meanNote.Index + GetSum(scale, degree, 2));
     this.fourthNote  = new NoteData(meanNote.Index + GetSum(scale, degree, 3));
     this.fifthNote   = new NoteData(meanNote.Index + GetSum(scale, degree, 4));
     this.seventhNote = new NoteData(meanNote.Index + GetSum(scale, degree, 6));
     type             = CalculateChordType();
     this.baseScale   = scale;
 }
        private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
        {
            ChordType[] t = new ChordType[] {
                ChordType.Major,
                ChordType.Minor,
                ChordType.Seventh
            };

            this.ctype = t[comboBox4.SelectedIndex];

            this.RenderMessages();
        }
示例#16
0
 public Chord(Note root, ChordType chordType)
 {
     Root      = root;
     ChordType = chordType;
     Intervals = ChordType.ToIntervals();
     Notes     = Intervals.Select(i => Root.NoteAtInterval(i))
                 .ToArray();
     NormalizedNotes = Notes.Select(i => Note.Normalize(i))
                       .ToArray();
     NonMandatoryNotes = ChordType.ToNonMandatoryIntervals()
                         .Select(i => Root.NoteAtInterval(i))
                         .ToArray();
 }
示例#17
0
        /// <summary>
        /// Gets the address of the style part in the given chord family
        /// </summary>
        /// <param name="Type">The chord family</param>
        /// <returns>The address of the style part data</returns>
        private int GetAddress(ChordType Type)
        {
            switch (Type)
            {
            case ChordType.Major: return(this.major);

            case ChordType.Minor: return(this.minor);

            case ChordType.Seventh: return(this.seventh);
            }

            throw new Exception("Ismeretlen paraméter");
        }
        private void OnSelectedPartChanged()
        {
            this.SelectedArrangement = rbArrangementBasic.Checked ? Arrangement.Basic : Arrangement.Advanced;

            this.SelectedPart = (from c in this.StylePartMappings
                                 where c.Key.Checked
                                 select c.Value).ElementAt(0);

            this.SelectedInstrument  = isInstrument.SelectedInstrument;
            this.SelectedChordFamily = cfsChord.SelectedChordType;

            this.UpdateMidiEvents();
        }
        private void GenerateVmollOmitRChordMidi(ChordType ct, string desc, ref int [] n)
        {
            var keys = new KeyAndName[] {
                new KeyAndName(MusicKey.Cmoll, "H"),
                new KeyAndName(MusicKey.CISmoll, "C"),
                new KeyAndName(MusicKey.Dmoll, "Cis"),
                new KeyAndName(MusicKey.ESmoll, "D"),
                new KeyAndName(MusicKey.Emoll, "Es"),
                new KeyAndName(MusicKey.Fmoll, "E"),
                new KeyAndName(MusicKey.FISmoll, "F"),
                new KeyAndName(MusicKey.Gmoll, "Fis"),
                new KeyAndName(MusicKey.ASmoll, "G"),
                new KeyAndName(MusicKey.Amoll, "As"),
                new KeyAndName(MusicKey.Bmoll, "A"),
                new KeyAndName(MusicKey.Hmoll, "B"),
            };

            ct.chordDegree = CD.V;
            System.Diagnostics.Debug.Assert(ct.omission == Omission.First);

            int ik = 0;

            foreach (var k in keys)
            {
                ct.musicKey = k.k;

                var pos = new PositionOfAChord[] { PositionOfAChord.密, PositionOfAChord.開, PositionOfAChord.Oct };
                foreach (var p in pos)
                {
                    ct.positionOfAChord = p;

                    ChordListGenerator clg = new ChordListGenerator(ct);
                    clg.CompleteDeg = true;
                    var chords = clg.Generate();
                    for (int i = 0; i < chords.Count(); ++i)
                    {
                        List <Chord> chord1 = new List <Chord>();
                        chord1.Add(chords[i]);
                        using (var bw = new BinaryWriter(File.Open(string.Format("midi/{0}{1}_{2}.mid", k.name, desc, n[ik]), FileMode.Create))) {
                            var mm = Chord.ChordListToMidiFile(chord1, 60);
                            mm.Write(bw);
                        }
                        ++n[ik];
                    }
                }

                ++ik;
            }
        }
        private void GenerateIdurChordMidi(ChordType ct, string desc, bool completeDeg, ref int[] n)
        {
            var keys = new KeyAndName[] {
                new KeyAndName(MusicKey.Cdur, "C"),
                new KeyAndName(MusicKey.CISdur, "Cis"),
                new KeyAndName(MusicKey.Ddur, "D"),
                new KeyAndName(MusicKey.ESdur, "Es"),
                new KeyAndName(MusicKey.Edur, "E"),
                new KeyAndName(MusicKey.Fdur, "F"),
                new KeyAndName(MusicKey.FISdur, "Fis"),
                new KeyAndName(MusicKey.Gdur, "G"),
                new KeyAndName(MusicKey.ASdur, "As"),
                new KeyAndName(MusicKey.Adur, "A"),
                new KeyAndName(MusicKey.Bdur, "B"),
                new KeyAndName(MusicKey.Hdur, "H"),
            };

            ct.chordDegree = CD.I;

            int ik = 0;

            foreach (var k in keys)
            {
                ct.musicKey = k.k;

                var pos = new PositionOfAChord[] { PositionOfAChord.密, PositionOfAChord.開, PositionOfAChord.Oct };
                foreach (var p in pos)
                {
                    ct.positionOfAChord = p;

                    ChordListGenerator clg = new ChordListGenerator(ct);
                    clg.CompleteDeg = completeDeg;
                    var chords = clg.Generate();
                    for (int i = 0; i < chords.Count(); ++i)
                    {
                        List <Chord> chord1 = new List <Chord>();
                        chord1.Add(chords[i]);
                        using (var bw = new BinaryWriter(File.Open(string.Format("midi/{0}{1}_{2}.mid", k.name, desc, n[ik]), FileMode.Create))) {
                            var mm = Chord.ChordListToMidiFile(chord1, 60);
                            mm.Write(bw);
                        }
                        ++n[ik];
                    }
                }

                ++ik;
            }
        }
示例#21
0
        /// <summary>
        /// Reads the MIDI messages at the given address
        /// </summary>
        /// <param name="Address">The address to read</param>
        /// <param name="CType">The chord family to read</param>
        /// <returns>A collection that stores the MidiMessage instances</returns>
        private IEnumerable <MidiMessage> GetMidiMessages(InstrumentAddress Address, ChordType CType)
        {
            int Addr;

            if (Address.IsAvailable(CType) && Address[CType] < this.FileContents.Length)
            {
                Addr = Address[CType];
            }
            else
            {
                yield break;
            }

            Debug.WriteLine("Address: {0} Chord: {1}", new object[] {
                Address, CType
            });

            int Time = 0;

            for (int Offset = Addr - 1; true; Offset += 6)
            {
                if (this.FileContents[Offset + 1] == 0x8F)
                {
                    Debug.WriteLine("Break\n");
                    yield break;
                }

                byte[] Data = new byte[6];
                Array.Copy(
                    this.FileContents,
                    Offset,
                    Data,
                    0,
                    6
                    );

                MidiMessage msg = MidiMessage.CreateFromData(Data, Time);
                Time += this.FileContents[Offset];

                Debug.WriteLine("Offset: {0}, Message: {1}", new object[] {
                    Offset.ToString("X"),
                    msg.MessageType.ToString()
                });

                yield return(msg);
            }
        }
示例#22
0
        public Chord GenerateChord(ChordType chordType, int octave)
        {
            if (currentScaleType == ScaleType.Pentatonic)
            {
                return(new Chord(new int[] { 0, 1, 2, 3 }));
            }

            if (currentScaleType == ScaleType.Major ||
                currentScaleType == ScaleType.NatMinor ||
                currentScaleType == ScaleType.HarMinor)
            {
                int correction = octave * 12;
                int root       = (int)chordType + correction;
                int range      = 28;
                return(new Chord(new int[] { root % range, (root + 2) % range, (root + 4) % range }));
            }

            return(new Chord(new int[] { }));
        }
示例#23
0
    public void PlayChord(AudioSource source, ChordType type)
    {
        if (!gameObject.GetComponentInParent <Background>().GetComponent <AudioSource>().isPlaying)
        {
            return;
        }

        source.Stop();
        source.clip = Chord;
        var currentBeat = BackgroundMusic.time.Sec2Beat(BPM);
        var chord       = Mathf.FloorToInt(currentBeat / 8) % 4;
        var time        = chord * (Utils.Beat2Sec(4.0f * 4, BPM)) + (int)type * (Utils.Beat2Sec(4 * 4 * 4, BPM));

        if (type == ChordType.GrabOld || type == ChordType.GrabNew)
        {
            var note = -1;
            do
            {
                note = Random.Range(0, 4);
            } while (note == lastNote || note == prelastNote);

            prelastNote = lastNote;
            lastNote    = note;

            time += note * Utils.Beat2Sec(4.0f, BPM);
        }
        source.time = time;
        source.Play();
        Debug.Log(source);

        if (PlayTime.ContainsKey(source))
        {
            StopCoroutine(PlayTime[source]);
        }
        var tmp = StopAfterTime(3.8f.Beat2Sec(BPM), source);

        PlayTime[source] = tmp;
        StartCoroutine(tmp);
    }
        public Progression Parse(string input, int pitchOffset)
        {
            input = this.Sanitize(input);

            string[] tokens = input.Split(" ");

            bool isExpectedChord = true;

            Progression progression = new Progression();

            foreach (string token in tokens)
            {
                if (isExpectedChord)
                {
                    ChordType chordType = this.chordTypeParser.Parse(token);
                    Chord chord = new Chord(chordType, (NoteType)pitchOffset);
                    progression.AddChord(chord);
                }
                else
                {
                    IntervalType interval = this.intervalParser.Parse(token);
                    pitchOffset += (int)interval;

                    while (pitchOffset >= 12)
                    {
                        pitchOffset -= 12;
                    }
                    while (pitchOffset < 0)
                    {
                        pitchOffset += 12;
                    }
                }

                isExpectedChord = !isExpectedChord;
            }

            return progression;
        }
示例#25
0
        /// <summary>
        /// Reads the MIDI messages at the given address
        /// </summary>
        /// <param name="Address">The address to read</param>
        /// <param name="CType">The chord family to read</param>
        /// <returns>A collection that stores the MidiMessage instances</returns>
        private IEnumerable <MidiMessage> GetMidiMessages(InstrumentAddress Address, ChordType CType)
        {
            int Addr;

            if (Address.IsAvailable(CType) && Address[CType] < this.FileContents.Length)
            {
                Addr = Address[CType];
            }
            else
            {
                yield break;
            }

            int Time = 0;

            for (int Offset = Addr; true; Offset += 6)
            {
                if (this.FileContents[Offset + 1] == 0x8F)
                {
                    yield break;
                }

                byte[] Data = new byte[6];
                Array.Copy(
                    this.FileContents,
                    Offset,
                    Data,
                    0,
                    6
                    );

                MidiMessage msg = MidiMessage.CreateFromData(Data, Time);
                Time += this.FileContents[Offset];

                yield return(msg);
            }
        }
示例#26
0
        public AcademicChord(Note root, Note[] notes)
        {
            this.root  = root;
            this.notes = notes;

            StringBuilder builder = new StringBuilder();

            builder.Append(NoteNames.Get(root));
            if (notes.Length >= 3)
            {
                int diff1 = Operators.GetAbsSemitonesDifference(notes[1], notes[0]);
                int diff2 = Operators.GetAbsSemitonesDifference(notes[2], notes[0]);
                switch (diff1)
                {
                case 4 when diff2 == 7:
                    chordType = ChordType.Major;
                    builder.Append(ChordNames.Get(ChordType.Major));
                    break;

                case 3 when diff2 == 7:
                    chordType = ChordType.Minor;
                    builder.Append(ChordNames.Get(ChordType.Minor));
                    break;

                case 3 when diff2 == 6:
                    chordType = ChordType.Diminished;
                    builder.Append(ChordNames.Get(ChordType.Diminished));
                    break;

                default:
                    chordType = ChordType.Undefined;
                    break;
                }
            }
            _name = builder.ToString();
        }
示例#27
0
文件: Chord.cs 项目: darth10/Frets
        /// <summary>
        /// Creates a chord
        /// </summary>
        /// <param name="flags">Flags for the chord</param>
        /// <param name="strings">Number of strings in the chord</param>
        /// <param name="family">Chord family of the chord</param>
        /// <param name="type">Chord type of the chord</param>
        public Chord(ChordFlags flags, int strings, ChordFamily family, ChordType type)
        {
            _strings = new int[strings];
            InitializeStringsToValue(0);
            _nStrings = strings;
            _flags = flags;

            #region Template for any chord type
            //this[-6] = 0; this[-5] = 0; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 0;
            //switch (family)
            //{
            //    case ChordFamily.C:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.D:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.E:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.F:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.G:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.A:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.B:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.CSharp:
            //    case ChordFamily.DFlat:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.DSharp:
            //    case ChordFamily.EFlat:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.FSharp:
            //    case ChordFamily.GFlat:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.GSharp:
            //    case ChordFamily.AFlat:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //    case ChordFamily.ASharp:
            //    case ChordFamily.BFlat:
            //        InitializeStringsToValue(-1);
            //        this[-6] = -1; this[-5] = -1; this[-4] = -1; this[-3] = -1; this[-2] = -1; this[-1] = -1;
            //        break;
            //}
            #endregion

            switch (type)
            {
                case ChordType.Major:
                    #region Major chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 3; this[-5] = 3; this[-4] = 2; this[-3] = 0; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 1; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 3; this[-3] = 2; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 4; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 4; this[-4] = 3; this[-3] = 1; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 4; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 4; this[-3] = 3; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 4; this[-5] = 3; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 3; this[-2] = 3; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Minor:
                    #region Minor chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 3; this[-4] = 1; this[-3] = 0; this[-2] = 4; this[-1] = 3;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 3; this[-1] = 1;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 0; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 3; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 0; this[-3] = 3; this[-2] = 3; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 4; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 0; this[-5] = -1; this[-4] = 2; this[-3] = 1; this[-2] = 2; this[-1] = 4;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 4; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 4; this[-2] = 4; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 3; this[-2] = 3; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Suspended_4th:
                    #region Suspended 4th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 3; this[-5] = 3; this[-4] = 3; this[-3] = 0; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 2; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 3; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 3; this[-4] = 0; this[-3] = 0; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 3; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 4; this[-2] = 5; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(4);
                            this[-6] = 4; this[-5] = 4; this[-4] = 6; this[-3] = 6; this[-2] = 7; this[-1] = 4;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 1; this[-2] = 4; this[-1] = 4;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 4; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(4);
                            this[-6] = 4; this[-5] = 4; this[-4] = 6; this[-3] = 6; this[-2] = 4; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 4; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Augmented_5th:
                    #region Augmented 5th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = 2; this[-5] = -1; this[-4] = 4; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = -1; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = -1; this[-4] = 3; this[-3] = 2; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 1; this[-5] = 0; this[-4] = 3; this[-3] = 2; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(3);
                            this[-6] = 3; this[-5] = -1; this[-4] = 5; this[-3] = 4; this[-2] = 4; this[-1] = 3;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 3; this[-3] = 2; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            this[-6] = 3; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = -1; this[-4] = 4; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = -1; this[-4] = 4; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Diminished_5th:
                    #region Diminished 5th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 4; this[-3] = 5; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = 1; this[-5] = -1; this[-4] = 3; this[-3] = 1; this[-2] = 3; this[-1] = 1;
                            break;
                        case ChordFamily.E:
                            InitializeStringsToValue(-1);
                            this[-6] = 3; this[-5] = -1; this[-4] = 5; this[-3] = 3; this[-2] = 5; this[-1] = 3;
                            break;
                        case ChordFamily.F:
                            this[-6] = 1; this[-5] = 2; this[-4] = 3; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 4; this[-4] = 0; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 5; this[-5] = 6; this[-4] = 7; this[-3] = 5; this[-2] = 4; this[-1] = 5;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = 1; this[-5] = -1; this[-4] = 3; this[-3] = 4; this[-2] = 3; this[-1] = 1;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 0; this[-5] = -1; this[-4] = 2; this[-3] = 0; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = 2; this[-5] = -1; this[-4] = 4; this[-3] = 2; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            this[-6] = 2; this[-5] = 0; this[-4] = 4; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 4; this[-5] = 5; this[-4] = 0; this[-3] = 4; this[-2] = 3; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            this[-6] = 0; this[-5] = 1; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 0;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Major_6th:
                    #region Major 6th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 2; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 0; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 1; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 3; this[-4] = 3; this[-3] = 5; this[-2] = 3; this[-1] = 5;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 4; this[-2] = 4; this[-1] = 4;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 1; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 4; this[-4] = 4; this[-3] = 6; this[-2] = 4; this[-1] = 6;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 4; this[-5] = 3; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 3; this[-2] = 3; this[-1] = 3;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Minor_6th:
                    #region Minor 6th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 3; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 0; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 3; this[-3] = 1; this[-2] = 3; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 0; this[-5] = 1; this[-4] = 0; this[-3] = 0; this[-2] = 3; this[-1] = 0;
                            break;
                        case ChordFamily.A:
                            this[-6] = 2; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 0; this[-3] = 1; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 0; this[-5] = 4; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 4;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 4; this[-4] = 4; this[-3] = 6; this[-2] = 4; this[-1] = 5;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 1; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 3; this[-2] = 3; this[-1] = 3;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Suspended_7th:
                    #region Suspended 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 3; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 0; this[-3] = 2; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 1; this[-3] = 3; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 3; this[-4] = 0; this[-3] = 0; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 0; this[-2] = 3; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 2; this[-3] = 2; this[-2] = 5; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 4; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 1; this[-2] = 2; this[-1] = 4;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 2; this[-3] = 4; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(4);
                            this[-6] = 4; this[-5] = 4; this[-4] = 4; this[-3] = 6; this[-2] = 4; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 1; this[-3] = 1; this[-2] = 3; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Dominant_7th:
                    #region Dominant 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 3; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 1; this[-2] = 3; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 0; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 2; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 4; this[-4] = 3; this[-3] = 1; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 4; this[-5] = 3; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 1; this[-2] = 3; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Augmented_7th:
                    #region Augmented 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 2; this[-3] = 3; this[-2] = 1; this[-1] = 4;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 0; this[-3] = 3; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 0; this[-3] = 1; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 1; this[-3] = 2; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.A:
                            this[-6] = 1; this[-5] = 4; this[-4] = 3; this[-3] = 0; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 2; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 3; this[-3] = 4; this[-2] = 2; this[-1] = 5;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 1; this[-3] = 4; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 2; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(4);
                            this[-6] = 4; this[-5] = 4; this[-4] = 4; this[-3] = 6; this[-2] = 4; this[-1] = 4;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 2;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Flat5_7th:
                    #region Flat-5 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 2; this[-3] = 3; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 0; this[-3] = 1; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 2; this[-3] = 3; this[-2] = 3; this[-1] = 4;
                            break;
                        case ChordFamily.F:
                            this[-6] = 1; this[-5] = 0; this[-4] = 1; this[-3] = 2; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 3; this[-3] = 4; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 1; this[-3] = 0; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 2; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 3; this[-3] = 4; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 1; this[-3] = 2; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 2; this[-3] = 3; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 0; this[-3] = 1; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            this[-6] = 0; this[-5] = 1; this[-4] = 2; this[-3] = 1; this[-2] = 3; this[-1] = 4;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Major_7th:
                    #region Major 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 0; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 1; this[-3] = 1; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 2; this[-3] = 2; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 2;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 1; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 3; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 4; this[-4] = 3; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 3; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 3; this[-3] = 3; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 3; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 2; this[-2] = 3; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.MajorMinor_7th:
                    #region Major-minor 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            InitializeStringsToValue(3);
                            this[-6] = 3; this[-5] = 5; this[-4] = 4; this[-3] = 3; this[-2] = 3; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 2; this[-4] = 4; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 4;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 3; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 1; this[-3] = 1; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 2; this[-2] = 2; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Minor_7th:
                    #region Minor 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            InitializeStringsToValue(3);
                            this[-6] = 3; this[-5] = 5; this[-4] = 3; this[-3] = 3; this[-2] = 3; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 0; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 0; this[-3] = 2; this[-2] = 0; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 4; this[-2] = 2; this[-1] = 4;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 2; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 3; this[-3] = 1; this[-2] = 2; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.AugmentedMajor_7th:
                    #region Augmented major 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 0; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 5; this[-4] = 4; this[-3] = 3; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = -1; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            this[-6] = 0; this[-5] = 0; this[-4] = 2; this[-3] = 2; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 3; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = -1; this[-3] = 1; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = -1; this[-3] = 3; this[-2] = 4; this[-1] = 3;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 4; this[-4] = 3; this[-3] = 2; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 0; this[-2] = 3; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 3; this[-3] = 3; this[-2] = 3; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 1; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 0; this[-3] = 2; this[-2] = 3; this[-1] = 2;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.HalfDiminished_7th:
                    #region Half-diminished 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.D:
                            this[-6] = 1; this[-5] = -1; this[-4] = 0; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 1; this[-4] = 0; this[-3] = 0; this[-2] = 3; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 2; this[-4] = 1; this[-3] = 1; this[-2] = 4; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            InitializeStringsToValue(3);
                            this[-6] = 3; this[-5] = 4; this[-4] = 3; this[-3] = 3; this[-2] = 6; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 1; this[-3] = 0; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.B:
                            this[-6] = 1; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            this[-6] = 0; this[-5] = 2; this[-4] = 2; this[-3] = 4; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = 2; this[-5] = -1; this[-4] = 1; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 3; this[-4] = 2; this[-3] = 2; this[-2] = 5; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 2; this[-5] = 2; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 2;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 2; this[-3] = 1; this[-2] = 2; this[-1] = 4;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Diminished_7th:
                    #region Diminished 7th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.D:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 1; this[-4] = 2; this[-3] = 0; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 2; this[-4] = 3; this[-3] = 1; this[-2] = 3; this[-1] = 1;
                            break;
                        case ChordFamily.G:
                            this[-6] = 0; this[-5] = 1; this[-4] = 2; this[-3] = 0; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.A:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 0; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 3; this[-4] = 4; this[-3] = 2; this[-2] = 4; this[-1] = 2;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = -1; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Major_9th:
                    #region Major 9th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            this[-6] = 0; this[-5] = 3; this[-4] = 2; this[-3] = 3; this[-2] = 3; this[-1] = 0;
                            break;
                        case ChordFamily.D:
                            this[-6] = 0; this[-5] = 0; this[-4] = 0; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 2;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 3;
                            break;
                        case ChordFamily.G:
                            this[-6] = 0; this[-5] = 0; this[-4] = 0; this[-3] = 0; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.A:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 2; this[-3] = 2; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 2; this[-2] = 2; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 2; this[-4] = 1; this[-3] = 1; this[-2] = 2; this[-1] = 1;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 1; this[-4] = 1; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 4;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 1; this[-4] = 0; this[-3] = 1; this[-2] = 1; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
                case ChordType.Diminished_9th:
                    #region Diminished 9th chords
                    switch (family)
                    {
                        case ChordFamily.C:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 3; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.D:
                            this[-6] = 0; this[-5] = 0; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.E:
                            this[-6] = 0; this[-5] = 2; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                        case ChordFamily.F:
                            InitializeStringsToValue(1);
                            this[-6] = 1; this[-5] = 3; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.G:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 3; this[-3] = 1; this[-2] = 0; this[-1] = 3;
                            break;
                        case ChordFamily.A:
                            InitializeStringsToValue(-1);
                            this[-6] = 2; this[-5] = -1; this[-4] = 5; this[-3] = 3; this[-2] = 2; this[-1] = 5;
                            break;
                        case ChordFamily.B:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 2; this[-4] = 1; this[-3] = 2; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.CSharp:
                        case ChordFamily.DFlat:
                            InitializeStringsToValue(-1);
                            this[-6] = -1; this[-5] = 4; this[-4] = 3; this[-3] = 4; this[-2] = 3; this[-1] = 4;
                            break;
                        case ChordFamily.DSharp:
                        case ChordFamily.EFlat:
                            this[-6] = 0; this[-5] = 1; this[-4] = 1; this[-3] = 0; this[-2] = 2; this[-1] = 0;
                            break;
                        case ChordFamily.FSharp:
                        case ChordFamily.GFlat:
                            InitializeStringsToValue(2);
                            this[-6] = 2; this[-5] = 4; this[-4] = 2; this[-3] = 3; this[-2] = 2; this[-1] = 3;
                            break;
                        case ChordFamily.GSharp:
                        case ChordFamily.AFlat:
                            this[-6] = 2; this[-5] = 0; this[-4] = 1; this[-3] = 1; this[-2] = 1; this[-1] = 2;
                            break;
                        case ChordFamily.ASharp:
                        case ChordFamily.BFlat:
                            this[-6] = 1; this[-5] = 1; this[-4] = 0; this[-3] = 1; this[-2] = 0; this[-1] = 1;
                            break;
                    }
                    break;
                    #endregion
            }
        }
示例#28
0
 /// <summary>
 /// Determines whether that the style part is available in the given chord family
 /// </summary>
 /// <param name="Type">The chord family</param>
 /// <returns></returns>
 public bool IsAvailable(ChordType Type)
 {
     return(this.GetAddress(Type) > 0);
 }
示例#29
0
 public static Interval[] ToIntervals(this ChordType chordType)
 {
     return(ChordIntervals[chordType]);
 }
示例#30
0
 public static Interval[] ToNonMandatoryIntervals(this ChordType chordType)
 {
     return(NonMandatoryChordIntervals.ContainsKey(chordType)
                                      ? NonMandatoryChordIntervals[chordType]
                                      : new Interval[0]);
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ChordType ct = new ChordType();

            ct.musicKey         = MusicKey.Cdur;
            ct.keyRelation      = KeyRelation.I調;
            ct.chordDegree      = CD.I;
            ct.positionOfAChord = PositionOfAChord.密;
            ct.numberOfNotes    = NumberOfNotes.Triad;
            ct.omission         = Omission.None;
            ct.bassInversion    = Inversion.根音;
            ct.termination      = TerminationType.None;
            ct.is準固有            = false;
            ct.has固有VII         = false;
            ct.alteration       = AlterationType.None;
            ct.addedTone        = AddedToneType.None;

            int [] n;

            // 長三
            n = new int[12];
            ct.bassInversion = Inversion.根音;
            GenerateIdurChordMidi(ct, "", false, ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateIdurChordMidi(ct, "", false, ref n);

            // 短三
            n = new int[12];
            ct.bassInversion = Inversion.根音;
            GenerateImollChordMidi(ct, "m", false, ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateImollChordMidi(ct, "m", false, ref n);

            // 減三
            n = new int[12];
            ct.bassInversion = Inversion.根音;
            GenerateVIIdurChordMidi(ct, "dim", ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateVIIdurChordMidi(ct, "dim", ref n);

            // 増三
            n                = new int[12];
            ct.alteration    = AlterationType.Raised;
            ct.bassInversion = Inversion.根音;
            GenerateVdurChordMidi(ct, "aug", ref n);
            ct.alteration = AlterationType.None;

            // 長7
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Seventh;
            ct.bassInversion = Inversion.根音;
            GenerateIdurChordMidi(ct, "maj7", true, ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateIdurChordMidi(ct, "maj7", true, ref n);
            ct.bassInversion = Inversion.第7音;
            GenerateIdurChordMidi(ct, "maj7", true, ref n);
            ct.bassInversion = Inversion.根音;

            // 短7
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Seventh;
            ct.bassInversion = Inversion.根音;
            GenerateImollChordMidi(ct, "m7", true, ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateImollChordMidi(ct, "m7", true, ref n);
            ct.bassInversion = Inversion.第7音;
            GenerateImollChordMidi(ct, "m7", true, ref n);
            ct.bassInversion = Inversion.根音;

            // 属7
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Seventh;
            ct.bassInversion = Inversion.根音;
            GenerateVdurChordMidi(ct, "7", ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateVdurChordMidi(ct, "7", ref n);
            ct.bassInversion = Inversion.第7音;
            GenerateVdurChordMidi(ct, "7", ref n);
            ct.bassInversion = Inversion.根音;

            // 減5・7
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Seventh;
            ct.bassInversion = Inversion.根音;
            GenerateVIIdurChordMidi(ct, "m7flat5", ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateVIIdurChordMidi(ct, "m7flat5", ref n);
            ct.bassInversion = Inversion.第7音;
            GenerateVIIdurChordMidi(ct, "m7flat5", ref n);
            ct.bassInversion = Inversion.根音;

            // 長9
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Ninth;
            ct.bassInversion = Inversion.根音;
            GenerateVdurChordMidi(ct, "9", ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateVdurChordMidi(ct, "9", ref n);
            ct.bassInversion = Inversion.第7音;
            GenerateVdurChordMidi(ct, "9", ref n);
            ct.bassInversion = Inversion.根音;

            // 短9
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Ninth;
            ct.bassInversion = Inversion.根音;
            GenerateVmollChordMidi(ct, "m9", ref n);
            ct.bassInversion = Inversion.第3音;
            GenerateVmollChordMidi(ct, "m9", ref n);
            ct.bassInversion = Inversion.第7音;
            GenerateVmollChordMidi(ct, "m9", ref n);
            ct.bassInversion = Inversion.根音;

            // 減7
            n = new int[12];
            ct.numberOfNotes = NumberOfNotes.Ninth;
            ct.omission      = Omission.First;
            ct.bassInversion = Inversion.第3音;
            GenerateVmollOmitRChordMidi(ct, "dim7", ref n);
            ct.bassInversion = Inversion.根音;
            ct.omission      = Omission.None;

            Console.WriteLine("Done.");
        }
示例#32
0
        public static List <Chord> ObtainChordList(ChordType chordType)
        {
            var tmpChordType = chordType;

            if (chordType.chordDegree == CD.V_V)
            {
                // ドッペルドミナント等の前処理。
                // まず、この和音の内部調のV調を一時的に主調とする。(tmpChordType.musicKeyに入れる。)
                // 内部調をI度調とする。
                tmpChordType.chordDegree = CD.V;
                tmpChordType.musicKey    = new MusicKeyInfo(tmpChordType.musicKey, tmpChordType.keyRelation).RelatedKey(CD.V);
                tmpChordType.keyRelation = KeyRelation.I調;
            }
            else if (chordType.keyRelation != KeyRelation.I調)
            {
                // 内部調の前処理。
                // この和音の内部調を一時的に主調とする。(tmpChordType.musicKeyに入れる。)
                // 内部調をI度調とする。
                tmpChordType.musicKey    = new MusicKeyInfo(tmpChordType.musicKey, tmpChordType.keyRelation).InternalKey;
                tmpChordType.keyRelation = KeyRelation.I調;
            }

            var clg = new ChordListGenerator(tmpChordType);

            clg.Generate();
            var chordList = clg.GetChordList();

            if (chordType.chordDegree == CD.V_V)
            {
                // ドッペルドミナント等の後処理。
                // 元の主調、内部調に戻す。
                // 生成されたVの和音の機能をサブドミナントとし、音符の音度を付け直す。
                foreach (var c in chordList)
                {
                    c.ChordType = chordType;
                    c.UpdateFunction(FunctionType.Subdominant);
                    // 順番重要。調を主調に戻してから音度を付け直す。
                    c.RenumberNoteDegrees();
                }
            }
            else if (chordType.keyRelation != KeyRelation.I調)
            {
                // 内部調の後処理。
                // 元の主調、内部調に戻す。
                // 音符の音度を付け直す。
                foreach (var c in chordList)
                {
                    c.ChordType = chordType;
                    // 順番重要。調を主調に戻してから音度を付け直す。
                    c.RenumberNoteDegrees();
                }
            }

            // chordListが完成した。和音の説明をつける。
            foreach (var c in chordList)
            {
                c.ReevaluateChordVerdictAndChordFunction();
            }

            return(chordList);
        }
示例#33
0
文件: Guitar.cs 项目: darth10/Frets
 /// <summary>
 /// Creates a chord
 /// </summary>
 /// <param name="chordflags">Flags for the chord</param>
 /// <param name="chordFamily">Chord family</param>
 /// <param name="chordType">Chord type</param>
 /// <returns>Generated chord</returns>
 public Chord PlayChord(ChordFlags chordflags, ChordFamily chordFamily, ChordType chordType)
 {
     return new Chord(chordflags, _nStrings, chordFamily, chordType);
 }
示例#34
0
        public Chord GenerateChord(ChordType chordType, int octave)
        {
            if (currentScaleType == ScaleType.Pentatonic)
                return new Chord(new int[] { 0, 1, 2, 3 });

            if (currentScaleType == ScaleType.Major ||
                currentScaleType == ScaleType.NatMinor ||
                currentScaleType == ScaleType.HarMinor)
            {
                int correction = octave * 12;
                int root = (int)chordType + correction;
                int range = 28;
                return new Chord(new int[] { root % range , (root + 2) % range, (root + 4) % range});
            }

            return new Chord(new int[] { });
        }