Beispiel #1
0
        private void testJsonToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (fbd.ShowDialog() == DialogResult.OK)
            {
                string[] files = Directory.GetFiles(fbd.SelectedPath);


                List <string> x = new List <string>();

                foreach (string s in files)
                {
                    CSEQ c = CSEQ.FromFile(s);
                    foreach (SampleDef sd in c.samples)
                    {
                        if (!x.Contains(sd.Tag))
                        {
                            x.Add(sd.Tag);
                        }
                    }
                    foreach (SampleDefReverb sd in c.samplesReverb)
                    {
                        if (!x.Contains(sd.Tag))
                        {
                            x.Add(sd.Tag);
                        }
                    }
                }

                x.Sort();
                StringBuilder sb = new StringBuilder();

                foreach (string s in x)
                {
                    sb.AppendLine(s);
                }

                textBox1.Text = sb.ToString();
            }

            /*
             * string track = "canyon";
             * string instr = "long";
             * int id = 0;
             *
             *
             * MetaInst info = CTRJson.GetMetaInst(track, instr, id);
             * textBox1.Text += "" + info.Midi + " " + info.Key + " " + info.Title + " " + info.Pitch;
             */
        }