コード例 #1
0
 public void inputMainMelodyChange(int x, string insertStr)//旋律轨道音符改变,x为音符序号,inserStr为要修改的字符串
 {
     if (inputMainMelody == null)
     {
         inputMainMelody = textBlock_main.Text;
     }
     inputMainMelody     = inputMainMelody.Remove(x * LengthOfeachNote, LengthOfeachNote).Insert(x * LengthOfeachNote, insertStr);
     textBlock_main.Text = NoteInput.devideBar(inputMainMelody);
     clearAll();
     setMelody(textBlock_main.Text);
 }
コード例 #2
0
        public void smartChord()
        {
            string myStr = inputMainMelody = textBlock_main.Text.Replace(",", "");

            textBlock_main.Text = NoteInput.devideBar(myStr);
            myAlgorithm.init();//初始化后重新算一遍
            string str = myAlgorithm.multiChordGenertor(textBlock_main.Text);

            if (str.Last() != ' ')
            {
                str += " ";
            }
            textBlock_main2.Text = inputMainChord = str;
        }
コード例 #3
0
 private void appBarButton_Accept_Click(object sender, RoutedEventArgs e)
 {
     textBlock_main.Text = NoteInput.devideBar(textBlock_main.Text);
     //textBox_inputNote.Text = "";//是否清空输入栏
     textBlock_main2.Text = myAlgorithm.multiChordGenertor(textBlock_main.Text);
 }