예제 #1
0
        /// <summary>
        /// 从UTAU音源文件夹获取音源数据
        /// 没有pitch
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static Bank getToneList(string path)
        {
            Bank tlist = new Bank(new byte[] { });

            List <byte> alldata = new List <byte>();

            string[] filelist = getSoundList(path);

            foreach (var file in filelist)
            {
                byte[] tmpdata = WAVControl.getSampleByte(WAVControl.getSample(file));
                int    begin   = alldata.Count;
                int    length  = tmpdata.Length;
                string name    = getSoundName(file);
                foreach (var t in tmpdata)
                {
                    alldata.Add(t);
                }
                tlist.sunit[name] = new Syllable(begin, length, 66);
            }

            tlist.oridata = alldata.ToArray();

            return(tlist);
        }
예제 #2
0
 private void button10_Click(object sender, EventArgs e)
 {
     try
     {
         string path = textBox1.Text;
         int[]  data = WAVControl.getSample(path);
         pictureBox1.Image    = getPPImage(data);
         pictureBox2.SizeMode = PictureBoxSizeMode.Zoom;
         pictureBox2.Image    = getFFTImage(data);
     }
     catch
     {
     }
 }