Beispiel #1
0
        //public double[][] getZipDatas(int toneNum, int beforeToneNum = -1, int nextToneNum = -1)
        //{
        //    double[] datas;
        //    switch (toneNum)
        //    {
        //        case 1:
        //            if (nextToneNum == 5)
        //            {
        //                datas = new double[] { 1.1, 1.1, 0.9 };
        //            }
        //            else
        //            {
        //                datas = new double[] { 1 };
        //            }

        //            break;
        //        case 2:
        //            datas = new double[] { 0.9, 1 };
        //            break;
        //        case 3:
        //            datas = new double[] { 0.95, 0.88, 0.9 };
        //            break;
        //        case 4:
        //            datas = new double[] { 1.1, 0.98, 0.92 };
        //            break;
        //        case 5:
        //        default:
        //            datas = new double[] { 0.9, 0.87 };
        //            break;
        //    }

        //    //datas = new int[2] { 70, 130 };

        //    return datas;
        //}



        public int[] getSoundData(string name, double[][] pitdata, int len, double[] volume)
        {
            SynTone st  = new SynTone(name, pitdata, len, volume, 0, defaultpitch);
            var     res = sa.getSoundTone(st);

            return(res);
        }
 /// <summary>
 /// 根据音节信息对其合成,合成结果写回原对象
 /// </summary>
 /// <param name="t"></param>
 public void synTone(SynTone t)
 {
     t.setSynResult(getSoundTone(t));
 }
        /// <summary>
        /// 根据音节信息得到其合成波形
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public int[] getSoundTone(SynTone t)
        {
            var res = synthesis(tl, t.name, t.pit, t.length, t.pitch);

            return(res);
        }