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;
            }
        }