基本信息
源码名称:C# 模拟钢琴演奏音乐源码(歌曲)
源码大小:0.07M
文件格式:.zip
开发语言:C#
更新时间:2017-08-22
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍


    模拟钢琴发声演奏出动听的音乐

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 模拟钢琴
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        //演奏者:猫九先森
        short[] n = { 230, 260, 290, 320, 350, 380, 410, 450,490,510,550,590,610,650,690,710};
        //foreach (short i in n)
        //Console.Beep(i, 500);
        public static  List<short> l = new List<short>();
        public static int p=500;    

        private void trackBar2_Scroll(object sender, EventArgs e)
        {
            p = trackBar2.Value;
        }
         public void tan( int j,int k)
        {
            Console.Beep(j, p);
            l.Add(n[k]);
            textBox1.Text  =" "  (k 1).ToString () ;
        }
        private void button1_Click(object sender, EventArgs e)
        {
            //Console.Beep(n[0], p);
            //l.Add(n[0]);
            //textBox1.Text  = " 1 ";
            int j=0;
            int i = n[j];
            tan(i,j);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            int j = 1;
            int i = n[j];
            tan(i, j);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            int j = 2;
            int i = n[j];
            tan(i, j);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            int j = 3;
            int i = n[j];
            tan(i, j);
        }

        private void button5_Click(object sender, EventArgs e)
        {
            int j = 4;
            int i = n[j];
            tan(i, j);
        }

        private void button6_Click(object sender, EventArgs e)
        {
            int j = 5;
            int i = n[j];
            tan(i, j);
        }

        private void button7_Click(object sender, EventArgs e)
        {
            int j = 6;
            int i = n[j];
            tan(i, j);
        }

        private void button8_Click(object sender, EventArgs e)
        {
            int j = 7;
            int i = n[j];
            tan(i, j);
        }

        private void button9_Click(object sender, EventArgs e)
        {
            int j = 8;
            int i = n[j];
            tan(i, j);
        }

        private void button10_Click(object sender, EventArgs e)
        {
            int j = 9;
            int i = n[j];
            tan(i, j);
        }

        private void button11_Click(object sender, EventArgs e)
        {
            int j = 10;
            int i = n[j];
            tan(i, j);
        }

        private void button12_Click(object sender, EventArgs e)
        {
            int j = 11;
            int i = n[j];
            tan(i, j);
        }

        private void button13_Click(object sender, EventArgs e)
        {
            int j = 12;
            int i = n[j];
            tan(i, j);
        }

        private void button14_Click(object sender, EventArgs e)
        {
            int j = 13;
            int i = n[j];
            tan(i, j);
        }

        private void button15_Click(object sender, EventArgs e)
        {
            int j = 14;
            int i = n[j];
            tan(i, j);
        }

        private void button16_Click(object sender, EventArgs e)
        {
            int j = 15;
            int i = n[j];
            tan(i, j);
        }

        private void button17_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            l.Clear();
            
        }
        private void button18_Click(object sender, EventArgs e)
        {
            textBox2.Text = "";
        }

        public static string gc;
        private void button19_Click(object sender, EventArgs e)
        {
            gc = textBox2.Text;
            shuchu a=  new shuchu();
            a.Show();
            this.Hide();
           
        }

      
    }
}